<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>BEC Systems</title>
	
	<link>http://bec-systems.com/site</link>
	<description>Embedded Linux consulting.</description>
	<pubDate>Mon, 08 Feb 2010 16:53:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/bec-systems" /><feedburner:info uri="bec-systems" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><item>
		<title>Gumstix Overo review</title>
		<link>http://feedproxy.google.com/~r/bec-systems/~3/EyxOvPO7Jyw/gumstix-overo-review</link>
		<comments>http://bec-systems.com/site/587/gumstix-overo-review#comments</comments>
		<pubDate>Mon, 08 Feb 2010 16:53:35 +0000</pubDate>
		<dc:creator>Cliff Brake</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Embedded Linux]]></category>

		<category><![CDATA[Gumstix]]></category>

		<category><![CDATA[OMAP]]></category>

		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://bec-systems.com/site/?p=587</guid>
		<description><![CDATA[Based on the interest and number of embedded modules currently available, it appears that the OMAP3 CPU from TI will be very popular in the general purpose embedded Linux market.  One of the OMAP3 modules available is the Overo from Gumstix.  As the company name suggests, this module looks about like a stick of gum, [...]]]></description>
			<content:encoded><![CDATA[<p>Based on the interest and number of embedded modules currently available, it appears that the OMAP3 CPU from TI will be very popular in the general purpose embedded Linux market.  One of the OMAP3 modules available is the <a href="http://www.gumstix.com/store/catalog/index.php?cPath=27_33">Overo from Gumstix</a>.  As the company name suggests, this module looks about like a stick of gum, but smaller, as shown in the photo below.  The Gumstix module provides a lot of functionality in a very small package.  It is reasonably priced, and is an excellent way to quickly create a product that has advanced functionality such as a high powered CPU (OMAP3), high speed USB, DSP, 3-D graphics acceleration, etc.  For an example of the OMAP3 performance compared to previous generations of ARM processors, see <a href="http://bec-systems.com/site/316/gtk-performance-on-pxa270-vs-omap3">this article</a>.</p>
<div id="attachment_593" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-593" title="img_2282_" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2282_.jpg" alt="Overo size comparison to a US dime" width="640" height="453" /><p class="wp-caption-text">Overo size comparison to a US dime</p></div>
<p>The module contains all the core components, and can then be attached to a custom baseboard using the two high density connectors shown in the above photo.  There are 70 signals on each of the two connectors.  BEC <a href="http://bec-systems.com/site/113/gumstix-overo-connector-spreadsheet">provides a spreadsheet</a> of the Overo signals to assist in designing a custom baseboard.</p>
<p>Due to the high level of component integration, the Overo has very few components on the module.  As shown in the below photo, there are really only 3 major visible components.  The flash and RAM is stacked on top of the CPU.  The PMIC contains all the required power managment circuitry, as well as Audio and USB interfacing functionality.</p>
<div id="attachment_595" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-595" title="img_2281_1" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2281_1.jpg" alt="Major components on the Gumstix Overo" width="640" height="235" /><p class="wp-caption-text">Major components on the Gumstix Overo</p></div>
<p>The Overo module must be used with a baseboard.  Gumstix provides several development baseboards.  For production, a custom baseboard is typically created.  The Gumstix baseboards are reasonable cost, so they could be used for prototyping or low volume production if they have the required functionality.  Below is a photo of the Summit baseboard that provides DVI video out, audio, USB host and OTG, and an expansion connector with a number of signals.</p>
<div id="attachment_596" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-596" title="img_2284_" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2284_.jpg" alt="Gumstix Summit baseboard (overo is not installed)" width="640" height="480" /><p class="wp-caption-text">Gumstix Summit baseboard (overo is not installed)</p></div>
<p>Below is the Palo baseboard from Gumstix that can be used to interface with a LCD display.  The Palo board contains a resistive touch screen controller, and circuitry required to interface with a LCD.</p>
<div id="attachment_602" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-602" title="img_2283_1" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2283_1.jpg" alt="Palo baseboard with Overo installed" width="640" height="480" /><p class="wp-caption-text">Palo baseboard with Overo installed</p></div>
<div id="attachment_591" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-591" title="img_2276_" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2276_.jpg" alt="Display connected to Palo baseboard.  Note the tape applied to the display to keep from shorting to components on baseboard." width="640" height="480" /><p class="wp-caption-text">Display connected to Palo baseboard.  Note the tape applied to the display to keep from shorting to components on baseboard.</p></div>
<p>The Overo does not include an Ethernet controller, so you typically use a USB-Ethernet adapter for development.  Below shows a typical development setup.</p>
<div id="attachment_589" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-589" title="img_2273_" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2273_.jpg" alt="Typical USB-Ethernet connection through a USB hub." width="640" height="480" /><p class="wp-caption-text">Typical USB-Ethernet connection through a USB hub.</p></div>
<p>One of the things about the OMAP3 that makes it very attractive for embedded development is the amount of software support, and the number of development and production solutions available.  The OMAP3 is very well supported by the OpenEmbedded project, and TI is very active in making contributions to various open source projects.  This greatly increases the quality and availability of advanced software functionality needed to support a complex system like the OMAP3.</p>
<div id="attachment_597" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-597" title="img_2285_" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2285_.jpg" alt="Size comparison of several OMAP3 systems" width="640" height="480" /><p class="wp-caption-text">Size comparison of several OMAP3 systems</p></div>
<div id="attachment_598" class="wp-caption aligncenter" style="width: 660px"><img class="size-full wp-image-598" title="img_2286_" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2286_.jpg" alt="WIFI and BT antennas connected to Overo module" width="650" height="453" /><p class="wp-caption-text">WIFI and BT antennas connected to Overo module</p></div>
<p>There are many options for software development with the OMAP3 systems.  Below is a photo of a very simple Qt application.  GTK+ and Enlightenment are other popular GUI toolkits.  With 256MB of both flash and RAM, this is more than enough memory for most embedded applications, and provides plenty of headroom for adding features for future product revisions.  The Overo has the CPU processing capability to run advanced GUI applications with 3-D affects, as well as advanced web application frameworks like web2py that previous generations of ARM CPUs could not effectively run.</p>
<div id="attachment_599" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-599" title="img_2287_" src="http://bec-systems.com/site/wp-content/uploads/2010/01/img_2287_.jpg" alt="A simple Qt application that controls LEDs and reads user switch" width="640" height="413" /><p class="wp-caption-text">A simple Qt application that controls LEDs and reads user switch</p></div>
<p>The Gumstix Overo provides an excellent value for developing advanced products.  Especially for low volume products, when you compare the effort and time required to develop a full custom OMAP3 solution versus a simple Overo baseboard, using a module can provide significant advantages in terms of time to market, and development cost.</p>
<img src="http://feeds.feedburner.com/~r/bec-systems/~4/EyxOvPO7Jyw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bec-systems.com/site/587/gumstix-overo-review/feed</wfw:commentRss>
		<feedburner:origLink>http://bec-systems.com/site/587/gumstix-overo-review</feedburner:origLink></item>
		<item>
		<title>The Go language for embedded systems</title>
		<link>http://feedproxy.google.com/~r/bec-systems/~3/bKrvnxJX0-A/the-go-language-for-embedded-systems</link>
		<comments>http://bec-systems.com/site/579/the-go-language-for-embedded-systems#comments</comments>
		<pubDate>Wed, 06 Jan 2010 14:33:37 +0000</pubDate>
		<dc:creator>Cliff Brake</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Embedded Linux]]></category>

		<category><![CDATA[go]]></category>

		<guid isPermaLink="false">http://bec-systems.com/site/?p=579</guid>
		<description><![CDATA[As one of the things I do is evaluate new technologies for embedded systems, the Go language from Google is an interesting development.  I have been looking for a better &#8220;system&#8221; language for some time.  What I mean by a better system language is one that is nearly as efficient as C, does not require [...]]]></description>
			<content:encoded><![CDATA[<p>As one of the things I do is evaluate new technologies for embedded systems, the <a href="http://golang.org/">Go language</a> from Google is an interesting development.  I have been looking for a better &#8220;system&#8221; language for some time.  What I mean by a better system language is one that is nearly as efficient as C, does not require a large runtime, has a fast start-up time, and yet supports modern language features.  It is interesting that the constraints for very high performance server applications are often similar to those found in embedded systems in that applications must make very efficient use of memory and CPU cycles.  This is why C++ is still used a lot by Google and is also popular in embedded systems, but is not as common in applications where CPU power is plentiful compared to the resources to implement the application such as business applications.  One area of divergence is the focus on multi-core for high end server applications, but in the next few years, multi-core CPU&#8217;s such as the Atom and ARM Cortex-A9 will likely be common in low power embedded systems.</p>
<p>There are other options.  <a href="http://live.gnome.org/Vala">Vala</a> is very nice to use, is efficient, offers advanced language features, and extensive language bindings.  Vala is being used to implement some of the <a href="http://freesmartphone.org">http://freesmartphone.org</a> software stack.  C/C++ are the old standby languages, but are rather tedious to program in compared to some of the newer languages in that source and header files are separate, and memory management is manual.</p>
<p>My interest in Go at this time is for ARM systems, so I ran a few experiments.  From what I can tell, there does exist an ARM Go compiler that is able to produce ARM code, but it <a href="http://groups.google.com/group/golang-nuts/browse_thread/thread/a36e6e2cb254ea36/760ef589ad750958">currently lacks support for EABI soft floating point</a>.  The lack of floating point support is pretty much a show stopper for now, but it is at least a start.  The following is an example:</p>
<pre>export GOARCH=arm
cd $GOROOT/src/
./make-arm.bash

cd
(create the following source file: hello.go)

==================
package main
import "fmt"

func main() {
        fmt.Printf("Hello, world\n");
}
=================

5g hello.go   (5g is the ARM compiler)
5l hello.5
scp 5.out root@n900:  (copy to ARM system)
ssh root@n900
?:~# ./5.out
Hello, world

(modify with floating point code)

==================
package main
import "fmt"

func main() {
        var f = 1.5;
        fmt.Printf("Hello, world\n");
        fmt.Printf("float f = %f\n", f);
}

=================

(now run on ARM system)
?:~# ./5.out
Segmentation fault</pre>
<p>As, you can see, floating point does not work as expected.  I&#8217;m not sure yet if gogcc can be configured to compile ARM binaries.  The other area where Go appears to need a lot of work is bindings to various libraries.  Though it does not appear to be ready for embedded ARM systems at this time, Go will be an interesting language to watch over the next few years.</p>
<img src="http://feeds.feedburner.com/~r/bec-systems/~4/bKrvnxJX0-A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bec-systems.com/site/579/the-go-language-for-embedded-systems/feed</wfw:commentRss>
		<feedburner:origLink>http://bec-systems.com/site/579/the-go-language-for-embedded-systems</feedburner:origLink></item>
		<item>
		<title>OpenEmbedded development activity</title>
		<link>http://feedproxy.google.com/~r/bec-systems/~3/9PdguTpQSy8/openembedded-development-activity</link>
		<comments>http://bec-systems.com/site/576/openembedded-development-activity#comments</comments>
		<pubDate>Tue, 29 Dec 2009 22:33:31 +0000</pubDate>
		<dc:creator>Cliff Brake</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Embedded Linux]]></category>

		<category><![CDATA[OpenEmbedded]]></category>

		<guid isPermaLink="false">http://bec-systems.com/site/?p=576</guid>
		<description><![CDATA[Ever since I have been sending out weekly change logs, I have been impressed by the consistent amount of development activity in the OpenEmbedded project.  Every week there are consistently over a dozen developers making changes.  Developers come and go, but the contribution level always seems healthy.  While this amount of development leads to some [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since I have been sending out <a href="http://search.gmane.org/?query=weekly+changelog&amp;author=&amp;group=gmane.comp.handhelds.openembedded&amp;sort=date&amp;DEFAULTOP=and&amp;xP=Zweek%09Zchangelog&amp;xFILTERS=Gcomp.handhelds.openembedded---A">weekly change logs</a>, I have been impressed by the consistent amount of development activity in the OpenEmbedded project.  Every week there are consistently over a dozen developers making changes.  Developers come and go, but the contribution level always seems healthy.  While this amount of development leads to some amount of churn and issues, this amount of development is also required to keep pace with all the new developments in the OSS space.  Not having to wait 2 years for the next big release is one of the big advantages of using Linux and OpenEmbedded.  Having access to the latest technology provides a competitive advantage for many products, and makes dealing with the occasional issues that come up an acceptable trade-off.  Coupled with a flexible and consistent build system, OpenEmbedded is the vehicle to build advanced products.  Yes, its hard.  Yes, you better budget for some system software development time.  Yes, you should get some help if you&#8217;re not an embedded Linux expert.  Yes, you can start with some canned vendor &#8220;BSP&#8221; that seems to work and is seemingly the low-cost way to go, but eventually you&#8217;ll hit a brick wall where you need some bit of functionality that is not there, and then you&#8217;ll start up the exponential curve of dumping lots of time into trying to make something work with little progress forward.  It is much better to count the cost up front, and do things right.</p>
<img src="http://feeds.feedburner.com/~r/bec-systems/~4/9PdguTpQSy8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bec-systems.com/site/576/openembedded-development-activity/feed</wfw:commentRss>
		<feedburner:origLink>http://bec-systems.com/site/576/openembedded-development-activity</feedburner:origLink></item>
		<item>
		<title>OMAP3 Resume Timing</title>
		<link>http://feedproxy.google.com/~r/bec-systems/~3/-3olepGuI6s/omap3-resume-timing</link>
		<comments>http://bec-systems.com/site/569/omap3-resume-timing#comments</comments>
		<pubDate>Mon, 07 Dec 2009 20:35:02 +0000</pubDate>
		<dc:creator>Cliff Brake</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Embedded Linux]]></category>

		<category><![CDATA[Gumstix]]></category>

		<category><![CDATA[kernel]]></category>

		<category><![CDATA[OMAP]]></category>

		<category><![CDATA[power management]]></category>

		<guid isPermaLink="false">http://bec-systems.com/site/?p=569</guid>
		<description><![CDATA[One of the most common power management modes for ARM processors is the suspend mode.  In this mode, peripherals are shut down when possible, the SDRAM is put into self-refresh, and the CPU is placed in a low power mode.  A useful bit of information is to know how soon the system can respond to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most common power management modes for ARM processors is the suspend mode.  In this mode, peripherals are shut down when possible, the SDRAM is put into self-refresh, and the CPU is placed in a low power mode.  A useful bit of information is to know how soon the system can respond to a resume (wake) event.</p>
<p>It turns out the answer to this question depends on where you want to do the work.  In the first test, I created a simple application that continuously toggled a GPIO.  This is an easy way to tell determine with a scope when the application was running.  I then measured the time between the wake event, and when this application signal started toggling.  It was a consistent 180ms.</p>
<p>For the next test I simply toggled a gpio in the <em>omap3_pm_suspend()</em> first thing after resume.  This tells me roughly how fast I can execute code in the kernel after a wake event.  This turned out to be 250uS.</p>
<p>So the good news is we can run kernel code very quickly after a resume event (250uS), but it currently takes a long time until user space processes start running again (180mS).  The 180ms can likely be reduced with some work, but this at least gives us a baseline.  180ms is fairly quick from a human perspective (seems pretty much instant), but for industrial devices that are responding to real-world events, then 180mS can be a long time.</p>
<img src="http://feeds.feedburner.com/~r/bec-systems/~4/-3olepGuI6s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bec-systems.com/site/569/omap3-resume-timing/feed</wfw:commentRss>
		<feedburner:origLink>http://bec-systems.com/site/569/omap3-resume-timing</feedburner:origLink></item>
		<item>
		<title>Linux kernel stats, and long term advantages</title>
		<link>http://feedproxy.google.com/~r/bec-systems/~3/jaNDLsr-S7Q/linux-kernel-stats-advantages-and-long-term-advantages</link>
		<comments>http://bec-systems.com/site/564/linux-kernel-stats-advantages-and-long-term-advantages#comments</comments>
		<pubDate>Tue, 01 Dec 2009 14:26:20 +0000</pubDate>
		<dc:creator>Cliff Brake</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Embedded Linux]]></category>

		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://bec-systems.com/site/?p=564</guid>
		<description><![CDATA[I just read an interesting interview with Greg Kroah Hartman.  According to Greg, we add 11,000 lines, remove 5500 lines, and modify 2200 lines every single day.  This rate of change is something that few organizations have the resources to match.  It is interesting that Google chose to use the Linux kernel in the Android [...]]]></description>
			<content:encoded><![CDATA[<p>I just read an interesting <a href="http://howsoftwareisbuilt.com/2009/11/18/interview-with-greg-kroah-hartman-linux-kernel-devmaintainer/">interview</a> with Greg Kroah Hartman.  According to Greg, we add 11,000 lines, remove 5500 lines, and modify 2200 lines every single day.  This rate of change is something that few organizations have the resources to match.  It is interesting that Google chose to use the Linux kernel in the Android project even though they implemented most other parts of the system.  Another interesting thing to consider is the consequences of the Linux kernel license, which requires many drivers to be released as GPL.  While initially, this may be viewed as a disadvantage, it leads to some interesting long-term implications.  The obvious effect is that most Linux driver code is maintained in the mainline kernel source.  This leads to other effects.  One is that things are allowed to change, and get better.  The USB stack in both Linux and Windows has been re-written several times, but the difference is that in Linux the old software does not need to be maintained, as most drivers are maintained in the kernel, and can simply be modified along with core changes.  Another advantage is that drivers tend to be much simpler as common code is merged.  As a result, a Linux driver tends to be about 1/3 the size of a driver in other operating systems.  Yes, getting driver code accepted in the mainline kernel can be difficult at times, but it is clearly the best long-term option.</p>
<img src="http://feeds.feedburner.com/~r/bec-systems/~4/jaNDLsr-S7Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bec-systems.com/site/564/linux-kernel-stats-advantages-and-long-term-advantages/feed</wfw:commentRss>
		<feedburner:origLink>http://bec-systems.com/site/564/linux-kernel-stats-advantages-and-long-term-advantages</feedburner:origLink></item>
		<item>
		<title>Linux PM: OMAP3 Suspend Support</title>
		<link>http://feedproxy.google.com/~r/bec-systems/~3/s4VTdnBHFwU/linux-pm-omap3-suspend-support</link>
		<comments>http://bec-systems.com/site/551/linux-pm-omap3-suspend-support#comments</comments>
		<pubDate>Mon, 23 Nov 2009 22:49:02 +0000</pubDate>
		<dc:creator>Cliff Brake</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Embedded Linux]]></category>

		<category><![CDATA[kernel]]></category>

		<category><![CDATA[OMAP]]></category>

		<category><![CDATA[power management]]></category>

		<guid isPermaLink="false">http://bec-systems.com/site/?p=551</guid>
		<description><![CDATA[This article provides an overview of the Linux kernel support for the suspend state in the TI OMAP3.  Power management has always been one of the more difficult parts of a system to get right.  The OMAP3 power management is quite extensive.  There are many levels of very granular control over the entire system.  Initially, [...]]]></description>
			<content:encoded><![CDATA[<p>This article provides an overview of the Linux kernel support for the suspend state in the TI OMAP3.  Power management has always been one of the more difficult parts of a system to get right.  The OMAP3 power management is quite extensive.  There are many levels of very granular control over the entire system.  Initially, we are going to focus on a simple power state where we want to put the CPU in a low power mode (basically not doing anything), but resume very quickly once an event occurs and continue running applications where they left off.  This is typically called &#8220;Suspend&#8221;.</p>
<h1>Power States</h1>
<p>We must first match up terminology between the Linux kernel and the OMAP documentation.  The Linux kernel supports several suspend power states:</p>
<ul>
<li><strong>PM_SUSPEND_ON</strong>: system is running</li>
<li><strong>PM_SUSPEND_STANDBY</strong>: system is in a standby state.  This is typically implemented where the CPU is in a somewhat static state.  After all the peripherals have been shut down, and the memory put into self refresh, the CPU executes an instruction that puts the CPU into a low power state.  After the next wake-event occurs, the CPU resumes operating at the next instruction.  The CPU state is static in this case.</li>
<li><strong>PM_SUSPEND_MEM</strong>: This goes one step beyond STANDBY in that the CPU is completely powered down and loses its state.  Any CPU state that needs to be saved is stored to SDRAM (which is in self refresh), or some other static memory.  When the system resumes, it has to boot through the reset vector.  The bootloader determines that the system was sleeping, and re-initializes the system, enables the SDRAM, restores whatever state is needed, and then jumps to a vector in the kernel to finish the resume sequence.  This mode is fairly difficult to implement as it involves the bootloader, and a lot of complex initialization code that is difficult to debug.</li>
<li><strong>PM_SUSPEND_MAX</strong>: From browsing the kernel source code, it appears this state is used for &#8220;Off&#8221; or perhaps suspend to disk.</li>
</ul>
<p>The OMAP3 documentation uses the following terms:</p>
<ul>
<li><strong>SLM</strong>: Static Leakage Management.  Includes &#8220;suspend&#8221; functionality.</li>
<li><strong>Standby</strong>:  OMAP3x retains internal memory and logic.  (uses 7mW)</li>
<li><strong>Device Off</strong>: System state is saved to external memory(0.590mW).  This could theoretically map to the PM_SUSPEND_MEM state.</li>
<li><strong>WFI</strong>: Wait for Interrupt.  This is an ARM instruction that puts the CPU in the standby state.</li>
</ul>
<p>Based on the source code in the Linux kernel, there is currently only support for the Standby state:</p>
<pre>static int omap3_pm_enter(suspend_state_t unused)
{
	int ret = 0;

	switch (suspend_state) {
	case PM_SUSPEND_STANDBY:
	case PM_SUSPEND_MEM:
		ret = omap3_pm_suspend();
		break;
	default:
		ret = -EINVAL;
	}

	return ret;
}</pre>
<h1>What kernel branches/versions support PM</h1>
<p>Kevin Hilman has been maintaining an OMAP3 power management branch at <a href="http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git">http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git</a>.  Bits are being merged upstream.  Some of the things that don&#8217;t seem to be merged yet are SmartReflex support, and a number of other details.  But, it seems that basic suspend/resume support is available in the upcoming 2.6.32 kernel.</p>
<h1>More Details on the Standby Mechanism</h1>
<p>Due to the granularity and complexity of the the OMAP3 power management, relevant pieces of documentation are scattered throughout the OMAP35x Technical Reference Manual.  The following were helpful:</p>
<ul>
<li>Table 3-17: details the MPU subsystem operation power modes</li>
<li>Table 3-18: Power Mode Allowable Transitions.  Standby<br />
mode can enter from active mode only by executing the wait for interruption (WFI) instruction.</li>
<li>SDRC, &#8220;Self Refresh Management&#8221;.  The OMAP3 can automatically put the SDRAM in self refresh mode when the CPU enters the idle state.</li>
<li>MPU Power Mode Transistions: The ARM core initiates entering into standby via software only (CP15 - WFI).</li>
</ul>
<p>The <em>omap34xx_cpu_suspend</em> function is called to put the CPU into standby mode.  The actual instruction that stops the CPU is the ARM WFI (wait for interrupt) instruction.  This is a little different than previous generations of ARM CPUs that used coprocessor registers.</p>
<h1>Testing</h1>
<p>With the 2.6.32-rcX kernels, suspend/resume appears to work at least from the console:</p>
<pre>root@overo:~# echo mem &gt; /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)

&lt;after key press on serial console ...&gt;

omapfb omapfb: timeout waiting for FRAME DONE
CLIFF: going into suspend
Wake up daisy chain activation failed.
CLIFF: returning from suspend
Successfully put all powerdomains to target state
Restarting tasks ...
done.
root@overo:~#</pre>
<p>The CLIFF messages are debug statements placed in the low-level suspend code to make sure we were getting to that point.  The console is disabled early in the suspend process, so we don&#8217;t get the debug messages until after resume.  The <em>no_console_suspend</em> kernel option can be used to leave the console enabled during suspend, but that feature does not seem to work.</p>
<h1>Summary/Future work</h1>
<p>This covers the basics of Linux Suspend/Resume support for the OMAP3 CPU.  There are many more options and details such as configuring wake sources, dynamic power management while running, etc.</p>
<img src="http://feeds.feedburner.com/~r/bec-systems/~4/s4VTdnBHFwU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bec-systems.com/site/551/linux-pm-omap3-suspend-support/feed</wfw:commentRss>
		<feedburner:origLink>http://bec-systems.com/site/551/linux-pm-omap3-suspend-support</feedburner:origLink></item>
	</channel>
</rss>
