AnsweredAssumed Answered

STM32H743I-Eval & I2C DMA

Question asked by Marco Nehmelman on Apr 2, 2018
Latest reply on Apr 3, 2018 by Marco Nehmelman

Hi All,


Im trying to interface with a PCA9543A and a MT9P031 image sensor connected to I2C1 on my STM32H743I-eval board.


Using the STM32CubeH7 package I have managed to interface with both of the IC's on interrupt base (based on the I2C_TwoBoards_ComIT example).


Now I would like to use DMA for this task for which also an example is provided (I2C_EEPROM_fast_mode_plus) but I cant seem to get it to work.


On my I2cHandle I either receive error code 4 or 16 and the hdmatx returns error code 1 and in the example I2C_Error_Flag is set to 1. To configure the PCA9543 i only have to end 1 byte (0x01) to address 0xE6 but this already seems to fail with either HAL_I2C_Master_Transmit_DMA() or HAL_I2C_Mem_Write_DMA(). Im not sure why the example is failing.


After HAL_I2C_Master_Transmit_DMA() is called the code seems to be stuck in I2Cx_EV_IRQHandler(). When I check the SCL/SDA lines on a scope I do see the data and the clock but at the end of the message the SCL line stays low and is seems no STOP is generated.


Any help or other I2C DMA examples would be appreciated. I have attached my demo project code (true studio).


Thank you for your time!