[nrf52] set WDT timeout to 30sec for Adafruit bootloader (#19596)

Co-authored-by: J. Nick Koston <nick+github@koston.org>
This commit is contained in:
tomaszduda23
2026-09-25 06:00:33 +02:00
committed by GitHub
co-authored by J. Nick Koston
parent 4a2f17bc8b
commit 8db901cbfc
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -28,6 +28,7 @@ void DeviceFirmwareUpdate::setup() {
this->reset_pin_->digital_write(true);
} else {
NRF_POWER->GPREGRET = DFU_MAGIC_UF2_RESET;
arch_feed_wdt();
App.reboot();
}
}
+5 -1
View File
@@ -27,7 +27,11 @@ void arch_init() {
if (device_is_ready(WDT)) {
static wdt_timeout_cfg wdt_config{};
wdt_config.flags = WDT_FLAG_RESET_SOC;
#ifdef USE_ZIGBEE
#ifndef USE_BOOTLOADER_MCUBOOT
// Adafruit bootloader doesn't feed the WDT while
// erasing flash during a firmware update, so a shorter timeout can break the update.
wdt_config.window.max = 30000;
#elif defined(USE_ZIGBEE)
// zboss thread uses a lot of CPU cycles during startup
wdt_config.window.max = 10000;
#else