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

Bootloader problem (code = 3)

Hello,

I use the bootloader from the SDK SoftDevice 14.0.0.

I use the Laird module BL652 which have a nRF52832 component without external clock.

To compile the bootloader, I use the source code from : examples\dfu\bootloader_secure_ble\pca10040_debug\armgcc  (without secure key, it's more easy).

(I change the clock to the internal RC, I don't have button....)

To test, I load only the SoftDevice 5.0.0 and this bootloader.

The bootloader run and start. I use a tablet with the nRFConnect application.

I generate my application and have 3 type of file : xx.hex, xx.dat and xx.zip

I choose with nRFConnect the file (.hex+.dat or .zip only), the first commands are sent with good execution but, when nRFConnect want to send file, the nRFConnect application generate an error : "Remote DFU error : EXTENDED ERROR....Détails: Unknown command (Code = 3)"

I not find any information about this "Code = 3". This error code appears with the ZIP file or the HEX/DAT file (same error).

My J-Link RTT Viewer log is :

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
0> <info> nrf_sdh_soc: Inside main
0> <debug> nrf_sdh_soc: In nrf_bootloader_init
0> <debug> nrf_sdh_soc: in weak nrf_dfu_init_user
0> <debug> nrf_sdh_soc: In real nrf_dfu_init
0> <debug> mem_mngr: Running nrf_dfu_settings_init(sd_irq_initialized=false).
0> <debug> nrf_sdh_ble: Calling nrf_dfu_flash_init(sd_irq_initialized=false)...
0> <debug> nrf_sdh_ble: Initializing nrf_fstorage_nvmc backend.
0> <debug> mem_mngr: Resetting bootloader settings.
0> <debug> mem_mngr: Writing settings...
0> <debug> mem_mngr: Erasing old settings at: 0x0007F000
0> <debug> nrf_sdh_ble: nrf_fstorage_erase(addr=0x0x0007F000, len=1 pages), queue usage: 1
0> <debug> nrf_sdh_ble: Flash erase success: addr=0x0007F000, pending 0
0> <debug> nrf_sdh_ble: nrf_fstorage_write(addr=0x0007F000, len=0x1B8 bytes), queue usage: 1
0> <debug> nrf_sdh_ble: Flash write success: addr=0x0007F000, pending 0
0> <error> mem_mngr: End of nrf_dfu_settings_init
0> <debug> nrf_sdh_soc: Initializing the clock.
0> <debug> nrf_sdh_soc: Enter nrf_dfu_continue : bank_layout = 0, bank_current = 0
0> <debug> nrf_sdh_soc: Enter nrf_dfu_continue : bank_0 = 0, bank_1 = 0
0> <error> nrf_sdh_soc: Single: Invalid bank
0> <debug> nrf_sdh_soc: Application sent bootloader request
0> <debug> nrf_sdh_soc: In nrf_dfu_transports_init
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I send too an image from the nRFConnect application to see the problem.

For me, perhaps, the fault is when I generate the zip file with the nRFUtils :

          .\nrfutil.exe pkg generate example.zip --application application.hex --application-version 4 --hw-version 52 --sd-req 0x9D

I don't see where the error is comming.

Thank you for your helps.

Best regards,

Damien