cancel
Showing results for 
Search instead for 
Did you mean: 

I2C & DMA STM32F429

Lecordier.Guy
Associate III
Posted on June 07, 2016 at 16:54

Dear All,

I am using CubeMx F4 V1.12.0

I want to use I2C with DMA on the STM32F429 but it is not working.

In the stm32f4xx_hal_i2c.c it is noted 

           (+++) Configure the priority and enable the NVIC for the transfer complete interrupt on the DMA Tx or Rx Stream

 and CubeMx 4.15.0  generates the code for the 2 DMA Interrupts (rx & tx) but the I2C is not working.

But in the stm32f4xx_hal_i2c.c    I2C_DMAXferCplt()  at line 4938  I see these lines

    /* Enable EVT and ERR interrupt */

    __HAL_I2C_ENABLE_IT(hi2c, I2C_IT_EVT | I2C_IT_ERR);

So it seems that the 2  I2C Event & Error Interrupts must also be in place to finalize the transmission; Is it right?

Thanks for the clarification

1 REPLY 1
Nesrine M_O
Lead II
Posted on June 08, 2016 at 11:37

Hi lecordier.guy.001,

I suggest you to start from I2C examples under the STM32F4 cube firmware package:

STM32Cube_FW_F4_V1.12.0\Projects\STM32F429I Discovery\Examples\I2C\I2C_TwoBoards_ComDMA

This example describes how to perform I2C data buffer transmission/reception between two boards, via DMA.

-Syrine-