When the power supply shutting down, value of some variables is important and need to retention. How to construct it?
I used static ,extern, to define this variable, but fail.
Chip board:STM32F0Discovery
You need to store that variable in non-volatile memory like EEPROM, Internal/External Flash, SD Card or battery backed-up RAM.