Other Parts Discussed in Thread: UNIFLASH, CC2340R5
Hi, Ti
How to burn without erasing?
I am using uniflash for burning and when no erase is selected, the burning reports an error.
Best Regards
Preston
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, Ti
How to burn without erasing?
I am using uniflash for burning and when no erase is selected, the burning reports an error.
Best Regards
Preston
Hi, Evan
Yes, I mean flashing.
Below is the error I'm seeing and my uniflash setup screen, I'm using uniflash version 8.4.0.4458.
Best Regards
Preston
Hello Preston,
Can I ask the reason for flashing the device without erasing the flash? Is there a specific region you wish to remain the same?
If you would like to keep the CCFG section intact, you can select Chip Erase (Retain sectors specified in CCFG).
Please read the Non-Volatile Interface section of the user's guide, this will explain that the flash must be erased before re-flashing.
Let me know if you have any more questions!
Thanks,
Isaac
Hi, Isaac
We currently need to save factory data (e.g. product ID) in flash which is not allowed to be erased.
I am using nvs to request the 0x7f000-0x80000 space for saving factory data, but after re-flash, that area is erased.
Is there any way to save this data so that they don't get erased when re-flashing?
Or is there an area for user-stored data that won't be erased?
Best Regards
Preston
Hello Preston,
Can you provide me with the SDK you are using?
I apologize for the inconvenience, but I am still working on a response. Please expect an answer Friday.
Thanks,
Isaac
Hi, Isaac
The SDK I am using is simplelink_lowpower_f3_sdk_7_40_00_64.
Before that, I refer to nvsinternal_LP_EM_CC2340R5_freertos_ticlang to use the nvs read/write function.
Best Regards
Preston
Hello Preston,
The technical reference manual references chipEraseRetain. This field can be set to retain specific areas of flash when attempting to re-flash the device. Please read sections 8.2.2, 8.2.4.2 and 8.3.2.3 to learn more. Additionally, the field is contained within the hw_ccfg.h file.
Let me know if you have any questions!
Thanks,
Isaac
Hi, Isaac
My factory data flash area ranges from 0x7F000 to 0x80000.
First, I write the factory data to the above area by NVS_write().
Then I commented out the code related to operating the nvs and re-flashed.This area is still restored to 0xFF.
My Flash Protection Settings are shown in the image below:
Can I ask if there is a misconfiguration that is causing the sectors not to be reserved? My understanding is that by changing the data in the Erase/Retain, Main Sectors 32-255 option, corresponding to the sector indicator bit to 1, this sector will be protected.
Best Regards
Preston
Hello Preston,
Since you opened another thread on the issue presented here, I will be closing this thread and assisting you on the new thread.
Thanks,
Isaac