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

Advertising after DFU

My application implements a beacon with services, and a buttonless BLE bootloader.

The application can start the bootloader in two ways.

The first method is executed locally.

#define BOOTLOADER_DFU_START 0xB1
sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
NVIC_SystemReset();

For the second method, a remote device starts the bootloader using the buttonless DFU service.

After the update is complete, the bootloader jumps to the updated application.

If the application is updated with the first method, the beacon is advertised correctly.

If the application is updated with the second method, the beacon stop stops advertising until I perform a system reset or power cycle on the board.

How can I make advertising work correctly without forcing a device reset?

  • This gets more confusing.

    I stripped out all unnecessary code, and the problem remains.

    It is running on the nRF52840 DK board and I am looking at the disconnect/connect issue, ignoring DFU for now.

    The last code I want to remove is for USB. The application requires a USB UART. If I do not initialize USB prior to initializing the softdevice, the function nrf_sdh_enable_request() will fail.

Related