I2C DMA function... help me to make code... and working..
I am using Stm32F411RCT chip
and using BMP280 pressure sensor * 2 ea and hdc1080 * 1ea.
I made the code for three sensors to act as a polling.
however,
in order to reduce the amount of time that data is read and written,
I am changing that function from polling to DMA.
I'm struggling because it's not easy to change.
I read the AN2824 Application note about I 2 C optimised examples.
in 10 pages,
Master transmitter
DMA requests are generated only for data transfer. In transmission, DMA requests are
generated by the Data Register becoming empty (TXE = 1).
All remaining events (SB, ADDR, etc.) must be managed by polling or interrupts. In the
examples accompanying this application note, they are managed by polling.
The master sends the START condition on the bus by setting START bit. The interface waits
for the SB flag to be set and then cleared by writing the slave address in DR register. The
interface waits for ADDR flag to be set then cleared by reading SR1 and SR2 status register.
At that point, DMA transfers begin
I have to make the codes for ALL REMAINING EVENTS (SB , ADDR, etc..) using ISR
however,
I really don't know what to do.
I'm really sorry, but I wish you could help me make code. I beg you.