Finding timers on ESP32 WROOM 32

benedito821
Posts: 15
Joined: Fri Mar 19, 2021 9:58 pm

Finding timers on ESP32 WROOM 32

Postby benedito821 » Sat Sep 16, 2023 5:46 pm

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?

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Finding timers on ESP32 WROOM 32

Postby ESP_Sprite » Sun Sep 17, 2023 5:16 am

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.

benedito821
Posts: 15
Joined: Fri Mar 19, 2021 9:58 pm

Re: Finding timers on ESP32 WROOM 32

Postby benedito821 » Sun Sep 17, 2023 6:22 am

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.

MicroController
Posts: 1735
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Finding timers on ESP32 WROOM 32

Postby MicroController » 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.)

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: Finding timers on ESP32 WROOM 32

Postby bidrohini » Tue Sep 19, 2023 8:44 am

Is it applicable to all ESP32 modules?
https://docs.espressif.com/projects/esp ... timer.html

benedito821
Posts: 15
Joined: Fri Mar 19, 2021 9:58 pm

Re: Finding timers on ESP32 WROOM 32

Postby benedito821 » Tue Sep 19, 2023 9:22 am

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.

Who is online

Users browsing this forum: Google [Bot] and 106 guests