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

Device not booting after bootloader copy

Hi,

Slight problem here with bootloader updates : right after download, I copy from SWAP (0x16000) to normal location (0x38000 in my case).

sd_mbr_cmd.command               = SD_MBR_COMMAND_COPY_BL;
sd_mbr_cmd.params.copy_bl.bl_src = 0x16000
sd_mbr_cmd.params.copy_bl.bl_len = settings.bl_image_size;
sd_mbr_command(&sd_mbr_cmd);

After this operation , the bootloader is correctly copied. However, my device doesn't boot any more. Flash dumps indicate that the two last pages of s110 (0x0800 to 0x0FFF) have been updated, as indicated in this thread : devzone.nordicsemi.com/.../

the updated data parts are :

0x800 : 00 00 00 00 00 60 01 00  20 35 00 00 04 98 03 00
0xC00 : 00 00 00 00 FF FF FF FF  FF FF FF FF FF FF FF FF

Any idea why this happens ?

Parents
  • Hi Jean,

    Could you check if the bootloader start address in UICR (NRF_UICR_BOOT_START_ADDRESS, 0x10001014) is correctly point to the start address of your bootloader ?

    If you update the same hex file for the bootloader, would it work ? You can try to read out the image before and after the bootloader update and compare them, you can upload them here.

    You can try to run the bootloader in debug mode and see if it can get to main().

  • Hi Hung Bui,

    I've tried downloading the same bootloader that was already flashed.

    1. The UICR boot address hasn't changed (0x38000).

    2. Flash dumps are attached here and here. The diffs are located at 0x800 (softdevice), 0xC00 (softdevice), 0x16000 (swap area - contains the bootloader image), and 0x3EC00 (data copied from the swap area, every time I boot)

    3. Debug session under Keil : the execution is stuck at offset 0x38334, which is in the arm_startup_nrf51.s

    (according to the .map output)

    0x00038320   0x00000048   Code   RO    63    .text         arm_startup_nrf51.o
    0x00038368   0x000006e0   Code   RO    70    .text         main.o
    
Reply
  • Hi Hung Bui,

    I've tried downloading the same bootloader that was already flashed.

    1. The UICR boot address hasn't changed (0x38000).

    2. Flash dumps are attached here and here. The diffs are located at 0x800 (softdevice), 0xC00 (softdevice), 0x16000 (swap area - contains the bootloader image), and 0x3EC00 (data copied from the swap area, every time I boot)

    3. Debug session under Keil : the execution is stuck at offset 0x38334, which is in the arm_startup_nrf51.s

    (according to the .map output)

    0x00038320   0x00000048   Code   RO    63    .text         arm_startup_nrf51.o
    0x00038368   0x000006e0   Code   RO    70    .text         main.o
    
Children
No Data
Related