Closed
Description
Board
ESP32 (classic)
Device Description
Hardware Configuration
Version
latest master (checkout manually)
IDE Name
PlatformIO
Operating System
Windows 11
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
ledcAttach
uses ledc_handle.used_channels
to pick an unused channel.
However this is never initialized to 0.
This can lead to nearly impossible to reproduce issues where per build (or run?) the number of usable ledC channels can differ.
Suggested change:
bool ledcAttach(uint8_t pin, uint32_t freq, uint8_t resolution)
{
if (!fade_initialized) {
ledc_handle.used_channels = 0;
}
...
Slightly related issue: #9212
Sketch
-
Debug Message
-
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.