Acknowledgement Signal from peripheral to Central Device

I want to send Acknowledgement Signal from peripheral to Central Device, when the new firmware is transferred to peripheral device.

Parents
  • Hi,

    Generally you will have a protocol for DFU that handles this. And you also have scknowledgments on the transport layer (assuming BLE as you write central and peripheral). To be more specific I would need to know more about what you are doing (which SDK you are using, how you are doing DFU, which type of bootloader, DFU protocol and transport layer, etc)

  • I am using SDK 2.5.2, DFU over BLE and MCUBoot bootloader.

  • I see. And you are using SMP for DFU then I assume? Then the SMP client (which is performing DFU of the other device) will get confirmation when the image is transeferd, that is inherent in the protocol.

  • Thanks for reply.

    [00:40:22.227,508] <inf> mcuboot_util: Image index: 0, Swap type: none

    I am getting this in output terminal even after successful firmware update. Where shall I mention the Swap type (whether in .conf file or main.c file)?

    and after resetting the device, I am getting following results:

    *** Booting nRF Connect SDK v2.5.2 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �*** Booting nRF Connect SDK v2.5.2 ***
    Board: nrf52dk_nrf52832
    Build time: Jun 26 2024 11:01:57
    [00:00:00.000,732] <err> bt_gatt: Unable to register handle 0x001d
    [00:00:00.000,762] <inf> DFU: DFU firmware 1

    [00:00:00.006,591] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.006,591] <inf> fs_nvs: alloc wra: 0, df8
    [00:00:00.006,622] <inf> fs_nvs: data wra: 0, 370
    [00:00:00.006,774] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.009,307] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.009,338] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.009,368] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.009,765] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.009,796] <inf> DFU: Initialized BLE

    [00:00:00.011,474] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,505] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,535] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.015,625] <inf> DFU: Added following peer to accept list: e7 48

    [00:00:00.015,655] <inf> DFU: Acceptlist setup number = 1

    [00:00:00.016,815] <inf> DFU: Advertising successfully started

  • *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,476] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,476] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,507] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,629] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,162] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,192] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,223] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,650] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,650] <inf> DFU: Initialized BLE

    [00:00:00.011,108] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,138] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,169] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,824] <err> os: ***** HARD FAULT *****
    [00:00:00.013,824] <err> os: Fault escalation (see below)
    [00:00:00.013,854] <err> os: ***** MPU FAULT *****
    [00:00:00.013,854] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,854] <err> os: Data Access Violation
    [00:00:00.013,885] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,885] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,916] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,916] <err> os: xpsr: 0x61000000
    [00:00:00.013,946] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,977] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.014,007] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,385] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,385] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,415] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,568] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,070] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,101] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,559] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,589] <inf> DFU: Initialized BLE

    [00:00:00.011,016] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,047] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,077] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,732] <err> os: ***** HARD FAULT *****
    [00:00:00.013,763] <err> os: Fault escalation (see below)
    [00:00:00.013,763] <err> os: ***** MPU FAULT *****
    [00:00:00.013,763] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,793] <err> os: Data Access Violation
    [00:00:00.013,793] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,824] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,824] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,854] <err> os: xpsr: 0x61000000
    [00:00:00.013,854] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,885] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,916] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,640] <inf> DFU: DFU firmware 1

    [00:00:00.007,354] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,385] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,385] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,537] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,070] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,101] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,559] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,559] <inf> DFU: Initialized BLE

    [00:00:00.011,016] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,047] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,077] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,732] <err> os: ***** HARD FAULT *****
    [00:00:00.013,732] <err> os: Fault escalation (see below)
    [00:00:00.013,732] <err> os: ***** MPU FAULT *****
    [00:00:00.013,763] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,763] <err> os: Data Access Violation
    [00:00:00.013,793] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,793] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,824] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,824] <err> os: xpsr: 0x61000000
    [00:00:00.013,854] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,885] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,916] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,385] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,415] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,415] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,568] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,101] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,162] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,589] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,589] <inf> DFU: Initialized BLE

    [00:00:00.011,047] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,077] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,108] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,763] <err> os: ***** HARD FAULT *****
    [00:00:00.013,763] <err> os: Fault escalation (see below)
    [00:00:00.013,763] <err> os: ***** MPU FAULT *****
    [00:00:00.013,793] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,793] <err> os: Data Access Violation
    [00:00:00.013,824] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,824] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,854] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,854] <err> os: xpsr: 0x61000000
    [00:00:00.013,885] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,916] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,946] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,385] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,385] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,415] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,537] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,070] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,101] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,559] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,559] <inf> DFU: Initialized BLE

    [00:00:00.011,016] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,047] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,077] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,732] <err> os: ***** HARD FAULT *****
    [00:00:00.013,732] <err> os: Fault escalation (see below)
    [00:00:00.013,763] <err> os: ***** MPU FAULT *****
    [00:00:00.013,763] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,793] <err> os: Data Access Violation
    [00:00:00.013,793] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,824] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,824] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,824] <err> os: xpsr: 0x61000000
    [00:00:00.013,854] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,885] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,916] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    Now, I am getting this error, can you please help me with this first

