2021-03-29 07:30 AM
I need to be able to transmit or receive I2C frames of several hundred byes. But the FIFO size is only 16 bytes in TX and RX direction. The sample code from ST only uses less than 16 bytes so it does not check the status of TX or RX FIFO.
In my case, since I have to load sever hundred bytes in a single transaction (TX as well as RX), I need to check the FIFO availability. Otherwise I will introduce TX overrun in TX direction or RX underrun in RX direction. Correct?
How do I check this status while loading a byte to TFR (TX FIFO register) or when I read the RFR (RX FIFO register)? Any code snippets will be appreciated.
2021-03-29 08:44 PM
I am able to transmit 2000 bytes frame over I2C using the DMA option. It works for me for now.