I2C DMA control problem

, Nov 16, 2024|
0
32
2

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.

https://github.com/mymy49/yss/blob/509c722dbaab56df3dcafef65c779f8c92ba7e44/src/targets/nuvoton/driver/drv_i2c_nuvoton.cpp#L89

Reply