File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
software/firmware/source/SoftRF/src/platform Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 3434#include " ../protocol/data/D1090.h"
3535
3636#include < ArduinoLowPower.h>
37+ #include < WatchdogTimer.h>
3738
3839// SX127x pin mapping
3940lmic_pinmap lmic_pins = {
@@ -285,6 +286,10 @@ static unsigned long rx_led_time_marker = 0;
285286
286287static void EFR32_loop ()
287288{
289+ if (wdt_is_active) {
290+ WatchdogTimer.feed ();
291+ }
292+
288293#if SOC_GPIO_RADIO_LED_TX != SOC_UNUSED_PIN
289294 if (digitalRead (SOC_GPIO_RADIO_LED_TX) != LED_STATE_ON) {
290295 if (tx_packets_counter != prev_tx_packets_counter) {
@@ -586,12 +591,17 @@ static void EFR32_UATModule_restart()
586591
587592static void EFR32_WDT_setup ()
588593{
589- /* TBD */
594+ WatchdogTimer.begin (WDOG_PERIOD_8_S);
595+ wdt_is_active = true ;
590596}
591597
592598static void EFR32_WDT_fini ()
593599{
594- /* TBD */
600+ if (wdt_is_active) {
601+ WatchdogTimer.setWatchdogOffWhileSleeping (true );
602+ WatchdogTimer.end ();
603+ wdt_is_active = false ;
604+ }
595605}
596606
597607#if SOC_GPIO_PIN_BUTTON != SOC_UNUSED_PIN
You can’t perform that action at this time.
0 commit comments