forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
I cannot get PWM to work in CircuitPython 6.2 or 6.3. Almost all pins do PWM when using C, C++.
I have tried many frequencies and duty cycles.
Have tried several older hex loads of CP and the latest.
Code/REPL
import pwmio
import board
import time
p = pwmio.PWMOut(board.D0, frequency=5000, variable_frequency=True, duty_cycle=2**15)
time.sleep(120)
Behavior
Script runs and the board outputs on the REPL (for example: "pwm: 0x403e0000, sum 2, chan 0, mux 2"
while trying PWM on pin D9.
Or 0x403dc000, sum 1, chan 2, mux 4 if trying pin D0
Description
No detectable output on selected pin. (Tried most all pins.)