소스 검색

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.