This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

How do you voluntarily switch between BLE NUS/DFU service?

My question is while the application is running, how can I disable the NUS service to turn on the DFU service. This idea stems from this question: devzone.nordicsemi.com/.../

The accepted answer involves switching between the two services but there is no explanation of how this is done. I see in one of the comments there is something about setting NRF_POWER->GPREGRET = BOOTLOADER_DFU_START but there seems to be more to fixing the problem.

I would like to have the application start in NUS, and then switch over to DFU when it receives a command (via UART). Then after the DFU upload process happens, the device resumes default NUS mode.

Thank you.

Related