Embedded Freaks..

August 13, 2010

Testing power saving mode on EA3131

Filed under: ARM9, embedded-linux — kunilkuda @ 6:20 pm

EA3131 is NXP LPC3131 (ARM926EJ-S SoC) based development kit. You can view its details from Embedded Artist website (here). The small red module on top of the base board can be used in your application (See the LPC3131 OEM board). Hence, you don’t need to design your own 6-layers board if you want to use ARM926EJ-S.

What’s good about LPC313x is their power consumption. NXP promotes the product as medium performance with lowest power consumption in ARM9 class (not to mention that this is the cheapest ARM9-based MCU on the market). The target application for LPC3131 is media processor (MP3, audio player, etc, but not video / graphic player) or industrial application.

The LPC313x Linux power management is implemented in linux-x.y.z/arch/arm/mach-lpc313x/pm.c and linux-x.y.z/arch/arm/mach-lpc313x/pm_suspend.S (Note: x.y.z refers to the Linux’s version)

To enable the power management, the LPC313x Linux kernel must be configured with ‘CONFIG_PM=y’ (depends on Linux kernel version, under Linux-2.6.33 menuconfig, this option is available under ‘Power Management options’->’Power Management support’). You may also want to enable ‘Suspend to RAM and standby’ (CONFIG_SUSPEND=y) to lower down power consumption.

Once compiled and run, the kernel power management feature can be accessed from user space through sysfs. To mount sysfs in your LPC313x system:

~ # mkdir /sys
~ # mount -t sysfs sysfs /sys

To see the available power saving mode in LPC313x system:

~ # cat /sys/power/state
standby mem

Currently LPC313x Linux power management only supports ‘standby’ and ‘mem’ (suspend to memory) mode.

To enter the standby mode:

~ # echo "standby" > /sys/power/state

To enter the “suspend to memory” mode:

~ # echo "mem" > /sys/power/state

The default kernel is configured with wake up source from SD-Card card detect IRQ (mI2STX_BCK0). Hence, the system can only be waken up by inserting or removing SD-Card into EA3131 SD-Card slot.

Here’s the typical output that you will see during sleep / wake up in the system:

~ # echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
----------------------> System is suspended..waiting for card detect IRQ to wake up

----------------------> SD-Card is inserted / removed
LPC313x ASOC main clock : 0 (36864000)
PM: suspend of devices complete after 9.477 msecs
PM: late suspend of devices complete after 0.684 msecs
Opps Clk: 21 is still enabled
PM: early resume of devices complete after 0.774 msecs
mmcblk0: unable to set block size to 512: -110
PM: resume of devices complete after 2.561 msecs
Restarting tasks ...
mmc_host mmc0: card removed
mmc0: card b368 removed
done.
LPC313x ASOC main clock : 0 (36864000)
~ #

Note: This post is copied from http://www.lpclinux.com/Forums/ForumLPC313x0004

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: