Entering Serial DFU mode from the application layer in nrf52840 dk board

Hi All,

I am trying  to implement UART SERIAL Bootloader for my device and I just need to perform DFU using uart serial without pressing BUTTON 1 and RESET buttons in nrf52840 dk board

My query is Without pressing BUTTON_1 and Power RESET how to enter to DFU mode from the application layer.

~Thanks

Parents Reply
  • Hi, 

    You can enable NRF_BL_DFU_ENTER_METHOD_GPREGRET in the sdk_config.h, and write the special value in the retention register GPREGRET register a flag (BOOTLOADER_DFU_START = 0xB1)  in the application and then do a soft reset (NVIC_SystemReset) to switch. 

    Since the retention register keeps its value after the reset, the bootloader will check this value when it boots up after the reset and then can enter DFU mode instead of starting the normal application. This is the same as when we hold the Bootloader button and trigger a reset.

    Regards,
    Amanda

Children
No Data
Related