cancel
Showing results for 
Search instead for 
Did you mean: 

EEPROM EMULATION Reads fail with Os optimization

nc87
Associate

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

1 REPLY 1
Pavel A.
Evangelist III

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?