Hi,
I'm writing the f/w upgrade function.
The device is NRF51822, and I use nRF51 SDK_v5.1.0.36092 with s110_nrf51822_6.0.0_softdevice.hex.
I refereed to the example "device_firmware_updates" with 2 banks, but put the processes in my executing code instead of bootloader.
I can write the new f/w to DFU_BANK_1_REGION_START -> 0x00028400. The CRC is good and sd_softdevice_forward_to_application successfully forward to 0x00028400 and boot up in bootloader.
When I try to do the same thing that write a new f/w back to DFU_BANK_0_REGION_START -> 0x00014000.
The function pstorage_raw_clear returns okay and the area is cleared, but system always crash in pstorage_raw_store.
Then the system reboot from original address(DFU_BANK_1_REGION_START) but hangs. If I reflash the f/w again in DFU_BANK_0_REGION_START, then bootloader can boot again from DFU_BANK_1_REGION_START.
Do I do something wrong? Should I keep any information in DFU_BANK_0_REGION_START or modify the start up procedures? I would like to do f/w upgrade sequentially in each bank, because I don't have DFU mode support in my products.
Thank you for any help.