<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mjb/altos/src/stm/ao_usb_stm.c, branch tmgps</title>
<subtitle>AltOS - the operating system for Altus Metrum products
</subtitle>
<id>https://git.ethernal.org/mjb/altos/atom?h=tmgps</id>
<link rel='self' href='https://git.ethernal.org/mjb/altos/atom?h=tmgps'/>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/'/>
<updated>2017-05-05T05:10:36+00:00</updated>
<entry>
<title>altos: Make CDC ACM 'line coding' public</title>
<updated>2017-05-05T05:10:36+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2017-05-05T05:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=e76d543a203f210683cb77df2b9bbff1a9f4b381'/>
<id>urn:sha1:e76d543a203f210683cb77df2b9bbff1a9f4b381</id>
<content type='text'>
This allows other systems to see what baud rate the host has requested.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Allow use basepri instead of primask for masking interrupts</title>
<updated>2017-02-20T20:32:50+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2016-11-20T10:59:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=839eadbc8e5694842eb498c6e47cfbf08ba8fbf4'/>
<id>urn:sha1:839eadbc8e5694842eb498c6e47cfbf08ba8fbf4</id>
<content type='text'>
This allows for high priority interrupts (priority 0) to run, even
when other interrupts are blocked. Code executing in such interrupt
handlers must not attempt to control task execution as that will race
with the scheduler.

Select this by defining AO_NONMASK_INTERRUPT in ao_pins.h.
non-maskable interrupt priority is AO_STM_NVIC_NONMASK_PRIORITY

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Interrupt priority is in the upper bits of the priority mask</title>
<updated>2017-02-20T20:31:16+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2016-11-21T04:54:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=088ddbb177efc8be2fc467524dc1668553080d3b'/>
<id>urn:sha1:088ddbb177efc8be2fc467524dc1668553080d3b</id>
<content type='text'>
Because the STM32L only offers 16 priority levels, the bottom four
bits of each priority mask are not used. All of the interrupt priority
settings in the system were using values &lt; 16, making them all
effectively the same. Fix that by moving them into the upper 4 bits
and using symbolic constants everywhere.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/arm: Align data so that gcc 5.4 doesn't do byte-accesses. Add -Wcast-align</title>
<updated>2016-12-18T05:04:33+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2016-12-18T04:58:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=89ecc32b90565ace078c4a84d4406a4d1f86821a'/>
<id>urn:sha1:89ecc32b90565ace078c4a84d4406a4d1f86821a</id>
<content type='text'>
Gcc 5.4.1 tracks alignment of data through assignments, so that a
uint32_t pointer which comes from byte-aligned uint8_t data:

extern uint8_t foo[];

	uint32_t	*q = (void *) foo;

Fetches and stores through this pointer are done bytewise. This is
slow (meh), but if q references a device register, things to bad very
quickly.

This patch works around this bug in the compiler by adding
__attribute__((aligned(4))) tags to some variables, or changing them
from uint8_t to uint32_t. Places doing this will now be caught as I've
added -Wcast-align to the compiler flags. That required adding (void
*) casts, after the relevant code was checked to make sure the
compiler could tell that the addresses were aligned.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Make ao_usb_set_address static. Saves a bunch of text space</title>
<updated>2016-12-13T00:44:47+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2016-12-13T00:44:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=f650211f9e99e1d3d0ae13ae559dd1c082f71545'/>
<id>urn:sha1:f650211f9e99e1d3d0ae13ae559dd1c082f71545</id>
<content type='text'>
I'm sure this makes the function end up in-lined, which saves enough
text space to fit the flash loader in ROM again.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>Switch from GPLv2 to GPLv2+</title>
<updated>2016-07-12T22:41:41+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2016-07-05T16:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a'/>
<id>urn:sha1:1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a</id>
<content type='text'>
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Handle USB reset in STM32L usb driver</title>
<updated>2016-06-10T21:39:25+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2016-06-10T21:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=7d21ff641a7bc35318f0f637589eabb5bb6c5152'/>
<id>urn:sha1:7d21ff641a7bc35318f0f637589eabb5bb6c5152</id>
<content type='text'>
Just like lpc and stmf0, deal with the host resetting the bus while
rebooting by restoring all usb-related data to the initial values.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: Expose ao_usb_running globally</title>
<updated>2014-02-18T17:44:52+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2014-02-18T17:44:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=9f6983e3d61fa5231f3d0ce33dbc5aadf946b597'/>
<id>urn:sha1:9f6983e3d61fa5231f3d0ce33dbc5aadf946b597</id>
<content type='text'>
This lets other bits of the code know when USB has been connected.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: Clean up some minor warnings from -Wall</title>
<updated>2013-12-21T06:19:35+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2013-12-21T06:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=b31b4622d5bd92c0cc0851818f5b595dbdb60ead'/>
<id>urn:sha1:b31b4622d5bd92c0cc0851818f5b595dbdb60ead</id>
<content type='text'>
Unused variables, functions and labels, missing enums in switch.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Semantic error in STM usb disable caused it to not work</title>
<updated>2013-12-19T02:20:55+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2013-12-19T02:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=0673344289772ed89483948184d6608c272c7c26'/>
<id>urn:sha1:0673344289772ed89483948184d6608c272c7c26</id>
<content type='text'>
The USB enable register wasn't actually getting rewritten with the
enable bit turned off, so the USB device was still powered on in flight.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
</feed>
