Skip to content

Teensy 4.1 PWM not working #4841

@daveshome

Description

@daveshome

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.)

Metadata

Metadata

Assignees

Labels

bugmimxrt10xxiMX RT based boards such as Teensy 4.x

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions