1
0
Fork 0

ld_pwr_exc_protector: set smpr to be slowest

- reduce noise on the analog watchdog
This commit is contained in:
linuswck 2024-06-13 15:37:41 +08:00
parent c09da0db98
commit 83a764889c
1 changed files with 4 additions and 3 deletions

View File

@ -125,9 +125,10 @@ impl LdPwrExcProtector {
});
// Set the Conversion Sequence to include Pd Mon Pin
pac_adc.sqr3.write(|w| w.sq1().variant(PD_MON_ADC_CH_ID));
// Set all sampling channels to have fastest sampling interval
pac_adc.smpr1.reset();
pac_adc.smpr2.reset();
// Set all sampling channels to have slowest sampling interval
pac_adc.smpr1.write(|w| unsafe { w.bits(0xFFFF) });
pac_adc.smpr2.write(|w| unsafe { w.bits(0xFFFF) });
// Set the higher threshold to be max value initially
pac_adc.htr.write(|w| w.ht().variant(MAX_SAMPLE));