This example uses the timer group driver to generate timer interrupts at two specified alarm intervals.
Run idf.py -p PORT flash monitor to build, flash and monitor the project.
(To exit the serial monitor, type Ctrl-].)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
Timer Group with auto reload
Group[0], timer[0] alarm event
------- EVENT TIME --------
Counter: 0x0000000000000008
Time : 0.00000160 s
-------- TASK TIME --------
Counter: 0x0000000000004ed8
Time : 0.00403680 s
Timer Group without auto reload
Group[1], timer[0] alarm event
------- EVENT TIME --------
Counter: 0x00000000017d7848
Time : 5.00000160 s
-------- TASK TIME --------
Counter: 0x00000000017dcb32
Time : 5.00424680 s
Timer Group with auto reload
Group[0], timer[0] alarm event
------- EVENT TIME --------
Counter: 0x0000000000000008
Time : 0.00000160 s
-------- TASK TIME --------
Counter: 0x0000000000004dd4
Time : 0.00398480 s
For any technical queries, please open an issue on GitHub. We will get back to you soon.