From a90031dd6c7d20d16a5f4a362f11bab896e7fa70 Mon Sep 17 00:00:00 2001 From: linuswck Date: Thu, 25 Jul 2024 17:32:57 +0800 Subject: [PATCH] ld_pwr_exc_protector: clear irq bit at pwr up --- src/laser_diode/ld_pwr_exc_protector.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/laser_diode/ld_pwr_exc_protector.rs b/src/laser_diode/ld_pwr_exc_protector.rs index 2b2aa8c..114a734 100644 --- a/src/laser_diode/ld_pwr_exc_protector.rs +++ b/src/laser_diode/ld_pwr_exc_protector.rs @@ -212,6 +212,7 @@ impl LdPwrExcProtector { pub fn pwr_on_and_arm_protection() { if let Some(ref mut wdg) = LdPwrExcProtector::get() { wdg.alarm_status = Status::default(); + LdPwrExcProtector::clear_interrupt_bit(); LdPwrExcProtector::pwr_on(); // Interrupt should be enabled after power on to tackle the following edge case: // Pd_Mon pin voltage has already exceed threshold before LD Power is on.