2025-04-09 6:35 PM
Hello,
I am running into a weird behavior where EE_ReadVariable32bits call in EEPROM EMULATION library fails when optimization is turned on with Os setting. With Os setting it works only once after full chip erase and fails to read (resets) after any subsequent resets. With O0 (no optimization) it seems to work just fine.
I am using STM32H562 with STM32 Cube IDE.
Any idea how i can debug this issue?
Thank You,
NC
2025-04-09 10:56 PM
> Any idea how i can debug this issue?
You can set compiler options individually for any source file. So: use -Os for whole project but -O0 only for the "EEPROM" file(s). Will it work?