← index #16573PR #7817
Related · high · value 2.334
QUERY · ISSUE

docs: ESP32 C3 and C6 has only 2 Timers (0 and 2)

openby dmoibmopened 2025-01-12updated 2025-02-20
port-esp32

Documentation URL

https://docs.micropython.org/en/latest/esp32/quickref.html#timers

Description

A note for ESP32 C3 and C6 would be helpful. These only have two timers, Timer(0) and Timer(2)

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

esp32/machine_pwm.c: Add support for all PWM timers and channels.

closedby IhorNehrutsaopened 2021-09-18updated 2021-09-21
port-esp32

This pull request allows using all the available PWM timers (up to 8) and channels(up to 16),
without affecting the PWM API.

If a new frequency is set, first it checks if another timer is using
the same freq.
If yes, then it uses this timer, otherwise, it creates a new one.

If all timers are used, the user should set an already used frequency,
or de-init a channel.

This PR is based on #6276 and #3608.
Thanks, @p1ng0o
Thanks, @dragomirecky
Thanks, @dpgeorge

Tested on ESP WROOM 32
Need to test on ESP32 GENERIC_S2 and GENERIC_C3 boards.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied