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

Secure UART DFU: Sending packets using TTL Cable

Hi,

In the process of testing DFU on the hardware, I am trying to send the DFU Packets through a TTL Cable to a different pins(P0.02, P0.03. No HWFC) instead of sending them from onboard J-Link. Here's what I did:

  1. In the "Project ‘secure_bootloader_uart_mbr_pca10056’" project, I updated the UART Tx and Rx pin definitions in "nrf_dfu_serial_uart.c -> uart_dfu_transport_init()"
  2. Merged this hex file with Settings, MBR and Application hex files and flashed the same onto the board. The board bootsup as expected.
  3. Created the Zip file for application.
  4. Send the DFU packets using 
    nrfutil dfu serial -pkg PD52840V1R3_PA_Secure.zip -p COM4
    where COM4 is the TTL Cable COM port.

No matter what I do, i could never send the packets through the TTL cable. However, everything's working fine using the JLink.

This post explains that I will need to update the nRFUtil as well. But, I don't know how. Can you please help me update the nRFUtil and Compile it in a way I can test the DFU on the custom board?

Thanks

  • Hi,

    No matter what I do, i could never send the packets through the TTL cable. However, everything's working fine using the JLink.

    This means that it works using the USB bridge in the onboard J-Link debugger? If so that indicate that the SW is good so we should look at the HW configuration:

    • Are you using the same UART pins with the JLink and your other UART cable?
      • If not, have you configured the correct UART pins in the bootloader?
    • Have you made sure you use correct voltage on the UART signals? As with any other GPIO the high level should be same as VDD.
    This post explains that I will need to update the nRFUtil as well. But, I don't know how. Can you please help me update the nRFUtil and Compile it in a way I can test the DFU on the custom board?

    This is an old post which I do not think is relevant? In any case the simplest way to get the most recent nrfutil version is to ensure you have Python 3 installed on your computer an call "pip3 install -U nrfutil"

  • Hi,

    Here's my response:

    This means that it works using the USB bridge in the onboard J-Link debugger? If so that indicate that the SW is good so we should look at the HW configuration:

    Yes. Everything's working great with USB Bridge in the J-Link Debugger.

    Are you using the same UART pins with the JLink and your other UART cable?

    Nope. But, I updated the pins in the "Project ‘secure_bootloader_uart_mbr_pca10056’" project, I updated the UART Tx and Rx pin definitions in "nrf_dfu_serial_uart.c -> uart_dfu_transport_init()"

    Have you made sure you use correct voltage on the UART signals? As with any other GPIO the high level should be same as VDD.

    Ofcourse. It's a 3.3V UART and I connected common GND beween the DK and TTL Cable.

    This post explains that I will need to update the nRFUtil as well. But, I don't know how. Can you please help me update the nRFUtil and Compile it in a way I can test the DFU on the custom board?

    What I meant there is: I have exactly the same problem and for the most part, setup. We both don't have HWFC enabled and the upgrade process never started. For me it looks like the nRFUtil is just stuck after command and is not outputting anything at all.

  • Hi,

    I see. Then the basics should be in place. I just double checked your nrfutil command and saw a key point I did not notice before. You have not specified that it should not use flow control, and flow control is enabled by default. So you must add "-fc 0" to your nrfutil command.

  • Bingo!

    Modifying command to:

    nrfutil dfu serial -pkg PD52840V1R3_PA_Secure.zip -p COM4 -fc 0
     fixed it! Thanks a ton!

Related