micropython/micropython-esp32

PWM on frequencies lower 611 Hz don't work on firmware 1.18

Kampfzwerg87 opened this issue · 1 comments

I tried to using PWM on firmware 1.18 to control a servo motor and it doesn't work.
With high frequencies the PWM-Signal was ok, on lower frequencies I didn't get any signal.

So I did some test with an oscilloscope and realized that I don't get a PWM-Signal when I use frequencies lower than 611 Hz.
Downgrading to firmware 1.17 solved the problem.

I used the ESP32 NodeMCU Development Kit.

Here's the code I used to verify this issue:
`import machine
import time

pwm = machine.PWM(machine.Pin(4), freq=1)

duty = 512
pwm.duty(duty)
PAUSE = 0.03
#Endlosschleife
while(True):
for freq in range(1,1000):
pwm.freq(freq)
print(freq)
time.sleep(PAUSE)`

With firmware 1.17 it works fine, with firamware 1.18 it doesn't.

I opend this issue on this old project by mistake.
I reopend it on the current project.