2023-08-31 02:58 AM
Good morning,
I write that post as remainder of a problem I encountered.
In our embbeded software, the STM8 have to initialise EEprom with a bunch of default data on its first start.
The process, that was working fine with previous ST7 now obsolete, failed with STM8 (and turned me crasy) : EEprom writing failed after writing of 32 bytes.
In fact the problem comes from STVP : it programs the flash, then lets the processor to start (release Reset long time enough) then re-enter SWIM mode to verify the flash.
So the processor is able to run a few ms, long enough to enable our app to start to initialize the EEprom.
Because of reset (to verify) occured while the EEprom was writing, it contents was not reliable over 32 byte... unlucky, after 2^5 count... that turned me on wrong analysis.
After adding a 1s delay before eeprom filling, no more problem occured with EEprom winitialisation.