2025-07-30 9:32 AM
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:
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)
After writing, when I read back, I see userConfig is already set, which I didn’t expect.
I can’t read memory at 0x09000000 using STM32Programmer. It always gives a read error.
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?
Save data once
Read/write it later without erase
Keep data even after power off
Any help is appreciated. Thanks!
Manikanta