瀏覽代碼

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 年之前
父節點
當前提交
ef5a66806d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/BlueSCSI_platform_RP2040/BlueSCSI_platform.cpp

+ 1 - 1
lib/BlueSCSI_platform_RP2040/BlueSCSI_platform.cpp

@@ -607,7 +607,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.