Skip to content

Commit ffa84d1

Browse files
committed
Watchdog: OTA, Remove mbed_watchdog_trigger_reset Hack to trigger board reset
1 parent dd4c09d commit ffa84d1

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

src/ota/implementation/OTANanoRP2040.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ OTACloudProcessInterface::State NANO_RP2040OTACloudProcess::flashOTA() {
8383
}
8484

8585
OTACloudProcessInterface::State NANO_RP2040OTACloudProcess::reboot() {
86-
mbed_watchdog_trigger_reset();
87-
/* If watchdog is enabled we should not reach this point */
8886
NVIC_SystemReset();
8987

9088
return Resume; // This won't ever be reached

src/utility/watchdog/Watchdog.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,6 @@ static void mbed_watchdog_enable_network_feed(NetworkAdapter ni)
131131
#endif
132132
}
133133
}
134-
135-
void mbed_watchdog_trigger_reset()
136-
{
137-
watchdog_config_t cfg;
138-
cfg.timeout_ms = 1;
139-
140-
if (hal_watchdog_init(&cfg) == WATCHDOG_STATUS_OK) {
141-
is_watchdog_enabled = true;
142-
while(1){}
143-
}
144-
else {
145-
DEBUG_WARNING("%s: watchdog could not be reconfigured", __FUNCTION__);
146-
}
147-
148-
}
149134
#endif /* ARDUINO_ARCH_MBED */
150135

151136
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)

src/utility/watchdog/Watchdog.h

-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,4 @@ void watchdog_reset();
3434
void watchdog_enable_network_feed(NetworkAdapter ni);
3535
#endif /* (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED) */
3636

37-
#ifdef ARDUINO_ARCH_MBED
38-
void mbed_watchdog_trigger_reset();
39-
#endif /* ARDUINO_ARCH_MBED */
40-
4137
#endif /* ARDUINO_AIOTC_UTILITY_WATCHDOG_H_ */

0 commit comments

Comments
 (0)