esp32c3 Unable to do any timing faster than 1ms #52598
Labels
area: Timer
Timer
bug
The issue is a bug, or the PR is fixing a bug
platform: ESP32
Espressif ESP32
priority: low
Low impact/importance bug
Trying to use any of the kernel timing functions for anything less than 1ms does not work on the ESP32-C3. I would have thought I just need to increase the
CONFIG_SYS_CLOCK_TICKS_PER_SEC
to10000
to get 100us ticks. But this doesn't work.I have tried various combinations of
CONFIG_SYS_CLOCK_TICKS_PER_SEC
andCONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
. But it always ends up wrong/very innacurate.To be specific, sometimes 100us delay would be closer to 250us. Or sometimes 100us delay would be 10ms. But I could never get 100us to equal 100us.
Is it possible to do any real-time scheduling in the tens or hundreds of microseconds? Perhaps, I am missing something but 1ms (1kHz) seems a bit slow to be the timing limit for a 160MHz processor.
Thanks,
The text was updated successfully, but these errors were encountered: