2014-03-28 06:21 PM
Hi,
I'm entering in STOP mode with the command:PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);
But, when it resume from STOP, I cannot write to EEPROM anymore.
I'm unlocking EEPROM with the command:
DATA_EEPROM_Unlock();
And writing to EEPROM:
DATA_EEPROM_ProgramByte(address++, *s);
If I remove only the line to enter in STOP mode, it works as well.
Am I missing something?
Thank you.
2014-03-30 09:25 AM
solved, I was forgetting to clear the flags:
FLASH_ClearFlag(FLASH_FLAG_EOP|FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_SIZERR | FLASH_FLAG_OPTVERR | FLASH_FLAG_OPTVERRUSR);
In normal Run mode it doesn't matter...