Page 1 of 1

Finding timers on ESP32 WROOM 32

Posted: Sat Sep 16, 2023 5:46 pm
by benedito821
Hello, I've got the ESP32-WROOM-32 datasheet and trying to figure out on which pins the timers channels are connected to (as I was used to on ST devices ) , but I can't even find out the word timer on the datasheet. Is it called differently on ESP chips?

Re: Finding timers on ESP32 WROOM 32

Posted: Sun Sep 17, 2023 5:16 am
by ESP_Sprite
You probably want the ESP32 TRM. Note that the timers in the ESP32 are just that: timers which can generate an interrupt at some time, they don't have external signals. You probably want other peripherals (MCPWM, RMT, LEDC) to do whatever it is you need to do.

Re: Finding timers on ESP32 WROOM 32

Posted: Sun Sep 17, 2023 6:22 am
by benedito821
I'm trying to use LEDC to get some PWM to drive an LED but it seems not working.
On the datasheet I see that GPIO2 supports ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0,
SD_DATA0 - nothing similar to a TRM or MCPWM.

Re: Finding timers on ESP32 WROOM 32

Posted: Sun Sep 17, 2023 11:36 am
by MicroController
The datasheet doesn't explicitly name all possible functions for all IO pins, because most peripherals can be routed to almost any IO pin.
Use ledc_channel_config() to select an IO pin that is convenient for you.

(Btw, "TRM" is short for the "Technical Reference Manual". The datasheets are basically only a list of the most significant features, while the TRMs contain the actual documentation of the ESPs.)

Re: Finding timers on ESP32 WROOM 32

Posted: Tue Sep 19, 2023 8:44 am
by bidrohini
Is it applicable to all ESP32 modules?
https://docs.espressif.com/projects/esp ... timer.html

Re: Finding timers on ESP32 WROOM 32

Posted: Tue Sep 19, 2023 9:22 am
by benedito821
MicroController wrote:
Sun Sep 17, 2023 11:36 am
The datasheet doesn't explicitly name all possible functions for all IO pins, because most peripherals can be routed to almost any IO pin.
Use ledc_channel_config() to select an IO pin that is convenient for you.

(Btw, "TRM" is short for the "Technical Reference Manual". The datasheets are basically only a list of the most significant features, while the TRMs contain the actual documentation of the ESPs.)

I got it to work. Just found out which GPIO the user LED is tied to and took a look at the LEDC documentation. It was not that intuitive that the timer output can be driven to any pin 🙂. Thank you for your answers.