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
What is the proper way to use a timer?
Re: What is the proper way to use a timer?
well, but there is also https://github.com/espressif/esp-idf/tr ... /esp_timer
And what i is the difference, i'm not sure...
All im trying to achieve is to have an alarm raised without invoking an interrupt.
And what i is the difference, i'm not sure...
All im trying to achieve is to have an alarm raised without invoking an interrupt.
Re: What is the proper way to use a timer?
In the link you provided does not work off IRQ's. So if that is what you want you found it.
Re: What is the proper way to use a timer?
https://docs.espressif.com/projects/esp ... timer.html
Although FreeRTOS provides software timers, these timers have a few limitations:
Maximum resolution is equal to RTOS tick period
Timer callbacks are dispatched from a low-priority task
Hardware timers are free from both of the limitations, but often they are less convenient to use. For example, application components may need timer events to fire at certain times in the future, but the hardware timer only contains one “compare” value used for interrupt generation. This means that some facility needs to be built on top of the hardware timer to manage the list of pending events can dispatch the callbacks for these events as corresponding hardware interrupts happen.
Re: What is the proper way to use a timer?
Mr_Red wrote: ↑Mon Oct 07, 2019 2:06 pmhttps://docs.espressif.com/projects/esp ... timer.htmlAlthough FreeRTOS provides software timers, these timers have a few limitations:
Maximum resolution is equal to RTOS tick period
Timer callbacks are dispatched from a low-priority task
Hardware timers are free from both of the limitations, but often they are less convenient to use. For example, application components may need timer events to fire at certain times in the future, but the hardware timer only contains one “compare” value used for interrupt generation. This means that some facility needs to be built on top of the hardware timer to manage the list of pending events can dispatch the callbacks for these events as corresponding hardware interrupts happen.
Oh.. thank you Mr_Red.. RTFM to me! //embarrassed
Who is online
Users browsing this forum: No registered users and 89 guests