Hi,
I have configured S32K148 board, made i2c1 as master and i20 as slave. Once the 7-bit slave address is sent by the master, getting ACK from the slave and I am getting address match flag(AMF) and address valid flag(AVF) as 1. After that when I am trying to send a data byte, Receive data flag (SSR[RDF]) is getting set which means (from the DS) receive data is ready. But once RDF is 1, the Slave Receive Data Register(SRDR) is not getting updated, when I try to read SRDR, the RDF is getting reset. So How the data which is received by slave is stored in SRDR or any other register ?
Can anyone help me with this issue, any help would be appreciated.
Regards,
Prajwal B V
Hi @bvpmysore,
There are two ways to read it depending on SCFGR1[RXCFG].
Please keep in mind that the debugge can read the Receive Data Register and clear the flags too.
It is better to close the register view and use the core to copy the registers to some variables.
If RDF = 1, RXCFG = 0, you should be able to copy the received byte to a variable.
Regards,
Daniel