summaryrefslogtreecommitdiffstatshomepage
path: root/tools/mpy_ld.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-11-04 16:55:16 +1100
committerDamien George <damien@micropython.org>2024-12-11 12:22:15 +1100
commitbdda91fe7414b2ff8d5259a176cc8da8b72a803f (patch)
tree87576727ff0aa6c1509c231f36e388555b651106 /tools/mpy_ld.py
parent94343e20e590473ff1e31bd31c654befa42307a7 (diff)
downloadmicropython-bdda91fe7414b2ff8d5259a176cc8da8b72a803f.tar.gz
micropython-bdda91fe7414b2ff8d5259a176cc8da8b72a803f.zip
tests/extmod_hardware: Add a test for machine.PWM freq and duty.
This adds a hardware test for `machine.PWM`. It requires a jumper wire between two pins, uses `machine.PWM` to output on one of them, and `machine.time_pulse_us()` to time the PWM on the other pin (some boards test more than one pair of pins). It times both the high and low duty cycle (and hence the frequency) for a range of PWM frequencies and duty cycles (including full on and full off). Currently supported on: - esp32 (needs a minor hack for initialisation, and some tests still fail) - esp8266 (passes for frequencies 1kHz and less) - mimxrt / Teensy 4.0 (passes) - rp2 (passes) - samd21 (passes for frequencies 2kHz and less) Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools/mpy_ld.py')
0 files changed, 0 insertions, 0 deletions