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

nRF52382 returning to broadcast from DFU/Bootloader mode before preforming OTA application update

Hi,

I am working with the nRF52832 development board and am running SDK 13.1.0 and SoftDevice 212 4.0.2. I have flashed a modified version of the broadcast example onto my board along with the SoftDevice as specified and the proper DFU/Bootloader. When I put my device in DFU/Bootloader mode using the buttons on the board, I am able to preform an OTA application update fine. However, when I tried to put my device in DFU/Bootloader mode without using the buttons on the board, I am having some issues. I added this code within the RX part of the switch statement within ant_evt_dispatch() in the main file of the broadcast example in order to put my device into DFU/Bootloader mode when sending an Ack message command flag via ANTwareII.

if (p_message->ANT_MESSAGE_aucPayload[0] == 105u) {
	// Put into bootloader mode  
	NRF_POWER->GPREGRET = BOOTLOADER_DFU_START;
	NVIC_SystemReset();
}

When I send the Ack message via ANTwareII, my device does enter bootloader mode, but quickly returns to my application and begins to broadcast again. I've tried manipulating the constants within sdkconfig.h, such as ANTFS_CONFIG_PAIRING_TIMEOUT, and this does not solve the problem. I need my device to stay in DFU/Bootloader mode long enough to preform an OTA application update and then return to my application and begin broadcasting again. Please help!

Update: I solved the issue. My device was not going into DFU/Bootloader mode to begin with. It was simply just restarting which is why it returned to broadcasting immediately. Once I added a check for the NRF_POWER->GPREGRET flag being set to BOOTLOADER_DFU_START within the DFU/Bootloader example, it worked. Oops.

Parents Reply Children
No Data
Related