mymy49
hello.
I'm currently writing I2C operation code in bare metal code.
The problem I'm currently facing is that when the DMA completes its work and immediately creates a STOP condition, an error occurs.
I'm guessing that this is because the last byte is still being transmitted immediately after DMA completes.
I don't see any way to tell if DMA is complete then the transfer of the last byte is complete in the I2C status register.
Is there any way to check?
The source code for when the problem occurs, when the DMA is completed and the status needs to be checked, is linked below.
Reply
Please refer to the BSP sample code for I2C PDMA in below link:
https://github.com/OpenNuvoton/m460bsp/tree/master/SampleCode/StdDriver/I2C_PDMA_TRX
chhuang16
Thanks, I'll take a look at the source code for that link.
mymy49