This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Openthread: USB DFU Trigger library with Fanstel USB840F dongle

Hello,

I am currently using Fanstel dongle, where I am trying to trigger the USB DFU with nrf connect programmer (buttonless). The example which is provided works on the nrf52840 dongle but the same does not on Fanstel dongle because of different pin config on Fanstel. I am not able to trigger it with just changing the BSP_SELF_PINRESET_PIN (from 19 to 18). 

The application builds and runs on the Fanstel dongle but when I choose the device it does not send the device to DFU mode but gets stuck here,

11:17:07.112
Using nrf-device-lib-js version: 0.4.5
11:17:07.112
Using nrf-device-lib version: 0.11.0
11:17:07.112
Using nrfjprog DLL version: 10.15.1
11:17:07.113
Using JLink version: JLink_V7.64e
11:17:07.113
Installed JLink version does not match the provided version (V7.58b)
11:17:29.573
Using @nordicsemiconductor/nrf-device-lib-js to communicate with target via USB SDFU protocol

I exactly do not know how to move forward with it. I have tried many solutions provided here. I am using the OpenThread module (ot-nrf528xx). 

Kind regards,

Tushar Diggewadi

Parents Reply Children
  • Thank you for the information. I am working on the Thread protocol without a softdevice. Will this work for it? And even if I get into the bootloader, how will I get out of it if there was any firmware update done?

  • Yes, GPREGRET is a HW registers and it is one of the supported bootloader enter methods in the serial bootloaders we provide (UART/USB).

    Typically, there is a timeout in the bootloader (NRF_BL_DFU_INACTIVITY_TIMEOUT_MS), that it will reset/jump to the application if no DFU process is started.

  • I think I understand it better now. One last question, Should I define this macro in app_config.h and call the functions related in my firmware application or make changes in the bootloader application? (Currently I am using the open bootloader from the examples. (\nrf5sdkforthreadv41\examples\dfu\open_bootloader\pca10059_usb)

  • You need to enable the GPREGRET enter method in the bootloader's sdk_config.h file, and you need to modify your application to write the GPREGRET register with the correct value (for instance based on the USB event), before resetting the chip.

  • I was able to enable GPREGRET enter method and rebuild bootloader and flash it onto the dongle. I have the default mbr 

    The created bootloader is 

    At start as I do not have the application flashed it re enters the bootloader every 15 seconds. (as I have set #define NRF_BL_DFU_INACTIVITY_TIMEOUT_MS 15000)

    In my application main.c, I added this function and call it in main()

    void otSysDfuMode(void)
    {
        #define BOOTLOADER_DFU_GPREGRET                 (0xB0)      
        #define BOOTLOADER_DFU_START_BIT_MASK           (0x01)  
        #define BOOTLOADER_DFU_START    (BOOTLOADER_DFU_GPREGRET | BOOTLOADER_DFU_START_BIT_MASK)      
        sd_power_gpregret_clr(0,0xffffffff);
        sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
        NVIC_SystemReset();
    }

    But now nothing is running on the device. I cannot see the COM port. I am a bit confused on this part.

    It would be really helpful if you could guide me with this in detail. 

    Kind regards,

    Tushar

Related