Want to detect the number of times a switch value is used through stm32
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
