<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/stmhal/timer.c, branch v1.6</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.6</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.6'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-01-29T22:44:43+00:00</updated>
<entry>
<title>stmhal: Add PWM capability for LED(3) and LED(4) on pyboards.</title>
<updated>2016-01-29T22:44:43+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-29T22:44:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a8a4b01af6501ff7ab61b251fc30fcf8a286f8d1'/>
<id>urn:sha1:a8a4b01af6501ff7ab61b251fc30fcf8a286f8d1</id>
<content type='text'>
USB CDC no longer needs TIM3 (which was originally used for LED(4) PWM)
and so TIM3 has been freed for general purpose use by the user.  Hence
LED(4) lost its PWM capabilities.

This patch reinstates the PWM capabilities using a semi-generic piece
of code which allows to configure a timer and PWM channel to use for any
LED.  But the PWM capability is only configured if the LED is set to an
intensity between 1 and 254 (ie only when needed).  In that case the
relevant timer is configured for PWM.  It's up to the user to make sure
the timers are not used if PWM is active.

This patch also makes sure that PWM LEDs are turned off using standard
GPIO when calling led.off() or led.intensity(0), instead of just setting
the PWM counter to zero.
</content>
</entry>
<entry>
<title>stmhal: Make TIM3 available for use by the user.</title>
<updated>2016-01-29T22:31:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-29T22:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ea89b80ff4f842b010f9f8ec3280675f81bc6bc5'/>
<id>urn:sha1:ea89b80ff4f842b010f9f8ec3280675f81bc6bc5</id>
<content type='text'>
TIM3 is no longer used by USB CDC for triggering outgoing data, so we
can now make it available to the user.

PWM fading on LED(4) is now gone, but will be reinstated in a new way.
</content>
</entry>
<entry>
<title>stmhal: Make USB CDC driver use SOF instead of TIM3 for outgoing data.</title>
<updated>2016-01-29T15:21:43+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-09T21:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d3631339176b768ce1ffdc535223385245ff906b'/>
<id>urn:sha1:d3631339176b768ce1ffdc535223385245ff906b</id>
<content type='text'>
Previous to this patch the USB CDC driver used TIM3 to trigger the
sending of outgoing data over USB serial.  This patch changes the
behaviour so that the USB SOF interrupt is used to trigger the processing
of the sending.  This reduces latency and increases bandwidth of outgoing
data.

Thanks to Martin Fischer, aka @hoihu, for the idea and initial prototype.

See PR #1713.
</content>
</entry>
<entry>
<title>py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.</title>
<updated>2016-01-11T00:49:27+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T15:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5b3f0b7f39bd67cc9182993c288f09f67a0890df'/>
<id>urn:sha1:5b3f0b7f39bd67cc9182993c288f09f67a0890df</id>
<content type='text'>
The first argument to the type.make_new method is naturally a uPy type,
and all uses of this argument cast it directly to a pointer to a type
structure.  So it makes sense to just have it a pointer to a type from
the very beginning (and a const pointer at that).  This patch makes
such a change, and removes all unnecessary casting to/from mp_obj_t.
</content>
</entry>
<entry>
<title>stmhal/timer: Use mp_float_t instead of float.</title>
<updated>2015-12-09T17:39:34+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-09T17:39:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f54a96d6a20df998eb70a5cffe63f5ea885595c8'/>
<id>urn:sha1:f54a96d6a20df998eb70a5cffe63f5ea885595c8</id>
<content type='text'>
This way mp_float_t can be changed to, eg, double.
</content>
</entry>
<entry>
<title>stmhal: Add option to free up TIM3 from USB VCP polling.</title>
<updated>2015-12-04T14:07:15+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-04T14:07:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=66b96822fb33863fde5ce13a6bdeb99a404575dc'/>
<id>urn:sha1:66b96822fb33863fde5ce13a6bdeb99a404575dc</id>
<content type='text'>
This is a hack to free up TIM3 so that it can be used by the user.
Instead we use the PVD irq to call the USB VCP polling function, and
trigger it from SysTick (so SysTick itself does not do any processing).

The feature is enabled for pyboard lite only, since it lacks timers.
</content>
</entry>
<entry>
<title>stmhal: Move flash storage idle tick handler from TIM3 to SysTick.</title>
<updated>2015-11-24T16:18:07+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-24T16:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e99e6c883d70eda894aba124c8ee0495dc90c350'/>
<id>urn:sha1:e99e6c883d70eda894aba124c8ee0495dc90c350</id>
<content type='text'>
Using SysTick to do the counting and dispatch of the flash storage idle
handler is more efficient than requiring a dedicated hardware timer.
No new counter is needed, just the existing uwTick variable.  The
processing is not actually done in the SysTick IRQ, it is deferred to
the flash IRQ (which runs at lower priority).
</content>
</entry>
<entry>
<title>stmhal: Add symbolic #defines for interrupt levels in irq.h.</title>
<updated>2015-11-01T23:23:39+00:00</updated>
<author>
<name>Dave Curtis</name>
<email>davecurtis@sonic.net</email>
</author>
<published>2015-10-31T17:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=32b3549cce7a965d92a81db02c7adc973f08d74c'/>
<id>urn:sha1:32b3549cce7a965d92a81db02c7adc973f08d74c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Add py/mphal.h and use it in all ports.</title>
<updated>2015-10-31T16:14:30+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-10-30T23:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=731f359292c0e2630873df1a19c5baac7287024f'/>
<id>urn:sha1:731f359292c0e2630873df1a19c5baac7287024f</id>
<content type='text'>
py/mphal.h contains declarations for generic mp_hal_XXX functions, such
as stdio and delay/ticks, which ports should provide definitions for.  A
port will also provide mphalport.h with further HAL declarations.
</content>
</entry>
<entry>
<title>stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.</title>
<updated>2015-07-29T23:38:25+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2015-07-28T15:36:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ea8bf8105812b36fbf1596a78c6e14aa0a0c5a36'/>
<id>urn:sha1:ea8bf8105812b36fbf1596a78c6e14aa0a0c5a36</id>
<content type='text'>
</content>
</entry>
</feed>
