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

Secure Serial DFU: 2 UARTEs in Application

Dear,

I am trying to get secure serial DFU working on our custom board, which is connected to another controller through 2x UART(P0.02, P0.03, P0.30, P0.31) without HWFC. The secondary controller will recive the DFU packets from computer and shall send the same to nRF52840 over P0.02(Rx to nRF) and P0.03(Tx from nRF).

Setup

I merged all the files(BL, BL Settings, MBR, Application) and flashed the same on the nRF52840-DK. Application is booting-up as expected and working the way it should.

UARTE Initialisation

//B2B Communication UART
NRF_LIBUARTE_ASYNC_DEFINE(B2BUARTE0, 1, 0, 0, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3);
NRF_QUEUE_DEF(B2BUARTE0RxBuffer, UARTE0RxBufferQueue, 4, NRF_QUEUE_MODE_NO_OVERFLOW);

//External Data UART
NRF_LIBUARTE_ASYNC_DEFINE(externalDataUARTE1, 0, 1, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 2, 1024, 3);
NRF_QUEUE_DEF(externalDataUARTE1RxBuffer, dataUARTE1RxBufferQueue, 4, NRF_QUEUE_MODE_NO_OVERFLOW);

The problem

When I try to perform the secure DFU from nRFUtil using:

nrfutil dfu serial -pkg secureDFUTest.zip -p COM3

I am getting an error saying "No ping response after opening the COM port". I suspect this is because UARTs are initialised in the application and DFU is trying to use the same UART. Please correct me if I am wrong here.

Can you please tell me a way to do the DFU using one of the UARTs connected to the secondary controller(STM32)?

Parents
  • Hi,

    I am sorry for the late reply.

    Did you have any progress on this?

    If not, I would say that generally it should not be a problem no matter what you do in the application before, as there is a reset before the bootloader. But you must put the device in DFU mode first. It is not clear to me if the application is still running on your device or if it has been reset and the bootloader entered DFU mode? Can you confirm?

Reply
  • Hi,

    I am sorry for the late reply.

    Did you have any progress on this?

    If not, I would say that generally it should not be a problem no matter what you do in the application before, as there is a reset before the bootloader. But you must put the device in DFU mode first. It is not clear to me if the application is still running on your device or if it has been reset and the bootloader entered DFU mode? Can you confirm?

Children
Related