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

Application File Is Not Working After With Bootloader

Hi.. Everyone,

i am using nrf52 with softdevice 132. i used peer manager. i am able to able to flash softdevice, bootloader and application. but after that application file is not working on my board. i had also refer this links..

link 1 link 2

i also combine all file with this .hex file app_valid_setting_apply_nRF52832.hex

in my main.c file of bootloader ,i am writing

 // This check ensures that the defined fields in the bootloader corresponds with actual
// setting in the chip.
APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START);
APP_ERROR_CHECK_BOOL(NRF_FICR->CODEPAGESIZE == CODE_PAGE_SIZE);

if i write 0x01 manually to BOOTLOADER_SETTINGS_ADDRESS 0x0007F000 then it works after that

so what hex value should be in app_valid_setting_apply_nRF52832.hex file or there is another way to do it.

Thanks..

  • Some common ways of setting the bank valid flag from the DFU FAQ:

    • Use programmer to write directly 0x01 to that address of BOOTLOADER_SETTINGS_ADDRESS (0x0003FC00).
    • Modify the bootloader firmware to write 0x01 to that address using attribute . It's the same way as we did on writing to NRF_UICR_BOOT_START_ADDRESS the value of BOOTLOADER_REGION_START (see bootloader_setting_arm.c)
    • Combine the a hex that specifically set the byte to 0x01 at BOOTLOADER_SETTINGS_ADDRESS with the hex file of your application. You can also combine the bootloader hex and softdevice file to that combination, to create a single hex file for all of them. This solution is described here. The app_valid_setting_apply.hex is the hex that does the trick. This is very useful when you are doing gang programming.

    I would suggest the 2nd approach also proposed in one of the threads you linked to if want to include the bootloader setting in the .hex file.

Related