81f706aee4
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the duty cycle. The basic API is supported as documentated, except that keyword parameters are accepted for both the instatiaton and the PWM.init() call. Extensions: support PWM for channel pairs. Channel pairs are declared by supplying 2-element tuples for the pins. The two channels of a pair must be the A/B channel of a FLEXPWM module. These form than a complementary pair. Additional supported keyword arguments: - center=value Defines the center position of a pulse within the pulse cycle. The align keyword is actually shortcut for center. - sync=True|False: If set to True, the channels will be synchronized to a submodule 0 channel, which has already to be enabled. - align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized channels are Center-Aligned or Edge-aligned. The channels must be either complementary a channel pair or a group of synchronized channels. It may as well be applied to a single channel, but withiout any benefit. - invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the first pin, bit 1 the second. - deadtime=time_ns time of complementary channels for delaying the rising slope. - xor=0|1|2 xor causes the output of channel A and B to be xored. If applied to a X channel, it shows the value oif A ^ B. If applied to an A or B channel, both channel show the xored signal for xor=1. For xor=2, the xored signal is split between channels A and B. See also the Reference Manual, chapter about double pulses. The behavior of xor=2 can also be achieved using the center method for locating a pulse within a clock period. The output is enabled for board pins only. CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal will not be routed to the output. That applies only to FLEXPWM pins. The use of QTMR pins which are not board pins will be rejected. As part of this commit, the _WFE() statement is removed from ticks_delay_us64() to prevent PWM glitching during calls to sleep(). |
||
---|---|---|
.. | ||
boards | ||
hal | ||
lwip_inc | ||
mbedtls | ||
modules | ||
Makefile | ||
README.md | ||
board_init.c | ||
dma_channel.c | ||
dma_channel.h | ||
eth.c | ||
eth.h | ||
fatfs_port.c | ||
led.c | ||
led.h | ||
machine_adc.c | ||
machine_bitstream.c | ||
machine_i2c.c | ||
machine_led.c | ||
machine_pin.c | ||
machine_pwm.c | ||
machine_rtc.c | ||
machine_sdcard.c | ||
machine_spi.c | ||
machine_timer.c | ||
machine_uart.c | ||
machine_wdt.c | ||
main.c | ||
mimxrt_flash.c | ||
mimxrt_sdram.c | ||
modmachine.c | ||
modmachine.h | ||
modmimxrt.c | ||
modmimxrt.h | ||
moduos.c | ||
modutime.c | ||
mpconfigport.h | ||
mphalport.c | ||
mphalport.h | ||
mpnetworkport.c | ||
network_lan.c | ||
pendsv.c | ||
pendsv.h | ||
pin.c | ||
pin.h | ||
qstrdefsport.h | ||
sdcard.c | ||
sdcard.h | ||
systick.c | ||
systick.h | ||
ticks.c | ||
ticks.h | ||
tusb_config.h | ||
tusb_port.c |
README.md
Port of MicroPython to NXP iMX RT 10xx
Currently supports Teensy 4.0, Teensy 4.1, and the MIMXRT1010_EVK, MIMXRT1020_EVK, MIMXRT1050_EVK, MIMXRT1060_EVK and MIMXRT1064_EVK boards.
Features:
- REPL over USB VCP
- machine.ADC
- machine.I2C
- machine.LED
- machine.Pin
- machine.PWM
- machine.RTC
- machine.SDCard
- machine.SPI
- machine.Signal
- machine.SoftI2C
- machine.SoftSPI
- machine.Timer
- machine.UART
- LFS2 file system at the internal Flash
- SDCard support (not on MIMXRT1010_EVK)
- Ethernet (not on Teensy 4.0 and MIMXRT1010_EVK)
Known issues:
TODO:
- More peripherals (Counter, I2S, CAN, etc)
- More Python options