circuitpython/ports/mimxrt10xx/common-hal
Jeff Epler 489163b74e mimxrt1011: pwmio: Enable basic PWMOut functionality
After this change, the following program works for me on the MIMXRT1010-EVK:
```python
import pwmio
import board

p = pwmio.PWMOut(board.D13, frequency=1_000_000, variable_frequency=True)
p.duty_cycle = 32868

while True:
    pass
```

Querying and varying the duty_cycle and frequency work as well.

The lowest frequency obtainable is about 2kHz; there is an additional
divider which would allow lower PWM frequencies (I think 1kHz is important
for servos?)

Something odd happens with very low duty cycles, such as
```python
>>> p.frequency = 2000
>>> p.duty_cycle = 2
```
instead of a symmetrical waveform, it's asymmetrical.  With `duty_cycle=4`,
the effect disappears.  The reason for this is probably hidden in the
datasheet, but could affect servos or other things that count pulse
widths.
2021-04-01 10:06:59 -05:00
..
analogio run code formatting script 2021-03-15 19:27:36 +05:30
board Add license to some obvious files. 2020-07-06 19:16:25 +01:00
busio mimxrt10xx: Fix bogus assertion. 2021-03-31 09:21:08 -05:00
digitalio run code formatting script 2021-03-15 19:27:36 +05:30
displayio Formatting fixes 2021-03-16 08:22:02 -05:00
microcontroller mimxrt1011: Fix reset-to-bootloader 2021-03-19 10:11:45 -05:00
neopixel_write run code formatting script 2021-03-15 19:27:36 +05:30
os run code formatting script 2021-03-15 19:27:36 +05:30
pulseio run code formatting script 2021-03-15 19:27:36 +05:30
pwmio mimxrt1011: pwmio: Enable basic PWMOut functionality 2021-04-01 10:06:59 -05:00
rtc run code formatting script 2021-03-15 19:27:36 +05:30
supervisor run code formatting script 2021-03-15 19:27:36 +05:30