ledc example does not work at all

User avatar
rudi ;-)
Posts: 1726
Joined: Fri Nov 13, 2015 3:25 pm

Re: ledc example does not work at all

Postby rudi ;-) » Wed Mar 01, 2017 9:03 am

first part of code
Menuconfig ESP32 specific: 80 MHz
pwm_test_detailed_1v_first_part_code_-8000-_menuconfig_80MHz.jpg
pwm_test_detailed_1v_first_part_code_-8000-_menuconfig_80MHz.jpg (131.34 KiB) Viewed 6188 times

second part of code
Menuconfig ESP32 specific: 80 MHz
pwm_test_detailed_1v_second_part_code_-2047-_menuconfig_80MHz.jpg
pwm_test_detailed_1v_second_part_code_-2047-_menuconfig_80MHz.jpg (131.07 KiB) Viewed 6188 times
hope this helps

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

murray_lang
Posts: 24
Joined: Fri Oct 07, 2016 4:43 pm

Re: ledc example does not work at all

Postby murray_lang » Thu Mar 02, 2017 2:17 am

OK, so what I can gather is that the "CPU frequency" setting in menuconfig actually changes the clock speed of the CPU by selecting multipliers/dividers applied to the 40MHz crystal input. I initially though that it was something that needed to be configured based on the speed set by some other method.

I also gather that this setting is used to adjust the internal mathematics in the firmware to keep timings more or less calibrated.

At 240MHz, neither my Nano32 or WROOM-32 will produce a PWM signal. At 160MHz both will produce a PWM signal.

Is the problem with my modules or with the firmware? We have seen here that some modules work at 240MHz, but I am confident that I am not the only person to buy a Nano32 from a particular batch, nor a WROOM-32 from another particular batch. The fact that modules from two manufacturers exhibit the problem suggests to me that there is a significant number of ESP32 modules out there that will not produce PWM at the default frequency setting.

Who's problem is it?

Murray

murray_lang
Posts: 24
Joined: Fri Oct 07, 2016 4:43 pm

Re: ledc example does not work at all

Postby murray_lang » Thu Mar 02, 2017 2:28 am

Ahhh! It must be my amateur prototype circuit wiring. Negligent absence of bypassing. Ground bounce etc. :oops:

Issue closed, I think.

Murray

svenbieg
Posts: 39
Joined: Tue Feb 11, 2020 5:48 pm

Re: ledc example does not work at all

Postby svenbieg » Sat Apr 11, 2020 7:02 pm

The sample does work on pin 4 but not my application, maybe because i have WiFi enabled.
Following pins do work: 5, 17, 18, 19, 21, 22, 25, 26.

Who is online

Users browsing this forum: No registered users and 248 guests