<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/ports/mimxrt10xx/common-hal, branch main</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2021-04-01T18:04:06+00:00</updated>
<entry>
<title>mimxrt1011: pwmout: Add prescaler, fix duty_cycle=65535</title>
<updated>2021-04-01T18:04:06+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2021-04-01T18:04:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=89fc0298ce6d7ee64246ce263223ce26883125a4'/>
<id>urn:sha1:89fc0298ce6d7ee64246ce263223ce26883125a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mimxrt1011: pwmio: Enable basic PWMOut functionality</title>
<updated>2021-04-01T15:06:59+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2021-04-01T14:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=489163b74edf9d6f40b3d9e6ee0154d2f1ddce79'/>
<id>urn:sha1:489163b74edf9d6f40b3d9e6ee0154d2f1ddce79</id>
<content type='text'>
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
&gt;&gt;&gt; p.frequency = 2000
&gt;&gt;&gt; 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.
</content>
</entry>
<entry>
<title>mimxrt10xx: Fix bogus assertion.</title>
<updated>2021-03-31T14:21:08+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2021-03-31T14:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cb29ad0846c8da2d25c157a4b1d3cf9affd89e44'/>
<id>urn:sha1:cb29ad0846c8da2d25c157a4b1d3cf9affd89e44</id>
<content type='text'>
.. as noted by @d-c-d
</content>
</entry>
<entry>
<title>mimxrt1011: UART: Add additional error checking</title>
<updated>2021-03-30T15:17:48+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2021-03-30T15:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=71eee45a3779559686c5d07d9864aad679121ab6'/>
<id>urn:sha1:71eee45a3779559686c5d07d9864aad679121ab6</id>
<content type='text'>
.. and make the 'invalid pin' messages standard.

Closes #4502
</content>
</entry>
<entry>
<title>Parenthesize double-division for clarity</title>
<updated>2021-03-26T16:01:22+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@unpythonic.net</email>
</author>
<published>2021-03-26T16:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2bc61b458070f9e1e5a49442a72c43c0d9ea721f'/>
<id>urn:sha1:2bc61b458070f9e1e5a49442a72c43c0d9ea721f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mimxrt10xx: Use the proper "betweenTransferDelay" (et al) values</title>
<updated>2021-03-26T15:54:13+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@unpythonic.net</email>
</author>
<published>2021-03-26T15:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=231cb1ffd954dad45223bcc6fd22f344089536f1'/>
<id>urn:sha1:231cb1ffd954dad45223bcc6fd22f344089536f1</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>mimxrt10xx: Factor out "transfer_common"</title>
<updated>2021-03-26T15:04:35+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@unpythonic.net</email>
</author>
<published>2021-03-25T14:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1d48054aeaa2762a752462a058a27afb1daac860'/>
<id>urn:sha1:1d48054aeaa2762a752462a058a27afb1daac860</id>
<content type='text'>
.. and set the "MasterPcsContinuous" flag, which removes some of the
gap between bytes of a single SPI transaction
</content>
</entry>
<entry>
<title>mimxrt10xx: busio: cap SPI baudrate at 30MHz per datasheet</title>
<updated>2021-03-26T15:01:53+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@unpythonic.net</email>
</author>
<published>2021-03-25T18:37:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9e110f120a323eff9989463771d8ea8ece6e8906'/>
<id>urn:sha1:9e110f120a323eff9989463771d8ea8ece6e8906</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mimxrt: SPI: Set the TCR value returned by MasterBaudSetRate</title>
<updated>2021-03-24T18:33:21+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@unpythonic.net</email>
</author>
<published>2021-03-24T18:07:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b440883fe55666d12f94a6d48513a1a68d218bc4'/>
<id>urn:sha1:b440883fe55666d12f94a6d48513a1a68d218bc4</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>mimxrt1011: Fix reset-to-bootloader</title>
<updated>2021-03-19T15:11:45+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2021-03-19T15:11:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=06743d91ed0df5c73fe9554dc05e47a6eeec1414'/>
<id>urn:sha1:06743d91ed0df5c73fe9554dc05e47a6eeec1414</id>
<content type='text'>
The definition of DBL_TAP_REG must match tinyuf2
</content>
</entry>
</feed>
