We have made 2 partition of Internal flash. One is for running Application and Other for storing some configuration. I am trying to erase the page of 2nd partition, and it is not working properly.
2nd partition Id is storage.
We have made 2 partition of Internal flash. One is for running Application and Other for storing some configuration. I am trying to erase the page of 2nd partition, and it is not working properly.
2nd partition Id is storage.
Hello,
Could you explain the context a bit more? Which SDK version and Nordic chip are you using?
You mentioned having two partitions, with one reserved for configuration storage. You should ensure that the partition boundaries are correctly defined in your pm_static.
Are there any log messages indicating the issue or error? Have you considered using the NVS file system from Zephyr?
Kind Regards,
Abhijith
SDK Version : 2.6.0
Chip : NRF52840 DK
Created Overlay File as Below:
Hello,
Since it is working the first time, I suspect it might be due to incorrect handling of the erase size or misalignment. Please ensure that each erase operation targets a full page (4096 bytes) aligned to the page boundary. You should perform the erase operation on a page-by-page basis. For the nRF52840, it is divided into 256 pages, each 4 kB in size. See product specification page No:22
Kind Regards,
Abhijith
It means need to erase 4096 bytes completely and can not erase only one page 256bytes at a single execution?
Hello,
In your erase command, flash_area_erase(fa, 3840, 256); only 3.75 KB (3840 bytes) of the storage sector is being erased, which is not a full page. Instead, try erasing a complete page of 4096 bytes (4 KB).
Kind Regards,
Abhijith