1
0
Fork 0

ld: Add a delay before turning on LD PWR

- DAC output might not drop to 0V before PWR is being turned on
- Thus, it might drive nondeterministic current into the laser diode during pwr up
This commit is contained in:
linuswck 2024-03-20 17:24:29 +08:00
parent 7f06fc06fd
commit 607da8a822
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ impl LdDrive{
let prev_i_set = self.settings.ld_drive_current;
LdCurrentOutCtrlTimer::reset();
let _ = self.ctrl.set_i(ElectricCurrent::new::<milliampere>(0.0), Settings::LD_DRIVE_TRANSIMPEDANCE, Settings::DAC_OUT_V_MAX);
// Wait for the DAC to reset its voltage back to 0V
sleep(10);
LdPwrExcProtector::pwr_on_and_arm_protection();
// Wait for LD Power Supply to start up before driving current to laser diode
sleep(30);