Explorar el Código

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 hace 1 año
padre
commit
24a05c1d04
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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.