Hi,
I am trying to get the dfu single bank bootloader (github.com/.../nrf51-dfu-single-bank-ble) supplied by Nordic to work. I can successfully push firmware to my device using Android MCP, and can get my application to load by calling bootloader_app_start(DFU_BANK_0_REGION_START);.
The trouble I am having is the bootloader_app_is_valid(DFU_BANK_0_REGION_START) function will not verify that the pushed firmware is valid. After some digging it seems that the bootloader_settings_save(&settings) function is failing to change the bootloader settings in flash after DFU_UPDATE_COMPLETE has been set. Looking at the internals of bootloader_settings_save() it looks like the pstorage_clear() followed by pstorage_store() function calls are not changing the flash memory, which is why bootloader_app_is_valid() returns false.
One thing to note is the pstorage_callback_handler() registered in bootloader.c does seem to be working because I can catch the update status changing to BOOTLOADER_COMPLETE.
Details about my setup: -Custom Hardware using nrf51822 chip -Using Eclipse GCC IDE -SDK 6.1 -SoftDevice S110_nRF51822_7.2
Any help is much appreciated. Thanks