Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/sdk11/components/libraries/bootloader_dfu/bootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ static void wait_for_events(void)
// uint32_t err_code = sd_app_evt_wait();
// APP_ERROR_CHECK(err_code);

#ifdef SOFTWARE_RESET_BUTTON
if (button_pressed(SOFTWARE_RESET_BUTTON)) {
while(button_pressed(SOFTWARE_RESET_BUTTON)) { NRFX_DELAY_MS(10); }
NVIC_SystemReset();
}
#endif

// Feed all Watchdog just in case application enable it
// WDT cannot be disabled once started. It even last through NVIC soft reset
if ( nrf_wdt_started(NRF_WDT) )
Expand Down
3 changes: 3 additions & 0 deletions src/boards/boards.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ void board_init(void)

button_init(BUTTON_DFU);
button_init(BUTTON_FRESET);
#ifdef SOFTWARE_RESET_BUTTON
button_init(SOFTWARE_RESET_BUTTON);
#endif
NRFX_DELAY_US(100); // wait for the pin state is stable

#if LEDS_NUMBER > 0
Expand Down