Bus Fault - Precise data bus error when jumping from mcuboot

I have a custom board and set mcuboot secondary in external flash. The tests that i made everything is working OK with the app update, but now i tested mcuboot update and i have an error. As the error is on mcuboot i activated log on it and this is the output, see image.

Following the report of similar errors i tried to use 'addr2line' to see if can get more info, but no success, no extra info.

Can you give me some guidelines how to debug this error?

Parents
  • Hi,

    Here is the debug from the device, see image below

    [00:02:11.757,934] <inf> UC__FOTA: HTTPS download: 97%
    [00:02:11.900,817] <inf> UC__FOTA: HTTPS download: 100%
    [00:02:11.930,297] <inf> UC__FOTA: HTTPS download: 100%. Rebooting in 10s...
    [00:02:11.930,755] <inf> UC_SETTI: FOTA requested: No | Modem: mfw_nrf9160_1.3.0 | B1: v1 | App: v34
    [00:02:11.933,135] <inf> UC_SETTI: Updated FOTA requests | Modem: mfw_nrf9160_1.3.0 | B1: v1 | App: v0.34
    [00:00:00.002,319] <inf> mcuboot: Starting bootloader
    [00:00:00.003,143] <inf> mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.003,906] <inf> mcuboot: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
    [00:00:00.004,302] <inf> mcuboot: Boot source: none
    [00:00:00.005,096] <inf> mcuboot: Swap type: test
    [00:00:00.070,098] <inf> mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.070,861] <inf> mcuboot: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
    [00:00:00.071,289] <inf> mcuboot: Boot source: none
    [00:00:00.072,052] <inf> mcuboot: Swap type: test
    [00:00:00.137,176] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=11
    [00:00:00.223,297] <dbg> mcuboot.swap_status_init: initializing status; fa_id=11
    [00:00:00.223,999] <dbg> mcuboot.boot_write_swap_info: writing swap_info[00:00:34.081,329] <dbg> mcuboot.boot_write_copy_done: writing copy_done; fa_id=11 off=0xcffe0 (0xf7fe0)
    [00:00:34.081,909] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=7
    [00:00:34.167,877] <dbg> mcuboot.swap_status_init: initializing status; fa_id=7
    [00:00:34.168,579] <dbg> mcuboot.boot_write_swap_info: writing swap_info; fa_id=7 off=0xffd8 (0x27fd8), swap_type=0x2 image_num=0x1
    [00:00:34.169,128] <dbg> mcuboot.boot_write_swap_size: writing swap_size; fa_id=7 off=0xffd0 (0x27fd0)
    [00:00:34.169,616] <dbg> mcuboot.boot_write_magic: writing magic; fa_id=7 off=0xfff0 (0x27ff0)
    [00:00:34.170,196] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=2
    [00:00:37.543,792] <dbg> mcuboot.boot_write_copy_done: writing copy_done; fa_id=7 off=0xffe0 (0x27fe0)
    [00:00:37.572,113] <inf> mcuboot: Bootloader chainload address offset: 0x28000
    [00:00:37.572,448] <inf> mcuboot: Jumping to the first image slot
    Never should get here[00:00:00.002,319] <inf> mcuboot: Starting bootloader
    [00:00:00.003,143] <inf> mcuboot: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x3
    [00:00:00.003,906] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.004,302] <inf> mcuboot: Boot source: none
    [00:00:00.005,096] <inf> mcuboot: Swap type: revert
    [00:00:00.084,289] <inf> mcuboot: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x3
    [00:00:00.085,052] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.085,449] <inf> mcuboot: Boot source: none
    [00:00:00.086,242] <inf> mcuboot: Swap type: revert
    [00:00:00.165,893] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.166,290] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=2
    [00:00:00.194,183] <dbg> mcuboot.boot_write_image_ok: writing image_ok; fa_id=2 off=0xcffe8 (0xcffe8)
    [00:00:00.194,793] <dbg> mcuboot.boot_write_swap_size: writing swap_size; fa_id=2 off=0xcffd0 (0xcffd0)
    [00:00:00.195,404] <dbg> mcuboot.boot_write_magic: writing magic; fa_id=2 off=0xcfff0 (0xcfff0)
    [00:00:00.196,075] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=11
    [00:00:00.282,012] <dbg> mcuboot.swap_status_init: initializing status; fa_id=11
    [00:00:00.282,745] <dbg> mcuboot.boot_write_swap_info: writing swap_info; fa_id=11 off=0xcffd8 (0xf7fd8), swap_type=0x4 image_num=0x0
    [00:00:00.283,294] <dbg> mcuboot.boot_write_image_ok: writing image_ok; fa_id=11 off=0xcffe8 (0xf7fe8)
    [00:00:00.283,752] <dbg> mcuboot.boot_write_swap_size: writing swap_size; fa_id=11 off=0xcffd0 (0xf7fd0)
    [00:00:00.284,240] <dbg> mcuboot.boot_write_magic: writing magic; fa_id=11 off=0xcfff0 (0xf7ff0)
    [00:00:00.284,820] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=2
    [00:00:03.671,844] <dbg> mcuboot.boot_write_copy_done: writing copy_done; fa_id=11 off=0xcffe0 (0xf7fe0)
    [00:00:03.672,790] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:03.673,187] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=2
    [00:00:03.698,547] <dbg> mcuboot.boot_write_image_ok: writing image_ok; fa_id=2 off=0xcffe8 (0xcffe8)
    [00:00:03.699,157] <dbg> mcuboot.boot_write_swap_size: writing swap_size; fa_id=2 off=0xcffd0 (0xcffd0)
    [00:00:03.699,768] <dbg> mcuboot.boot_write_magic: writing magic; fa_id=2 off=0xcfff0 (0xcfff0)
    [00:00:03.700,439] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=7
    [00:00:03.786,376] <dbg> mcuboot.swap_status_init: initializing status; fa_id=7
    [00:00:03.787,078] <dbg> mcuboot.boot_write_swap_info: writing swap_info; fa_id=7 off=0xffd8 (0x27fd8), swap_type=0x4 image_num=0x1
    [00:00:03.787,628] <dbg> mcuboot.boot_write_image_ok: writing image_ok; fa_id=7 off=0xffe8 (0x27fe8)
    [00:00:03.788,085] <dbg> mcuboot.boot_write_swap_size: writing swap_size; fa_id=7 off=0xffd0 (0x27fd0)
    [00:00:03.788,543] <dbg> mcuboot.boot_write_magic: writing magic; fa_id=7 off=0xfff0 (0x27ff0)
    [00:00:03.789,123] <dbg> mcuboot.swap_erase_trailer_sectors: erasing trailer; fa_id=2
    [00:00:04.118,743] <dbg> mcuboot.boot_write_copy_done: writing copy_done; fa_id=7 off=0xffe0 (0x27fe0)
    [00:00:04.149,932] <inf> mcuboot: Bootloader chainload address offset: 0x28000
    [00:00:04.150,238] <inf> mcuboot: Jumping to the first image slot
    [00:00:04.150,543] <err> os: ***** HARD FAULT *****
    [00:00:04.150,543] <err> os:   Fault escalation (see below)
    [00:00:00.002,288] <inf> mcuboot: Starting bootloader
    [00:00:00.003,112] <inf> mcuboot: Primary image: magic=good, swap_type=0x4, copy_done=0x1, image_ok=0x1
    [00:00:00.003,875] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.004,272] <inf> mcuboot: Boot source: none
    [00:00:00.005,065] <inf> mcuboot: Swap type: none
    [00:00:00.005,676] <inf> mcuboot: Primary image: magic=good, swap_type=0x4, copy_done=0x1, image_ok=0x1
    [00:00:00.006,439] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.006,835] <inf> mcuboot: Boot source: none
    [00:00:00.007,629] <inf> mcuboot: Swap type: none
    [00:00:00.038,299] <inf> mcuboot: Bootloader chainload address offset: 0x28000
    [00:00:00.038,635] <inf> mcuboot: Jumping to the first image slot
    [00:00:00.038,940] <err> os: ***** HARD FAULT *****
    [00:00:00.038,940] <err> os:

    The error is a bit different, now is 'Never should get here' and as the watchdog is on the device reboot after a while and reverted to old image.

    You can see that even reverting to old image the device entered in hard fault again, the problem is that there is no more info on Hard Fault

  • ICM_UC said:
    The error is a bit different, now is 'Never should get here'

    I have not seen that happen before.

    1) What SDK version are you using?

    2) Are you able to reproduce this on a nRF9160-DK as well? or do you see this only on the custom board?

    3) If yes on Q2, do you have a simple sample that reproduces this?

Reply Children
No Data
Related