QUERY · ISSUE
docs: ESP32 C3 and C6 has only 2 Timers (0 and 2)
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.
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.