How to automate the entrance in bootloader mode on nRF52840 USB dongle?

Dear DEVZONE,

We are working on Nordic nRF58480 USB dongle for Thread activities.

We are using one testbench on which we need to automate with Python scripts reprogramming of the USB dongle with a new firmware.

To this end, we need to reflash the USB dongle; but nRF52480 requires a pression on a small button to enter into bootloader mode, and this is incompatible with automation.

We may find an HW fix to solve this limitation but we are rather wondering whether you have another solution you could propose?

 

We found a DFU trigger library (USB) thread but we did not succeed in exploiting it.

nRF5 SDK v17.0.2: DFU Trigger Library (USB)

 

Similarly, we found this document specifying the Device Firmware Upgrade over USB.

DFU_1.1.doc

 

Could you please support or advise us?

Warm regards

Cedric

Parents
  • Hi Cedric and Tom, 

    Could you please let me know which SDK your application on the dongle is built on ? 
    If your application is on the legacy nRF5 SDK I don't think adding MCUBoot would be the best option as it involve nRF Connect SDK. 

    Putting the nRF52840 dongle to DFU mode is quite simple. During booting up, the bootloader will check for the reset reason and if it's s a pin reset it will enter DFU mode. You can find this code in the bootloader (nrf_bootloader.c):


    So the task for the application is to toggle a GPIO pin that connect externally to the reset pin to trigger a pin reset from the software. This is exactly what the DFU trigger library does. 
    You can find many of our application for the dongle already support this, for example you can switch between the firmware for the NRF52840 dongle for nRF Connect for Desktop -> Bluetooth Low Energy application and nRF Connect for Desktop -> RSSI viewer application without having to press any button. The firmware automatically switch to bootloader mode without any intervention to press any button. 

    We will need to see how you implemented the DFU trigger library and what error you have. You can take a look at the \examples\connectivity\ble_connectivity\pca10059 to see how it's implemented. 

    Or you can simply try a simple test to set BSP_SELF_PINRESET_PIN to 0 in your application code to see if the dongle switch to DFU mode or not (The LED breaths red). This code in nrf_dfu_trigger_usb.c put the chip to DFU mode: 

  • Hi again, 
    I got noticed about the constrain Robin mentioned: 

    Robin D. said:
    without making any modification to the firmware we are flashing on the dongle (we use the firmware provided with the Thread Test Harness so we can't modify it).

    Could you explain a little bit more on this ? Is the firmware a precompiled hex file ? Any chance to recompile this ? 

Reply
  • Hi again, 
    I got noticed about the constrain Robin mentioned: 

    Robin D. said:
    without making any modification to the firmware we are flashing on the dongle (we use the firmware provided with the Thread Test Harness so we can't modify it).

    Could you explain a little bit more on this ? Is the firmware a precompiled hex file ? Any chance to recompile this ? 

Children
Related