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

Nordic GCC HCI DFU Example hangs after 1st data packet, any idea why?

Hi,

I'm trying to determine why a HCI DFU upload fails.
There is a log of the communication below showing the serial request/responses on the Windows side. Is anyone able to suggest what I could try to fix this or let me know what the return codes mean please?

Env:   nrf51822 AB,  SDK6.2.1,  softdevice 7.1.0  using gcc version 4.8.4 20140526

Serial config: 9600, no hw flow control

Code base: github.com/.../nrf51-dfu-bootloader-for-gcc-compiler

Modifications to bootloader: button & LED pins, clock source, serial baud set to 9600 and hw flow control disabled.

The above codebase has a windows binary, which didn't work and lacked detailed output, so instead I'm using the one from the SDK with additional print debug

I've tried with and without sending the INIT packet (the SDK6.2.1 source shows it doesn't handle it anyway) I've also added some retry loops to the serial writes.

Sending START
TX attempt #: 1
UART Write: c0 d1 4e 01 e0 03 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 a8 10 00 00 bd 83 c0
UART read: 0xc0
UART read: 0x10
UART read: 0x0
UART read: 0x0
UART read: 0xf0
UART read: 0xc0
non-slip data  [[16, 0, 0, 240]]
Ack result: 2
Sent ok!
Sending DATA
TX attempt #: 1
UART Write: c0 da 4e 20 b8 04 00 00 00 00 40 00 20 71 61 01 00 51 61 <SNIP> 4b 00 f0 8b 63 c0
UART read: 0xc0
UART read: 0x18
UART read: 0x0
UART read: 0x0
UART read: 0xe8
UART read: 0xc0
non-slip data  [[24, 0, 0, 232]]
Ack result: 3
Sent ok!
Progress:  0
TX attempt #: 1
UART Write: c0 e3 4e 20 af 04 00 00 00 71 fd a0 42 03 d0 21 1c 22 1c <SNIP> a a3 23 26 f2 c0
UART read: 0xc0
UART read: 0x20
UART read: 0x0
UART read: 0x0
UART read: 0xe0
UART read: 0xc0
non-slip data  [[32, 0, 0, 224]]
Ack result: 4
Sent ok!
Progress:  9
TX attempt#: 1
UART Write: c0 ec 4e 20 a6 04 00 00 00 db dd 00 <SNIP> c1 c0
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
Transmission timeout.
non-slip data  [[]]
Retrying packet send... err = list index out of range
TX attempt #: 2
UART Write: c0 ec 4e 20 a6 04 00 00 00 db dd 00 d0 58 <SNIP>  20 aa c1 c0
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
UARt attempting read...
Parents
  • This is what worked form me in the end:

    Upgraded to SoftDevice 8.0 and SDK 8.1.0

    Used keil to compile: [SDK]\examples\dfu\bootloader\pca10028\dual_bank_serial_s1107

    (I will revisit the GCC version as there was quite a bit going at the time for me, so all maybe ok)

    Upgraded nrfgo-studio from 1.18 to 1.19 (need the nrf utility which creates pacgaes from .bin and .hex files)

    Creating a pacakge and uploading:

    Add to PATH: C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio\nrf_utility

    nrf dfu genpkg app.zip --application %HEX% --application-version 0xffff --dev-revision 0xffff --dev-type 0xffff --sd-req 0x0064

    nrf dfu serial --package app.zip --port COM7 --baudrate 9600

    You may want to remove the baudrate setting, I assumed without hw flowcontrol I'd better use the lowest for testing purposes; in my case, aswell as LED and BUTTON defines I'd modifed the bootloaders hci_transport_config.h :

    HCI_SLIP_UART_MODE APP_UART_FLOW_CONTROL_DISABLED

    HCI_SLIP_UART_BAUDRATE UART_BAUDRATE_BAUDRATE_Baud9600

    USED_BAUD_RATE 9600u

  • I did manage to get this to work with SD7.1.0 and SDK 6.1.0 by using the DFU dual bank version.
    I cant get single bank to work though, which would be really good. Any ideas welcomed, thank you.

Reply Children
No Data
Related