Page 1 of 1

esp32 get time with nanoseconds precision

Posted: Thu Feb 28, 2019 8:34 pm
by akashdeepsingh
Hi,

I am looking for a way to get the time since boot with nanoseconds precision. Currently, the best I can do is esp_timer_get_time() which returns time with microsecond precision. I connected my board to an oscilloscope and found out that it takes around 1.29 us for the esp_timer_get_time() function to return time. Can I do better and with higher precision.

Re: esp32 get time with nanoseconds precision

Posted: Fri Mar 01, 2019 1:20 am
by WiFive
At 240mhz cpu tick is 4ns so you can check ccount or portGET_RUN_TIME_COUNTER_VALUE