We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hello everyone:
I have a question.
I want to store some datum in my on-chip flash when my appliance programme running.I can write on-chip flash to store the datum .But if I update the software on my hareware,I have to reload the new software on on-chip flash,and the datum stored in on-chip flash is overlay or missing.
Can I lock the datum area without overlayed by reload the programme?
Develop entironment :Keil 3 for C166 MCU: XC167CI-32F
Thank you !
First off, you should reserve the space in your project, so that when building the application you get a code-space overflow when linking if the application becomes so large that it will need the sector(s) reserved for your data.
Some download applications have a feature to not just erase everything in the flash, but instead just erase the flash sectors that are needed by the new application.
If the download application does only support a full erase, then you will have to write an application that retrieves the data from the chip. Then creates a new download file containing both the application and the data and then writes down this custom-built file into the chip.
The flash is organized in sectors which can be protected by a user password to protect against unintended write or erase operations.
You can also organize your Keil project to only use one of the sectors for your "const data" that can be updated in the field. The other sectors used for program execution and data that you don't update in the field.
Thank you ! I have done the work!