summaryrefslogtreecommitdiff
path: root/ports/mimxrt10xx/common-hal
AgeCommit message (Collapse)Author
2021-04-01mimxrt1011: pwmout: Add prescaler, fix duty_cycle=65535Jeff Epler
2021-04-01mimxrt1011: pwmio: Enable basic PWMOut functionalityJeff Epler
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-03-31mimxrt10xx: Fix bogus assertion.Jeff Epler
.. as noted by @d-c-d
2021-03-30mimxrt1011: UART: Add additional error checkingJeff Epler
.. and make the 'invalid pin' messages standard. Closes #4502
2021-03-26Parenthesize double-division for clarityJeff Epler
2021-03-26mimxrt10xx: Use the proper "betweenTransferDelay" (et al) valuesJeff Epler
Set the betweenTransferDelay to the SCK low-time, to avoid long pauses between bytes (transfers) while preventing the last SCK cycle in a byte from being a runt pulse. Compared to an earlier revision of this change, which just set the delays all to zero, this doesn't break using an AirLift, which was sensitive to the runt pulses (the simple loopback-wire test didn't detect the problem)
2021-03-26mimxrt10xx: Factor out "transfer_common"Jeff Epler
.. and set the "MasterPcsContinuous" flag, which removes some of the gap between bytes of a single SPI transaction
2021-03-26mimxrt10xx: busio: cap SPI baudrate at 30MHz per datasheetJeff Epler
2021-03-24mimxrt: SPI: Set the TCR value returned by MasterBaudSetRateJeff Epler
without this, the baud rate could be wrong; in my testing, it was low by a factor of 2 when requesating baudrate=1_000_000 (1MHz). When passing the baudrate in to LPSPI_MasterInit, the setting is made automatically, but LPSPI_MAster_SetBaudRate just returns it via the out-parameter tcrPrescaleValue.
2021-03-19mimxrt1011: Fix reset-to-bootloaderJeff Epler
The definition of DBL_TAP_REG must match tinyuf2
2021-03-16Formatting fixesgamblor21
2021-03-15Merge branch 'main' into rp_dp_parallelMark
2021-03-15run code formatting scriptmicroDev
2021-03-11Add frequency support to parallel busgamblor21
2021-02-25Merge remote-tracking branch 'adafruit/main' into busio-uart-rpScott Shawcroft
2021-02-25implement suggested changesmicroDev
- add internal buffering - rtc initialization fix
2021-02-11merge from upstream; complicated webusb mergeDan Halbert
2021-02-07adds: maximum retries on SPI busyPhilip Jander
2021-02-07chore: whitespace fixedPhilip Jander
2021-02-07adds: idle loop to wait for SPI not busy (mimxrt10xx)Philip Jander
2021-02-03Initial commit. Edited error messages in .c filesBiffoBear
2020-12-28update common_hal_reset_pin()microDev
2020-12-01address review commentsDan Halbert
2020-11-26deep sleep working; deep sleep delay when connectedDan Halbert
2020-11-22wipDan Halbert
2020-11-21wip: ResetReason to microcontroller.cpuDan Halbert
2020-11-16Merge remote-tracking branch 'adafruit/main' into sleepDan Halbert
2020-11-13Update parallel bus signaturesScott Shawcroft
2020-10-27Add check for invalid io, function to disable all alarmsmicroDev
2020-10-27Add description of alarm modulesmicroDev
2020-08-21Fix copy pasta and stub buildScott Shawcroft
2020-08-21Merge remote-tracking branch 'adafruit/main' into add_pwmioScott Shawcroft
2020-08-18Split pulseio.PWMOut into pwmioScott Shawcroft
This gives us better granularity when implementing new ports because PWMOut is commonly implemented before PulseIn and PulseOut. Fixes #3211
2020-08-14Expand PulseOut API, debug cleanupLucian Copeland
2020-08-04"pop from empty %q"Jeff Epler
Saves 12 bytes code on trinket m0
2020-08-04Combine 'index out of range' messagesJeff Epler
2020-08-04Combine similar strings to reduce size of translationsJeff Epler
This is a slight trade-off with code size, in places where a "_varg" mp_raise variant is now used. The net savings on trinket_m0 is just 32 bytes. It also means that the translation will include the original English text, and cannot be translated. These are usually names of Python types such as int, set, or dict or special values such as "inf" or "Nan".
2020-07-15supervisor: factor supervisor_background_tasks from sundry portsJeff Epler
2020-07-06Add license to some obvious files.Diego Elio Pettenò
2020-06-24Compiles!Scott Shawcroft
2020-06-24Add UART supportScott Shawcroft
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-05-27Merge branch 'mimxrt-uart-oneway' into mimxrt-busio-cleanupLucian Copeland
2020-05-27translationsLucian Copeland
2020-05-27Merge branch 'mimxrt-uart-oneway' of ↵Lucian Copeland
https://github.com/hierophect/circuitpython into mimxrt-uart-oneway
2020-05-27Change exception text and typeLucian Copeland
2020-05-27Add pin resetting across boards, fix array size detection issueLucian Copeland
2020-05-27Merge pull request #2961 from arturo182/i2c-exceptionarturo182
mimxrt10xx: Change exception type to match other ports
2020-05-26mimxrt10xx: Change exception type to match other portsarturo182
2020-05-22Merge remote-tracking branch 'upstream/master' into mimxrt-busio-cleanupLucian Copeland