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

bootloader_secure_serial and nRFgo Studio not working

We are trying to get serial bootloader (DFU) working. I compiled a debug version of the experimental_bootloader_secure_serial in SDK13.0.0 to see what really happens there (pca10040 board). I am using UART-to-USB converter (FTDI) in pins 6 and 8. After starting the bootloader and trying to upload a zip file with the nRFgo Studio (38400 with flow control on), the log looks like below:

:INFO:Inside main
:DEBUG:In nrf_bootloader_init
:DEBUG:In real nrf_dfu_init
:DEBUG:running nrf_dfu_settings_init
:DEBUG:Enter nrf_dfu_continue
:ERROR:Single: Invalid bank
:DEBUG:Enter nrf_dfu_app_is_valid
:DEBUG:Return false in valid app check
:DEBUG:In nrf_dfu_transports_init
:DEBUG:num transports: 1
:DEBUG:UART initialized
:DEBUG:After nrf_dfu_transports_init
:DEBUG:Waiting for events
RROR:received an error: 0x00000004!

After the last "RROR" line the bootloader actually makes reset. Sometimes there is even no message, but the bootloader just restarts. With baud rate 115200 I get messages:

:DEBUG:Waiting for events
:WARNING:Received unsupported OP code 00
:DEBUG:Sending Response: [0x0, 0x3]
:WARNING:Received unsupported OP code d1
:DEBUG:Sending Response: [0xd1, 0x3]

In both cases, the nRFgo Studio says:

Timed out waiting for acknowledgement from device.
Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.
Possible causes:
- bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
- baud rate or flow control is not the same as in the target bootloader.
- target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.

Turning flow control off from the bootloader and in the nRFgo Studio does not help.

The question is, how should the serial bootloader actually work? What goes wrong with this?

EDIT

I just installed nrfutil version 2.3.0 and tried a comman:

$ nrfutil dfu serial -pkg dfu_test_app_hrm_s132.zip -p COM9 -b 115200 -fc 0

That gives me the following output at bootloader side:

:WARNING:Received unsupported OP code 09
:DEBUG:Sending Response: [0x9, 0x3]
:WARNING:Received unsupported OP code 09
:DEBUG:Sending Response: [0x9, 0x3]
:DEBUG:Set receipt notif
:DEBUG:Sending Response: [0x2, 0x1]
:DEBUG:Received get serial mtu
:DEBUG:Sending Response: [0x7, 0x1]
:DEBUG:Received select object
:INFO:Valid Command: NRF_DFU_OBJECT_OP_SELECT
:DEBUG:Sending Response: [0x6, 0x1]
:DEBUG:Received execute object
:INFO:Before OP execute command
:INFO:Valid command execute
:INFO:
:INFO:PB: Init packet data len: 61
:INFO:Handling signed command
:ERROR:Prevalidate failed!
:DEBUG:Sending Response: [0x4, 0xa]

So it looks like something is working, but not completely. Any ideas what could be wrong?

serialtest.zip serialtest.hex

Parents Reply Children
No Data
Related