Reply
  • *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,476] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,476] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,507] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,629] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,162] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,192] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,223] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,650] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,650] <inf> DFU: Initialized BLE

    [00:00:00.011,108] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,138] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,169] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,824] <err> os: ***** HARD FAULT *****
    [00:00:00.013,824] <err> os: Fault escalation (see below)
    [00:00:00.013,854] <err> os: ***** MPU FAULT *****
    [00:00:00.013,854] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,854] <err> os: Data Access Violation
    [00:00:00.013,885] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,885] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,916] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,916] <err> os: xpsr: 0x61000000
    [00:00:00.013,946] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,977] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.014,007] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,385] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,385] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,415] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,568] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,070] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,101] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,559] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,589] <inf> DFU: Initialized BLE

    [00:00:00.011,016] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,047] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,077] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,732] <err> os: ***** HARD FAULT *****
    [00:00:00.013,763] <err> os: Fault escalation (see below)
    [00:00:00.013,763] <err> os: ***** MPU FAULT *****
    [00:00:00.013,763] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,793] <err> os: Data Access Violation
    [00:00:00.013,793] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,824] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,824] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,854] <err> os: xpsr: 0x61000000
    [00:00:00.013,854] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,885] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,916] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,640] <inf> DFU: DFU firmware 1

    [00:00:00.007,354] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,385] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,385] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,537] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,070] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,101] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,559] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,559] <inf> DFU: Initialized BLE

    [00:00:00.011,016] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,047] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,077] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,732] <err> os: ***** HARD FAULT *****
    [00:00:00.013,732] <err> os: Fault escalation (see below)
    [00:00:00.013,732] <err> os: ***** MPU FAULT *****
    [00:00:00.013,763] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,763] <err> os: Data Access Violation
    [00:00:00.013,793] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,793] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,824] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,824] <err> os: xpsr: 0x61000000
    [00:00:00.013,854] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,885] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,916] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,385] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,415] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,415] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,568] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,101] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,162] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,589] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,589] <inf> DFU: Initialized BLE

    [00:00:00.011,047] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,077] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,108] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,763] <err> os: ***** HARD FAULT *****
    [00:00:00.013,763] <err> os: Fault escalation (see below)
    [00:00:00.013,763] <err> os: ***** MPU FAULT *****
    [00:00:00.013,793] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,793] <err> os: Data Access Violation
    [00:00:00.013,824] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,824] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,854] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,854] <err> os: xpsr: 0x61000000
    [00:00:00.013,885] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,916] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,946] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    [00:00:00.007,385] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,385] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,415] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.007,537] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.010,070] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.010,101] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.010,131] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 141.732 Build 3324398027
    [00:00:00.010,559] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.010,559] <inf> DFU: Initialized BLE

    [00:00:00.011,016] <inf> bt_hci_core: Identity: E0:63:B6:31:E9:4F (random)
    [00:00:00.011,047] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.011,077] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.013,732] <err> os: ***** HARD FAULT *****
    [00:00:00.013,732] <err> os: Fault escalation (see below)
    [00:00:00.013,763] <err> os: ***** MPU FAULT *****
    [00:00:00.013,763] <err> os: Stacking error (context area might be not valid)
    [00:00:00.013,793] <err> os: Data Access Violation
    [00:00:00.013,793] <err> os: MMFAR Address: 0x200066e0
    [00:00:00.013,824] <err> os: r0/a1: 0x20dcd4f6 r1/a2: 0xc5a14023 r2/a3: 0xccc6e0bf
    [00:00:00.013,824] <err> os: r3/a4: 0xa34455c5 r12/ip: 0x2e39f44b r14/lr: 0xca3222a0
    [00:00:00.013,824] <err> os: xpsr: 0x61000000
    [00:00:00.013,854] <err> os: Faulting instruction address (r15/pc): 0x00017b40
    [00:00:00.013,885] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:00:00.013,916] <err> os: Current thread: 0x20002e60 (unknown)
    *** Booting nRF Connect SDK v2.5.2 ***Resetting system
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    �Board: nrf52dk_nrf52832image slot
    Build time: Jun 26 2024 21:33:16
    [00:00:00.000,671] <inf> DFU: DFU firmware 1

    Now, I am getting this error, can you please help me with this first

Children
  • Hi,

    Patil said:
    Where shall I mention the Swap type (whether in .conf file or main.c file)?

    You can read abot swap type here. This is set by the SMP client (for which we have several example applications for mobile and you have the mcumgr command line tool). The most common swap types after transfering a new image is test or confirm (or test & confirm, where the client automatically confirms after being able to communicate with the device after a test). Test means swap in the image on boot, but swap back the old image on the next boot (so that it is possible to recover by resetting in case there was an issue with the new image).

    Patil said:
    Now, I am getting this error, can you please help me with this first

    Here you are getting a fatal error. You can check the map file to see which thread is at 0x20002e60 (or you can build with CONFIG_THREAD_NAME), and you can check the address where the fault occurred using addr2line on the Faulting instruction address (0x00017b40 in this case, but that can change any time you make a change to the project).

    PS: If you are new to Zephyr debugging you may find the nRF Connect SDK Intermediate course relevatn, as part 2 covers debugging.

Related