Received an error: 0x00000003 after programming softdevice, bootloader, and application hex files

I am testing secure DFU with hex files under D:\nRF5_SDK_16\examples\dfu\secure_dfu_test_images\ble\nrf52832 folder. After programming softdevice, bootloader, and application hex files through J-Link Commander script, Received an error: 0x00000003 occurred.

 0> <info> app: Inside main
 0> <debug> app: In nrf_bootloader_init
 0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
 0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
 0> <debug> nrf_dfu_settings: Using settings page.
 0> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
 0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
 0> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
 0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
 0> <debug> app: Enter nrf_bootloader_fw_activate
 0> <info> app: No firmware to activate.
 0> <info> app: Boot validation failed. No valid app to boot.
 0> <debug> app: DFU mode because app is not valid.
 0> <info> nrf_bootloader_wdt: WDT is not enabled
 0> <debug> app: in weak nrf_dfu_init_user
 0> <debug> app: timer_stop (0x20005980)
 0> <debug> app: timer_activate (0x20005980)
 0> <info> app: Entering DFU mode.
 0> <debug> app: Initializing transports (found: 1)
 0> <debug> nrf_dfu_ble: Initializing BLE DFU transport
 0> <debug> nrf_dfu_ble: Setting up vector table: 0x00072000
 0> <debug> nrf_dfu_ble: Enabling SoftDevice.
 0> <debug> nrf_dfu_ble: Configuring BLE stack.
 0> <debug> nrf_dfu_ble: Enabling the BLE stack.
 0> <error> app: Received an error: 0x00000003!

Parents Reply Children
  • Hi,

    That's NRF_ERROR_INTERNAL. Can you check which function that returns that error? It's not returned by sd_softdevice_enable().

    regards

    Jared 

  • I try to add debug message to check which function that returns error code 0x00000003. But J-link RTT can't show any debug messages related to bootloader.

    LOG: J-Link RTT Viewer V7.68c: Logging started.
    LOG: Terminal 0 added.
    LOG: Connecting to J-Link via USB...
    LOG: Device "NRF52832_XXAA" selected.
    LOG: InitTarget() start
    LOG: InitTarget() end
    LOG: Found SW-DP with ID 0x2BA01477
    LOG: DAP error while determining CoreSight SoC version
    LOG: InitTarget() start
    LOG: InitTarget() end
    LOG: Found SW-DP with ID 0x2BA01477
    LOG: DPIDR: 0x2BA01477
    LOG: CoreSight SoC-400 or earlier
    LOG: Scanning AP map to find all available APs
    LOG: AP[2]: Stopped AP scan as end of AP map has been reached
    LOG: AP[0]: AHB-AP (IDR: 0x24770011)
    LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
    LOG: Iterating through AP map to find AHB-AP to use
    LOG: AP[0]: Core found
    LOG: AP[0]: AHB-AP ROM base: 0xE00FF000
    LOG: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    LOG: Found Cortex-M4 r0p1, Little endian.
    LOG: FPUnit: 6 code (BP) slots and 2 literal slots
    LOG: CoreSight components:
    LOG: ROMTbl[0] @ E00FF000
    LOG: RTT Viewer connected.

  • I can see RTT log messages if I use nRF5_SDK_16.0.0\examples\dfu\secure_bootloader\pca10040_s132_ble_debug. What is difference between pca10040_s132_ble and pca10040_s132_ble_debug project?

     0> <info> app: Inside main
     0> <debug> app: In nrf_bootloader_init
     0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
     0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
     0> <debug> nrf_dfu_settings: Using settings page.
     0> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
     0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
     0> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
     0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
     0> <debug> app: Enter nrf_bootloader_fw_activate
     0> <info> app: No firmware to activate.
     0> <info> app: Boot validation failed. No valid app to boot.
     0> <debug> app: DFU mode because app is not valid.
     0> <info> nrf_bootloader_wdt: WDT is not enabled
     0> <debug> app: in weak nrf_dfu_init_user
     0> <debug> app: timer_stop (0x20005980)
     0> <debug> app: timer_activate (0x20005980)
     0> <info> app: Entering DFU mode.
     0> <debug> app: Initializing transports (found: 1)
     0> <debug> nrf_dfu_ble: Initializing BLE DFU transport
     0> <debug> nrf_dfu_ble: Setting up vector table: 0x00072000
     0> <debug> nrf_dfu_ble: Enabling SoftDevice.
     0> <debug> nrf_dfu_ble: Configuring BLE stack.
     0> <debug> nrf_dfu_ble: Enabling the BLE stack.
     0> <debug> nrf_dfu_ble: No advertising name found
     0> <debug> nrf_dfu_ble: Using default advertising name
     0> <debug> nrf_dfu_ble: Advertising...
     0> <debug> nrf_dfu_ble: BLE DFU transport initialized.
     0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
     0> <debug> app: Enter main loop

Related