Skip to content

analogRead() slow on STM32F405 #782

Closed
@manitou48

Description

@manitou48

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions