This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Not able to erase only Flash using erasepage, sectorerase options

Hello,

 

I am using nRF52840, SDK_16.0.0, S140 SoftDevice and Segger 4.16 for flashing the image.

 

This issue is similar to below ticket with -eraseall and chiperase options.

https://devzone.nordicsemi.com/support/241767

 

Let me give little background. I have two merged hex files.

Merged file 1: “Secure Serial Bootloader” + “Soft Device + MBR” + DTM application + “Bootloader settings page”. (Changed Flash & Ram address macros similar to ble_app_blinky)

Merged file 2: “Secure Serial Bootloader” + “Soft Device + MBR” + BLE Blinky application + “Bootloader settings page”.

 

For first time when I flash any merged hex file it works. But when I flash other merged file on top previous merged file with –erasepage or –sectorerase options its failing.

 

1) I want to erase only Flash but not UICR. I used below sequence

 

nrfjprog -f NRF52 --erasepage 0

nrfjprog -f NRF52 --program BLSD_DTM_CT40_V2.hex --verify -r

 

For first time it worked properly. But when I repeat same sequence and trying to flash same hex file, I am getting error. Below is the snapshot.

 a) Whether -erasepage 0 will erase entire Flash from Page 0 to Page 255.

 

b) Even I tried “nrfjprog -f NRF52 --erasepage 0x000000-0x100000”. But still failing.

c) Whether ‘erasepage’ will not erase Page 0 (Similar to nRF51).

 

d) Below is my nrfjprog version

 

2) Even I use –sectorerase. After –eraseall, for first time I am able to flash my binary. But when I try to flash other merged file its failing.

 

 3) Is this because of me using –verify option. As verify will verify Flash, RAM, UICR and XIP regions.

    1. Whether can I verify only flash rather than RAM, UICR and XIP regions.

 

4) I want to write my project specific details in UICR. Using below command, I am able to write.

nrfjprog -f NRF52 --memwr 0x1000108C --val 0xDDCCBBAA –verify

 

But how to erase only specific location. Using --eraseuicr option will erase entire UICR

nrfjprog -f NRF52 --eraseuicr

 

Thanks & Regards

Vishnu Beema

Parents Reply Children
No Data
Related