Closed
Description
on STM32F405, analogRead() takes 50 us. On many other MCU's, analogRead() takes 5 us.
The datasheet says ADC stabilization time is 3 us, but in HAL_ADC_Start() in
system/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.c
the while/counter stabilization delay is taking 37 us??
maybe a better delay loop would be
while(counter--) asm("nop");
that loop takes about 3 cycles per iteration