<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/stmhal/timer.c, branch reentrant-gc</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=reentrant-gc</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=reentrant-gc'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2014-10-16T21:36:28+00:00</updated>
<entry>
<title>py: First steps making GC reentrant.</title>
<updated>2014-10-16T21:36:28+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-16T21:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=788f191e0693989fd5d2a9917c32933a1e83eb5a'/>
<id>urn:sha1:788f191e0693989fd5d2a9917c32933a1e83eb5a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for complimentary channel output and deadtime.</title>
<updated>2014-10-10T20:54:03+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2014-10-10T16:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1c795445b31a73bcff71eac4ce56827554b4f29f'/>
<id>urn:sha1:1c795445b31a73bcff71eac4ce56827554b4f29f</id>
<content type='text'>
This patch enables output on the complimentary channels (TIMx_CHyN).
For timers 1 and 8, deadtime can also be inserted when the channels
transition. For the pyboard, TIM8_CH1/CH1N and TIM8_CH2/CH2N can
take advantage of this.
</content>
</entry>
<entry>
<title>stmhal: Use mp_uint_t where appropriate.</title>
<updated>2014-10-05T20:51:54+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-05T20:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d03c6816083c8ce8a35d278ede48c4089012b055'/>
<id>urn:sha1:d03c6816083c8ce8a35d278ede48c4089012b055</id>
<content type='text'>
Found these by compiling stmhal with mp_uint_t of type uint32_t instead
of unsigned int.  This actually makes a difference to the code, but just
a curiosity.
</content>
</entry>
<entry>
<title>stmhal, timer: Fix timer.chanel so mode can be a keyword.</title>
<updated>2014-10-05T16:52:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-04T14:25:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ba0383a8c7b2fb394a7d2bc7a67cab7fc3200263'/>
<id>urn:sha1:ba0383a8c7b2fb394a7d2bc7a67cab7fc3200263</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stmhal, timer: Improve accuracy of freq computation.</title>
<updated>2014-10-05T16:52:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-04T13:59:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f68b3ce809cb6331fb500fa10331b16cbc6c13'/>
<id>urn:sha1:55f68b3ce809cb6331fb500fa10331b16cbc6c13</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stmhal, timer: Set freq from float; get timer source freq.</title>
<updated>2014-10-05T16:52:44+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-04T13:36:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=97ef94df83238e58fd7a084c3ca0e8af164136e0'/>
<id>urn:sha1:97ef94df83238e58fd7a084c3ca0e8af164136e0</id>
<content type='text'>
Timers now have the following new features:
- can init freq using floating point; eg tim.init(freq=0.1)
- tim.source_freq() added to get freq of timer clock source
- tim.freq() added to get/set freq
- print(tim) now prints freq
</content>
</entry>
<entry>
<title>stmhal: Allow pyb.freq() function to change SYSCLK frequency.</title>
<updated>2014-10-04T00:54:31+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-04T00:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=24119176e7ff39e55c8067624d74d17ac1f0ffa3'/>
<id>urn:sha1:24119176e7ff39e55c8067624d74d17ac1f0ffa3</id>
<content type='text'>
Eg pyb.freq(120000000) sets the CPU to 120MHz.  The frequency can be set
at any point in the code, and can be changed as many times as you like.
Note that any active timers will need to be reconfigured after a freq
change.

Valid range is 24MHz to 168MHz (but not all freqs are supported).  The
code maintains a 48MHz clock for the USB at all times and it's possible
to change the frequency at a USB REPL and keep the REPL alive (well,
most of the time it stays, sometimes it resets the USB for some reason).
Note that USB does not work with pyb.freq of 24MHz.
</content>
</entry>
<entry>
<title>stmhal: Fix edge case for timer PWM of 100%.</title>
<updated>2014-09-29T13:15:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-29T13:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f042d7a4d7197d87798bc9727e9df094a3edd7c1'/>
<id>urn:sha1:f042d7a4d7197d87798bc9727e9df094a3edd7c1</id>
<content type='text'>
Also improve precision of calculating PWM percent in integer mode.
Also update teensy with edge case fix.
</content>
</entry>
<entry>
<title>Fix timer overflow code.</title>
<updated>2014-09-28T02:40:37+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2014-09-26T16:04:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=39296b40d49b4b6b9373a80de67e017e540f1408'/>
<id>urn:sha1:39296b40d49b4b6b9373a80de67e017e540f1408</id>
<content type='text'>
Teensy doesn't need to worry about overflows since all of
its timers are only 16-bit.

For PWM, the pulse width needs to be able to vary from 0..period+1
(pulse-width == period+1 corresponds to 100% PWM)

I couldn't test the 0xffffffff cases since we can't currently get a
period that big in python. With a prescaler of 0, that corresponds
to a freq of 0.039 (i.e. cycle every 25.56 seconds), and we can't
set that using freq or period.

I also tested both stmhal and teensy with floats disabled, which
required a few other code changes to compile.
</content>
</entry>
<entry>
<title>stmhal, timer: Factor code to compute PWM percent; improve 32bit case.</title>
<updated>2014-09-25T14:44:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-25T14:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e8ea0724da1b2fd6f6eb1cc99154072159fc2c8d'/>
<id>urn:sha1:e8ea0724da1b2fd6f6eb1cc99154072159fc2c8d</id>
<content type='text'>
Also do the same for teensy timer code.
</content>
</entry>
</feed>
