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

Jumping to Bootloader from the Application

How can I jump to the bootloader from the application without anything BLE related. Possibly through a botton?

I'm on the newest SDK v11.

Parents
  • Many ways. You could just make the button reset the system and then have that button be the same one which triggers the bootloader to enter DFU mode, press the button and hold it for long enough the bootloader sees it, that doesn't even require any code change in the loader.

    I added a few lines of code to the start of the bootloader to force it into DFU mode if a given value is written to GPREGRET. That works too, I have a standard control service which uses BLE to receive an enter DFU command, writes GPREGRET and resets, then it goes into DFU mode. I found this preferable to the method in the manual which bounces between the two, it's clever, but more than I needed. This way I can quite easily force myself into bootloader mode with either a button or a command over my BLE command channel.

Reply
  • Many ways. You could just make the button reset the system and then have that button be the same one which triggers the bootloader to enter DFU mode, press the button and hold it for long enough the bootloader sees it, that doesn't even require any code change in the loader.

    I added a few lines of code to the start of the bootloader to force it into DFU mode if a given value is written to GPREGRET. That works too, I have a standard control service which uses BLE to receive an enter DFU command, writes GPREGRET and resets, then it goes into DFU mode. I found this preferable to the method in the manual which bounces between the two, it's clever, but more than I needed. This way I can quite easily force myself into bootloader mode with either a button or a command over my BLE command channel.

Children
No Data
Related