cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F427VGTx HAL_I2C_Mem_Write_DMA error

LuCaste94
Associate

Hi, I have an issue using the HAL in question. I'm trying to write the following 4 characters 'C', 'i', 'a', 'o' to the EEPROM at address 0x0000, but what I observe through the analyzer is that the first character 'C' is being lost.

2024-09-13 12_41_11-Logic 2 [Logic - Connected] [Session 0].png

Instead, the read HAL works correctly. Do you have any suggestions for me?

Thank you very much!

Luca Castelli

1 REPLY 1
Imen.D
ST Employee

Hello @LuCaste94 and welcome to the Community  

Please check the MemAddSize parameter and DMA configuration to ensure that the DMA transfer is properly synchronized with the I2C peripheral.

Verify also that the data buffer is correctly set up and that the data is correctly loaded into the buffer before starting the DMA transfer.

I advise you to review this I2C example, which guides you to ensure I2C Data buffer transmission and reception with DMA.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen