Hi,
I'm using esp-idf and would like to create a simple timer with the following properties:
* Should run for 1sec
* Should not generate interrupts
* I will check periodically if the timer has finished
* I'd like to use a hardware timer if possible
* If the timer finished and I check for it I will restart it manually
I've started looking around and tinkering with the example over on GitHub but I was not able to produce anything working.
Does somebody know an example matching my needs?
Hardware Timer
-
- Posts: 9724
- Joined: Thu Nov 26, 2015 4:08 am
Re: Hardware Timer
What is your use case? Depending on the need for precision, you may not even need a timer but can just check esp_timer_get_time() and wait until the result is 1e6 higher than when you first checked it.
Re: Hardware Timer
Yes, using esp_timer_get_time() is a great solution.
Thanks!
Thanks!
Who is online
Users browsing this forum: No registered users and 110 guests