You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Hi @manitou48
the analogRead is know to not be optimized as we it init, calibrate, start, wait conversion and stop each time it is called.
That's why there is an #5 to produce a better ADC usage.
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
The text was updated successfully, but these errors were encountered: