stm32: fix adc f3 startup time

closes #1888.
This commit is contained in:
xoviat 2023-09-15 17:36:21 -05:00
parent c28a6bdd0b
commit aa2fa29b89

View File

@ -50,7 +50,7 @@ impl<'d, T: Instance> Adc<'d, T> {
while T::regs().cr().read().adcal() {} while T::regs().cr().read().adcal() {}
// Wait more than 4 clock cycles after adcal is cleared (RM0364 p. 223) // Wait more than 4 clock cycles after adcal is cleared (RM0364 p. 223)
delay.delay_us(6 * 1_000_000 / Self::freq().0); delay.delay_us(1 + (6 * 1_000_000 / Self::freq().0));
// Enable the adc // Enable the adc
T::regs().cr().modify(|w| w.set_aden(true)); T::regs().cr().modify(|w| w.set_aden(true));