Esp32 timer issue

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
mnfisher
Valued Contributor
Posts: 1518
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 729 times

Esp32 timer issue

Post 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 293 times
Martin

BenR
Matrix Staff
Posts: 1936
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: Esp32 timer issue

Post by BenR »

Hi Martin,

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

Post Reply