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 :
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 0> <debug> nrf_sdh_soc: num transports: 1 0> <debug> nrf_sdh_soc: Initializing BLE DFU transport 0> <debug> nrf_sdh_soc: vector table: 0x00073000 0> <debug> nrf_sdh_soc: vector table: 0x00073000 0> <debug> nrf_sdh_soc: Error code - sd_softdevice_vector_table_base_set: 0x00000000 0> <debug> nrf_sdh_soc: Enabling SoftDevice. 0> <debug> nrf_sdh_soc: SoftDevice enabled. 0> <debug> nrf_sdh_soc: nrf_dfu_settings_adv_name_is_valid FALSE 0> <debug> nrf_sdh_soc: Regular adv name 0> <debug> nrf_sdh_soc: #### Advertising NO BONDING #### 0> <debug> nrf_sdh_soc: Finished initializing BLE DFU transport 0> <debug> nrf_sdh_soc: After nrf_dfu_transports_init 0> <debug> nrf_sdh_ble: Calling nrf_dfu_flash_init(sd_irq_initialized=true)... 0> <debug> nrf_sdh_ble: Initializing nrf_fstorage_sd backend. 0> <debug> nrf_sdh_soc: Waiting for events 0> <debug> nrf_sdh_soc: Received: BLE_GAP_EVT_CONN_PARAM_UPDATE 0> <debug> nrf_sdh_soc: conn_sup_timeout: 2000 0> max_conn_interval: 6 0> min_conn_interval: 6 0> slave_latency 0 0> <debug> nrf_sdh_soc: Received: BLE_GAP_EVT_CONN_PARAM_UPDATE 0> <debug> nrf_sdh_soc: conn_sup_timeout: 2000 0> max_conn_interval: 36 0> min_conn_interval: 36 0> slave_latency 0 0> <debug> nrf_sdh_soc: Received select object 0> <info> app: Valid Command: NRF_DFU_OBJECT_OP_SELECT 0> <debug> nrf_sdh_soc: Sending Object Info: [0x60, 0x06, 0x01 max: 0:x00000100 0:x00000000, CRC:0x00000000] 0> <debug> nrf_sdh_soc: Set receipt notif 0> <debug> nrf_sdh_soc: Sending Response: [0x2, 0x1] 0> <debug> nrf_sdh_soc: Received create object 0> <info> app: Before OP create command 0> <info> app: Valid Command Create 0> <debug> nrf_sdh_soc: Sending Response: [0x1, 0x1] 0> <info> app: Before OP write command 0> <info> app: Before OP write command 0> <info> app: Before OP write command 0> <info> app: Before OP write command 0> <debug> nrf_sdh_soc: Received calculate CRC 0> <info> app: Valid Command CRC 0> <debug> nrf_sdh_soc: Sending CRC: [0x60, 0x03, 0x01, 0:x00000040, CRC:0xDD71F68F] 0> <debug> nrf_sdh_soc: Received execute object 0> <info> app: Before OP execute command 0> <info> app: Valid command execute 0> <info> app: PB: Init packet data len: 58 0> <info> app: Handling unsigned command 0> <debug> nrf_sdh_soc: Sending Response: [0x4, 0xB] 0> <debug> nrf_sdh_soc: Received: BLE_GAP_EVT_CONN_PARAM_UPDATE 0> <debug> nrf_sdh_soc: conn_sup_timeout: 2000 0> max_conn_interval: 6 0> min_conn_interval: 6 0> slave_latency 0 0> <debug> nrf_sdh_soc: Received: BLE_GAP_EVT_CONN_PARAM_UPDATE 0> <debug> nrf_sdh_soc: conn_sup_timeout: 2000 0> max_conn_interval: 36 0> min_conn_interval: 36 0> slave_latency 0 0> <debug> nrf_sdh_soc: TimeOut is finish 0> <debug> nrf_sdh_soc: After waiting for events 0> <debug> nrf_sdh_soc: Before nrf_dfu_settings_additional_erase 0> <debug> nrf_sdh_soc: After nrf_dfu_settings_additional_erase : 0 0> <debug> nrf_sdh_soc: Enter nrf_dfu_app_is_valid : bank_code = 0 0> <debug> nrf_sdh_soc: Return false in valid app check 0> <info> nrf_sdh_soc: After real nrf_dfu_init 0> <debug> nrf_sdh_soc: After nrf_bootloader_init 0> <debug> nrf_sdh_soc: Running nrf_bootloader_app_start with address: 0x00023000 0> <debug> nrf_sdh_soc: Initializing SD in mbr
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