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

Hi I'm facing problem while programming my custom nrf52832 board its saying this hex file has a data in softdevice region . I'm using SDK_15.3.1 with SES and trying to upload bootloader_uart_debug with SoftDevice132.i set IROM1 address 0x64000 an

board version pca10040

softdevice s132

sdk 15.3.1

ic nrf52832

Parents Reply
  • Hi,

       In SDK v15.3 we changed the bootloader start address register (NRF_UICR_BOOTLOADER_START_ADDRESS) from NRF_UICR_BASE + 0x14 in the UICR to MBR_BOOTLOADER_ADDR (at 0xFF8) in the MBR. 

    So to write the start address of the bootloader, you need to write into the MBR (This is to help improving security for the bootloader)


    This causes the issue that you experienced. The tool will have trouble writing to the MBR/Softdevice area.

    The workaround is to do an erase all, write the MBR/Softdevice and then flash the bootloader without sector erase.

    If you don't want to do an erase all every time you write the bootloader, you can comment out what inside nrf_bootloader_info.c on the second time you write the bootloader so that the programmer would not write to the MBR. 

    Or you can merge the MBR/softdevice to your application and then flash with sectorerase.  

    Please use nRFConnect for desktop instead. See also this thread and this thread.

Children
  • I just downloaded 15.3 and my nrf_bootloader_info.c seems to still place the bootloader address in UICR:

        volatile uint32_t m_uicr_bootloader_start_address  __attribute__ ((section(".uicr_bootloader_start_address")))
                                                = BOOTLOADER_START_ADDR;

    Is there an example for how to load the bootloader address into the flash location?

    EDIT: Just looking in the linker script:

    uicr_bootloader_start_address (r) : ORIGIN = 0x00000FF8, LENGTH = 0x4

    it looks like the location of uicr_bootloader_start_address changed to be 0xFF8 but the name did not change (even though it is called uicr_bootloader_start_address, it is no longer in the UICR?)

  • Hi, 

    Tom said:
    it looks like the location of uicr_bootloader_start_address changed to be 0xFF8 but the name did not change (even though it is called uicr_bootloader_start_address, it is no longer in the UICR?)

    Yes, that is correct. Please see this post.

     

     -Amanda

Related