What is the proper way to use a timer?
Posted: Wed Oct 02, 2019 3:26 am
Hello,
i want to perform a series of steps after a timer reached a certain value.
the documentation (https://docs.espressif.com/projects/esp ... api-alarms) states:
"...
After the alarm is enabled and the timer reaches the alarm value, depending on configuration, the following two actions may happen:
An interrupt will be triggered, if previously configured. See section Interrupts how to configure interrupts.
When auto_reload is enabled, the timer’s counter will be reloaded to start counting from specific initial value. The value to start should be set in advance with timer_set_counter_value().
"
Does it mean that the only way for me to detect the timer reaching a preset value, is through the interrupt triggered by an alarm?
And, if this assumption is correct, is it proper to call xEventGroupSetBitsFromISR from said alarm?
Thank you
i want to perform a series of steps after a timer reached a certain value.
the documentation (https://docs.espressif.com/projects/esp ... api-alarms) states:
"...
After the alarm is enabled and the timer reaches the alarm value, depending on configuration, the following two actions may happen:
An interrupt will be triggered, if previously configured. See section Interrupts how to configure interrupts.
When auto_reload is enabled, the timer’s counter will be reloaded to start counting from specific initial value. The value to start should be set in advance with timer_set_counter_value().
"
Does it mean that the only way for me to detect the timer reaching a preset value, is through the interrupt triggered by an alarm?
And, if this assumption is correct, is it proper to call xEventGroupSetBitsFromISR from said alarm?
Thank you