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

Buttonless BLE DFU with non-ble apps.

Hi, I am developing an IMU app communication with ESB.  I would like to send to the board a command with ESB to put the nrf52832 board in BLE DFU mode.  

I have look at the different methods for entering in DFU mode :

NRF_BL_DFU_ENTER_METHOD_BUTTON

NRF_BL_DFU_ENTER_METHOD_PINRESET

NRF_BL_DFU_ENTER_METHOD_GPREGRET

NRF_BL_DFU_ENTER_METHOD_BUTTONLESS

I understand the BLE buttonless DFU exemple with the method NRF_BL_DFU_ENTER_METHOD_GPREGRET but I but seems to depend on a lot of BLE and SDH related files.

Might be wrong but the  NRF_BL_DFU_ENTER_METHOD_BUTTONLESS seems the simplest but I could not finding any exemples of code to add in my program.

I have read all the DFU / SDK document and post related to this topic, without finding the answer.

Could you please point me in the wright direction.

Thanks 

Parents
  • Hi,

    You don't have to port everything from the BLE buttonless example to make this work. All that it's required is really to update the GREPREGRET register with the 'BOOTLOADER_DFU_START' value, then do a reboot by calling NVIC_SystemReset()

    Something like this:

    //Call this when receiving dfu stat command from ESB,etc.

    enter_dfu_mode()

    {

    NRF_POWER->GREPREGRET =  BOOTLOADER_DFU_START

    NVIC_SystemReset();

    }

Reply
  • Hi,

    You don't have to port everything from the BLE buttonless example to make this work. All that it's required is really to update the GREPREGRET register with the 'BOOTLOADER_DFU_START' value, then do a reboot by calling NVIC_SystemReset()

    Something like this:

    //Call this when receiving dfu stat command from ESB,etc.

    enter_dfu_mode()

    {

    NRF_POWER->GREPREGRET =  BOOTLOADER_DFU_START

    NVIC_SystemReset();

    }

Children
Related