Page 1 of 1

After PWM ledcWrite GPIO is blocked for normal IO-use

Posted: Thu Mar 26, 2020 8:15 pm
by sailaway
Hi!
The "Ai Thinker ESP32-CAM" board uses GPIO_4 to control the flash-LED.
I use PWM to dim the flash-LED to less brightnes for some time: ledcWrite(channel, dutycycle)
This works fine.

After that I want to switch on the flash-LED by digitalWrite(GPIO_4, LOW) and to switch off by digitalWrite(GPIO_4, HIGH)
Normaly this works fine.
But after using PWM on GPIO_4 (like described above) it does NOT.

I cannot find any hint that PWM should be finished with a special command so that GPIO_4 is ready for normal IO-use.