2024-10-10 01:19 AM
Hi
Because power-off protection is required, the times or variables need to be stored in flash。
Is my solution reasonable?
Create a space inside the flash to define variables, and read the data after powering on the computer. Then there is a problem with data accumulation , inside the my program the define variables be accumulated, because the data is stored inside the flash. Does the change of data require special processing? HAL_FLASH_Unlock()
How to define variables inside flash, please give a program example。
Thank you
Solved! Go to Solution.
2024-10-14 07:44 AM
@zhaowhong wrote:How can we let the CPU know when the power is off?
Have a feed from the power input to a GPIO; when the power fails the GPIO goes low (or whatever)