2021-12-09 08:48 AM
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
2021-12-09 09:03 AM
>>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?
2021-12-09 09:04 AM
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
2021-12-09 09:07 AM
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
2021-12-09 09:07 AM
thank you
will have a look
2021-12-09 09:34 AM
2021-12-09 01:19 PM
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.