Skip to main content
Visitor II
September 13, 2024
Question

STM32F427VGTx HAL_I2C_Mem_Write_DMA error

  • September 13, 2024
  • 1 reply
  • 684 views

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

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    September 13, 2024

    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.