stm32-rs / stm32f4xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F4 family
BSD Zero Clause License
532 stars 206 forks source link

CountDown lasting over one second? #235

Open AlyoshaVasilieva opened 3 years ago

AlyoshaVasilieva commented 3 years ago

I'm writing an embedded-hal driver for interfacing with Espressif ESP-AT firmware over UART. ESP-AT in some circumstances will cease responding to commands, so I need a timeout in my driver to know when something has gone wrong. But ESP-AT deals with wifi and HTTP, so some commands can take over one second to send any response. The timers in this HAL only support 1Hz at the slowest. Is this a HAL or hardware limitation?

David-OConnor commented 3 years ago

HAL limitation. Patch the HAL, or use raw pointers to set the ARR and PSC registers of the timer you're using.