<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Lowering power consumption tip #4 &#8211; transmitting serial data</title>
	<atom:link href="http://embeddedgurus.com/stack-overflow/2010/05/lowering-power-consumption-tip-4-transmitting-serial-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/stack-overflow/2010/05/lowering-power-consumption-tip-4-transmitting-serial-data/</link>
	<description>Thoughts on embedded systems by Nigel Jones</description>
	<lastBuildDate>Fri, 10 Feb 2012 14:37:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Anonymous</title>
		<link>http://embeddedgurus.com/stack-overflow/2010/05/lowering-power-consumption-tip-4-transmitting-serial-data/comment-page-1/#comment-1060</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 06 Jun 2010 20:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://embeddedgurus.com/stack-overflow/?p=462#comment-1060</guid>
		<description>I presume the interrupt triggers only when the status register activates.</description>
		<content:encoded><![CDATA[<p>I presume the interrupt triggers only when the status register activates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miro Samek</title>
		<link>http://embeddedgurus.com/stack-overflow/2010/05/lowering-power-consumption-tip-4-transmitting-serial-data/comment-page-1/#comment-936</link>
		<dc:creator>Miro Samek</dc:creator>
		<pubDate>Tue, 25 May 2010 17:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://embeddedgurus.com/stack-overflow/?p=462#comment-936</guid>
		<description>The problem with all discussed approaches, except interrupting, is that they are all taking 100% of the CPU for the job of transmitting data. This is the traditional sequential approach.

This approach is necessary if you have no hardware assistance, so the CPU indeed needs to wait for each byte. But often you do have some sort of a FIFO (sometimes even a DMA) to offload transmission to a peripheral.

If you do have such hardware, you could use another &quot;hybrid&quot; approach which is to poll the peripheral from a periodic interrupt. Please note that I don&#039;t mean here interrupting for every single byte, which is highly inefficient and often inferior to simple polling.

For example, a UART with a 16-byte FIFO transmitting at the high rate of 115200 baud needs CPU to reload the FIFO only every 1.38 ms. So if you interrupt every 1.2-1.3 ms (~800 Hz), you can keep the FIFO constantly full. An interrupt rate of 800Hz is high, but manageable (as opposed to interrupting at 12kHz for every single byte, which is highly inefficient).

My point is that one should avoid if only possible tying up the CPU completely for longer periods of time. Such design is not only inefficient in terms of power consumption, but more importantly makes the system unresponsive. Too often software developers fall for this, instead of using existing hardware (such as FIFOs) or insisting that the hardware team provide an event-driven support (e.g., through an FPGA).</description>
		<content:encoded><![CDATA[<p>The problem with all discussed approaches, except interrupting, is that they are all taking 100% of the CPU for the job of transmitting data. This is the traditional sequential approach.</p>
<p>This approach is necessary if you have no hardware assistance, so the CPU indeed needs to wait for each byte. But often you do have some sort of a FIFO (sometimes even a DMA) to offload transmission to a peripheral.</p>
<p>If you do have such hardware, you could use another &#8220;hybrid&#8221; approach which is to poll the peripheral from a periodic interrupt. Please note that I don&#8217;t mean here interrupting for every single byte, which is highly inefficient and often inferior to simple polling.</p>
<p>For example, a UART with a 16-byte FIFO transmitting at the high rate of 115200 baud needs CPU to reload the FIFO only every 1.38 ms. So if you interrupt every 1.2-1.3 ms (~800 Hz), you can keep the FIFO constantly full. An interrupt rate of 800Hz is high, but manageable (as opposed to interrupting at 12kHz for every single byte, which is highly inefficient).</p>
<p>My point is that one should avoid if only possible tying up the CPU completely for longer periods of time. Such design is not only inefficient in terms of power consumption, but more importantly makes the system unresponsive. Too often software developers fall for this, instead of using existing hardware (such as FIFOs) or insisting that the hardware team provide an event-driven support (e.g., through an FPGA).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juergen</title>
		<link>http://embeddedgurus.com/stack-overflow/2010/05/lowering-power-consumption-tip-4-transmitting-serial-data/comment-page-1/#comment-798</link>
		<dc:creator>Juergen</dc:creator>
		<pubDate>Sat, 22 May 2010 09:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://embeddedgurus.com/stack-overflow/?p=462#comment-798</guid>
		<description>You can also add a check of the status register to the last approach, that way it would be less dangerous.</description>
		<content:encoded><![CDATA[<p>You can also add a check of the status register to the last approach, that way it would be less dangerous.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

