Hi
Is there any sample code available for Multiple timer implementation using a single HW timer as base ?. For example i will be using same hardware timer for UART TX & RX with divided frequency. This will help when 4 HW timers are running out.
Multiple timers using single hardware timer
Re: Multiple timers using single hardware timer
esp32 is having 4 HW timers. All timers are divided into 2 groups, 2 timers in each group. Each HW timer can have its own independent configuration.
Re: Multiple timers using single hardware timer
Yes! This is a common enough requirement that a high resolution timer abstraction is available in ESP-IDF:
https://docs.espressif.com/projects/esp ... timer.html
There is an example in examples/system/esp_timer directory of ESP-IDF.
Do you mean that you need to use the timer to do something with the UART peripheral, or do you plan to do "software serial"? The latter may not be necessary, the ESP32 has 3 hardware UARTs and each UART can be remapped to any pair of GPIOs. Check out the uart driver for full details.For example i will be using same hardware timer for UART TX & RX with divided frequency. This will help when 4 HW timers are running out.
Re: Multiple timers using single hardware timer
Thank you very much.I was referring examples/peripherals/Timer_group. I was not aware about examples/system/esp_timer. I will look into that. Yes. I am trying to create RX & TX timers for controlling UART interface. It will be good if I can use same HW timer for both.ESP_Angus wrote: ↑Wed Feb 06, 2019 10:05 pmYes! This is a common enough requirement that a high resolution timer abstraction is available in ESP-IDF:
https://docs.espressif.com/projects/esp ... timer.html
There is an example in examples/system/esp_timer directory of ESP-IDF.
Do you mean that you need to use the timer to do something with the UART peripheral, or do you plan to do "software serial"? The latter may not be necessary, the ESP32 has 3 hardware UARTs and each UART can be remapped to any pair of GPIOs. Check out the uart driver for full details.For example i will be using same hardware timer for UART TX & RX with divided frequency. This will help when 4 HW timers are running out.
Re: Multiple timers using single hardware timer
esp_ timer (example/system/esp_timer) is entirely different compared to 64 bit timer group (2 groups with 4 timers) . Is there any sample code available to create multiple timers from any of these 64 bit timers as base ?.
If we are looking on STM32 based chips there are capture/compare registers with each Hardware timers which is helpful for creating multiple timers with different time intervals.Is there any similar registers in ESP32 64 bit timer?
If we are looking on STM32 based chips there are capture/compare registers with each Hardware timers which is helpful for creating multiple timers with different time intervals.Is there any similar registers in ESP32 64 bit timer?
Re: Multiple timers using single hardware timer
Hi ESP_Angus
Any sample code available to create multiple timers from 64 bit timers. ?
Any sample code available to create multiple timers from 64 bit timers. ?
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 105 guests