cancel
Showing results for 
Search instead for 
Did you mean: 

WHY DOES I2C DMA NOT WORK

JHERI
Senior

simply trying to read 9 bytes from a I2C sensor on my 446re necleo board

if I use non dma I can read data fine

HAL_I2C_Master_Receive( &hi2c1, Sensor_Adr << 1 | 0x01, I2C1_DATA , 9, HAL_MAX_DELAY );

this works fine

BUT DMA IS BROKEN OR VERY BUGGY

ALL THIS BELOW DOES IS DROP THE SDA AND SCL LINES with no data ???

HAL_I2C_Master_Receive_DMA ( &hi2c1, Sensor_Adr << 1 | 0x01, I2C1_DATA , 9);

how can the NON DMA VERSION WORK AND DMA NOT

they should both do the same thing

only the dma version should not use the arm

any help appreciated and I am really ready to scream,

why is there zero examples and help out there on the web with ST DMA & I2C

thanks in advance

i am now under the impression THIS IS MAJOR ST Bugs and DMA will never never never work on the 446RE processor with I2C

these st F4 are all so flawed

6 REPLIES 6

>>why is there zero examples and help out there on the web with ST DMA & I2C

Consider how much you're paying for support, and why there's not much of it?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KnarfB
Principal III

If you use the Example Selector while creating a new project in STM32CubeIDE or MX, you find the I2C_TwoBoards_ComDMA example for your board.

Look at the DMA initialization in HAL_I2C_MspInit.

hth

KnarfB

Tesla DeLorea

What an absolutely awful answer, please don't bother in the future posting this sort of answer

Shameful answer

If ST want to sell there products, lets have some assistance with examples

really simple

thank you

will have a look

Pavel A.
Evangelist III
TDK
Guru

You might have more success if you adjust your mindset away from thinking the hardware has major flaws and bugs that haven't been found in 10+ years of use.

There are examples, the hardware does work. Posts claiming gross hardware incompetence by ST are tiring to address.

If you include your entire code, it's possible to look at what may be wrong. If you only include the call to HAL_I2C_Master_Receive_DMA, everything else is hidden and it's hard to say. You might not have the peripheral initialized, perhaps the pin configuration is wrong, perhaps DMA isn't initialized, perhaps the data is inaccessible to the DMA, and many more things.

If you feel a post has answered your question, please click "Accept as Solution".