Skip to main content
Explorer II
July 30, 2025
Question

STM32H5-EDataBank_1 - Data not persistent + Read error at 0x09000000

  • July 30, 2025
  • 1 reply
  • 204 views

Hi,

I’m using EDataBank_1 on an STM32 device to store user data after a power cycle. I based my code on the EraseProgram example and made these changes:

What I did:

  • Enabled FlashPeripheral and set EDataBank_1 size = 2

  • On first boot, I do:
    Init → Erase → Program → Read

  • After a reset, I do:
    Init → Read → (optional Program)
    (I skip erase to keep the data)

Problems:

  1. After writing, when I read back, I see userConfig is already set, which I didn’t expect.

  2. I can’t read memory at 0x09000000 using STM32Programmer. It always gives a read error.

Questions:

  • Why does userConfig look configured right after a write?

  • How do I check if EDataBank_1 is still uninitialized (virgin) without erasing?

  • Is the read error at 0x09000000 due to write failure or ECC error?

  • How can I detect write errors or ECC issues?

Goal:

  • Save data once

  • Read/write it later without erase

  • Keep data even after power off

mani9989_0-1753893082251.pngmani9989_1-1753893122827.png

 

Any help is appreciated. Thanks!

Manikanta

    This topic has been closed for replies.

    1 reply

    ST Employee
    August 5, 2025

    Hello @mani9989

    You can check this article for ECC errors: Handling ECC errors in STM32H5 series: Reading unwritten OTP and flash data area

    Also, check this application note: AN5342, section 3.2: Dealing with ECC errors in flash memory