Page 1 of 1

ESP32 PWM

Posted: Mon Oct 18, 2021 1:34 pm
by Alan_37
Hi, I am trying to enable a simple PWM channel on esp 32 but it's not working
and I get the following message from the serial output.



.[0;31mE (13798) MCPWM: C:/esp-idf/components/driver/mcpwm.c:202 (mcpwm_set_duty):MCPWM DRIVER NOT INITIALIZED.[0m
.[0;31mE (13898) MCPWM: C:/esp-idf/components/driver/mcpwm.c:202 (mcpwm_set_duty):MCPWM DRIVER NOT INITIALIZED.[0m

Re: ESP32 PWM

Posted: Mon Oct 18, 2021 4:16 pm
by BenR
Hello,

Pins B2 to B7 are all input only on the ESP32 devices.

Please can you try a different pin to see if that solves the problem for you.

Re: ESP32 PWM

Posted: Mon Oct 18, 2021 8:35 pm
by Alan_37
Hi Ben

Yes, that was the problem now PWM working fine.

Thanks for your help.