Page 1 of 1

Esp32 timer issue

Posted: Wed Jul 31, 2024 6:44 pm
by mnfisher
Using the timer component on esp32.

GetRawCount ("gets instruction count") actually returns number of default time units (so for a standard timer on timer 0 - this is 1ms units)

It is possible to get the instruction count using xthal_get_ccount() in a code macro. This increments and about 240MHz (on my esp32 with a 1s delay I got 239971173 counts)
I wanted to check if >1us had passed since previous interrupt (so count >= 240)..
Timer.fcfx
(13.42 KiB) Downloaded 311 times
Martin

Re: Esp32 timer issue

Posted: Wed Aug 07, 2024 1:02 pm
by BenR
Hi Martin,

Ooh thanks I'll see if we can use this function instead, that would be much better.