Преглед на файлове

Fix watch dog timeout

Addressing issue  https://github.com/ZuluSCSI/ZuluSCSI-firmware/issues/350

When implementing a dynamic watchdog setup, a fixed alarm number was
passed instead of the dynamic one. This fixes the issue for
the RP2040 targets. The Earl E Philhower PlatoformIO framework
doesn't use mbed so error reporting hasn't been fully implemented yet.
Morio преди 1 година
родител
ревизия
24a05c1d04
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      lib/ZuluSCSI_platform_RP2040/ZuluSCSI_platform.cpp

+ 1 - 1
lib/ZuluSCSI_platform_RP2040/ZuluSCSI_platform.cpp

@@ -678,7 +678,7 @@ static void watchdog_callback(unsigned alarm_num)
         }
     }
 
-    hardware_alarm_set_target(3, delayed_by_ms(get_absolute_time(), 1000));
+    hardware_alarm_set_target(alarm_num, delayed_by_ms(get_absolute_time(), 1000));
 }
 
 // This function can be used to periodically reset watchdog timer for crash handling.