I am working on a STM32F429 and I want to write some info to flash, e.g. the PC when the Window Watchdog triggers an reset. I have created a project in CubeMX and added the WindowWatchdog:
hwwdg.Init.Prescaler = WWDG_PRESCALER_8;
hwwdg.Init.Window = 127;
hwwdg.Init.Counter = 127;
In EarlyWakeupInterrupt I refresh the watchdog and erase the sector 15 with VoltageRange 3 and write one byte to address 0x0810C000.
The EWI is triggered , but somehow it seems that the erase and write takes too long and the reset is triggered.
But when I add a timer (timer5) and capture the call to flash write it takes about 19000000 timer counts. With 90 MHz based timer count this is about 200 ms. Does this make sense? -> Yes, according to the DataSheet 6.3.13 Memory characteristics.
What would be a good way to store information about the system in case of an watchdog reset ?
Thanks and best regrads