How can i store data to a blank page of flash during program is executing?
EDIT: the data which saved in flash, must be remain forever until re-writed by new data, by mcu.
the first step is to read the datasheet so you understand the operation and constraints when using the flash. Then you read the manual on your compiler toolset to understand the functions for using the flash.
The third step is to realize that this is a bad solution to your problem as writing to flash is slow, can only be written a page at a time, can only be written from the bootloader section, and has a limited number of writes before it wares out.
Perhaps if you tell us how much data and how often it will be written, we could give you a better solution.
The Board helps those that help themselves.
Use the internal eeprom, an external eeprom, or an sd card?
Imagecraft compiler user
© 2020 Microchip Technology Inc.