<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mjb/altos/src/stm/ao_usb_stm.c, branch 1.2.1</title>
<subtitle>AltOS - the operating system for Altus Metrum products
</subtitle>
<id>https://git.ethernal.org/mjb/altos/atom?h=1.2.1</id>
<link rel='self' href='https://git.ethernal.org/mjb/altos/atom?h=1.2.1'/>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/'/>
<updated>2013-05-08T04:30:26+00:00</updated>
<entry>
<title>altos: Allow STM usb driver to be used without stdio</title>
<updated>2013-05-08T04:30:26+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2013-04-27T07:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=e2412e867138635d79ea0fa8d43efc0a6aa19784'/>
<id>urn:sha1:e2412e867138635d79ea0fa8d43efc0a6aa19784</id>
<content type='text'>
This lets the self flashing loader be linked without any of the stdio
code, which saves a bunch of memory.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Remove USB EP0 task</title>
<updated>2013-05-08T03:07:52+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2013-04-23T01:23:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=168188f6650dc9a777d57f9c7a8ff1be957bc892'/>
<id>urn:sha1:168188f6650dc9a777d57f9c7a8ff1be957bc892</id>
<content type='text'>
Handl EP0 actions from interrupt handler. This allows USB to be used
in a taskless environment, like the STM flash loader

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Always check for idle IN buffer before sending</title>
<updated>2013-03-31T19:24:38+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2013-03-24T22:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=8b2f211758dfa97230a730b8c4b31e0e711c19c9'/>
<id>urn:sha1:8b2f211758dfa97230a730b8c4b31e0e711c19c9</id>
<content type='text'>
Unlike the AVR and CC1111 USB drivers, the STM usb driver queues IN
bytes in a local buffer instead of in the driver; this means that the
driver is queuing bytes while the previous IN packet is queued for the
host, which allows for overlapping execution.

It also means that when the local buffer is full, we must check to see
if the host has picked up the previous IN packet before trying to
queue another IN packet for transmission. This is done by always
waiting for the IN buffer to be ready before sending data.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos/stm: Add debugging mechanism to STM USB driver</title>
<updated>2013-03-31T19:24:28+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2013-03-24T22:03:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=de199601a177fc2d45ad9bd7357111111844d40a'/>
<id>urn:sha1:de199601a177fc2d45ad9bd7357111111844d40a</id>
<content type='text'>
This adds a pile of debugging hooks to the USB driver to try and
isolate various lockup-related issues. It's all disabled by default,
of course.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: Do not release interrupts from any pollchar function</title>
<updated>2013-03-31T19:24:24+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2013-03-24T22:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=4f1f3e836393304434130d362771a39f6f8f859a'/>
<id>urn:sha1:4f1f3e836393304434130d362771a39f6f8f859a</id>
<content type='text'>
getchar relies on interrupts being blocked across the pollchar calls
and into the sleep call or it may go to sleep with data pending.

This prefixes all pollchar functions with _ to indicate that they are
to be called with interrupts blocked and eliminates all interrupt
manipulation calls from within the pollchar functions.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: Make stdio 8-bit clean by making pollchar return int</title>
<updated>2012-12-01T00:01:07+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2012-12-01T00:01:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=0b65402361f36a0c722977bcb63edb26fda0db28'/>
<id>urn:sha1:0b65402361f36a0c722977bcb63edb26fda0db28</id>
<content type='text'>
We were stealing one value (0xff) in the return value from pollchar to
indicate 'not ready yet'. Instead of doing that, use the integer value
-1 and have pollchar return an int instead of a char. That
necessitated cleaning a few other bits to make sure that 0xff wouldn't
get promoted to -1 on accident.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: Switch drivers to ao_arch_block/release_interrupts</title>
<updated>2012-10-25T18:25:42+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2012-10-25T18:25:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=f221c78e6237e0a118ebe85c25e433fe16a7735d'/>
<id>urn:sha1:f221c78e6237e0a118ebe85c25e433fe16a7735d</id>
<content type='text'>
Stop using cli/sei, which are avr-specific

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: Replace __critical usage with ao_arch_critical as needed</title>
<updated>2012-10-25T07:07:14+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2012-10-25T05:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=e80fa6de4ccc5c4851eab9fb941f9282d2e3eb16'/>
<id>urn:sha1:e80fa6de4ccc5c4851eab9fb941f9282d2e3eb16</id>
<content type='text'>
sdcc offers __critical as a machine-independent way to block
interrupts, but as gcc doesn't, we need to use a compiler-independent
construct instead. ao_arch_critical has been around since the AVR
port, but some old __critical usages remained.

This fixes a bunch of random hangs when communicating with MM over USB
or the radio as the various stdio loops were running without
interrupts blocked between the test and the sleep.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: reorder stm USB state stores to avoid races</title>
<updated>2012-06-27T21:35:56+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2012-06-27T21:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=e63d624f9670b5e2e002fcd5f24b80cf7f1effdf'/>
<id>urn:sha1:e63d624f9670b5e2e002fcd5f24b80cf7f1effdf</id>
<content type='text'>
Must set ao_usb_in_pending before telling USB about new data or an
interrupt could arrive at the wrong time to clear it.

Same for ao_usb_in_flushed.

Without these changes, I've seen the USB bus lock up on occasion,
waiting for an IN packet to consume data, but with no IN data pending
in the hardware.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>altos: stm: delay during USB config with pull-up off</title>
<updated>2012-05-08T04:49:24+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2012-05-08T04:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ethernal.org/mjb/altos/commit/?id=dd7699cf8daded17ac41abf5c5170cfb599b6ff5'/>
<id>urn:sha1:dd7699cf8daded17ac41abf5c5170cfb599b6ff5</id>
<content type='text'>
This makes sure that a reboot will reliably cause the device to
disconnect from the USB bus.

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