Open main menu

DAVE Developer's Wiki β

Changes

Power consumption (SBC Lynx)

9,818 bytes added, 09:31, 27 January 2017
Idle configurations
Please note that SBC Lynx platform is extremely flexible{{efn|Consider for example the expandability provided by J45/J52 interfaces.}}, so it is virtually impossible to test for all possible configurations and applications on the market. The use cases here presented should cover most of real-world scenarios. However actual customer's application might require more power than values reported here or customer's use case may be differ significantly with respect to the ones here considered. Therefore, '''application-specific requirements have always to be taken into consideration''' in order to size power supply unit and to implement thermal management properly.
 
==Use case #1: headless system==
<div id="PSUBlockDiagramHeadless">The following picture shows a simplified block diagram of the measurement system.</div>
 
 
[[File:SBCLynx-simplified-PSU-headless.png|thumb|center|600px|Simplified block diagram of the measurement system]]
 
 
 
Two custom power probes have been used:
*power probe #1 is connected to the input power rail (12V) supplying the entire system
*power probe #2 is connected to the input power rail of the PMIC NXP PF3000 (nominal voltage is 3.75V); this, in turn, powers the processor subsystem.
=== Heavy load configurations===
Measurements have been performed on the following platform:
* SBC Lynx rev.A (S-XUBB0110C1R)
* System software: XUELK 1.1.0
** U-Boot: U-Boot 2015.04-xuelk-1.1.0 (Nov 25 2016 - 16:43:19), Build: jenkins-XUELK_U-Boot-8
** Kernel: Linux sbc-lynx 3.14.52-xuelk-1.1.0-00026-g88e5473 #36 SMP PREEMPT Tue Dec 13 15:20:14 CET 2016 armv7l GNU/Linux
*root file system is stored on NAND flash
* processor's LDO is enabled (required to perform voltage scaling).
 
The following table shows the summary result of data collected at different checkpoints.
{|class="wikitable" style="text-align: center;"
|-
!Checkpoint
!Board power consumption<br>[mW]
!Processor subsystem power consumption<br>[mW]
|-
| U-Boot prompt || 330 || 282
|-
| Linux prompt [1]|| 268 || 230
|-
| StressAppTest || 840 || 721
|-
| Complete Stress Test || 834 || 725
|-
|}
 
 
Additional notes and reference:
* U-boot is set run processor at 396MHz
* At Linux prompt, a fixed processor clock frequency of 528MHz has been set (via <code>userspace</code> governor)
* <code>StressAppTest</code> application is used to stress CPU and DDR3L RAM (https://github.com/stressapptest/stressapptest)
* Complete Stress Test includes the following tests:
** <code>StressAppTest</code>
** USB host: read/write/verify operations on a USB memory stick
** USB otg tested as Host: read/write/verify operations on an USB memory stick
** uSD card: read/write/verify operations
** Ethernet: <code>iperf</code> TCP test running
 
=== Idle configurations ===
* SBC Lynx rev.A (S-XUBB0110C1R)
* System software: XUELK 1.1.0
** U-Boot: U-Boot 2015.04-xuelk-1.1.0 (Nov 25 2016 - 16:43:19), Build: jenkins-XUELK_U-Boot-8
** Kernel: Linux sbc-lynx 3.14.52-xuelk-1.1.0-00026-g88e5473 #36 SMP PREEMPT Tue Dec 13 15:20:14 CET 2016 armv7l GNU/Linux
* root file system stored in NAND flash
* CAN transceiver not present
 
===Generic idle===
In this case the default governor (<code>interactive</code>) is used.
 
Ethernet controller and PHY are active (but cable is disconnected).
<pre>
root@sbc-lynx:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
interactive
</pre>
{|class="wikitable" style="text-align: center;"
|-
!Board power consumption ([[#PSUBlockDiagramHeadless|probe #1]])<br>[mW]
!Processor subsystem power consumption ([[#PSUBlockDiagramHeadless|probe #2]]) [1]<br>[mW]
|-
| 206||177
|-
|}
 
===Optimized idle===
 
In this case the <code>powersave</code> governor is used. Most importantly, Ethernet interface is disabled, as described in i.MX 6UltraLite Power Consumption Measurement application note.<ref name="AN5170">NXP Semiconductors, ''i.MX 6UltraLite Power Consumption Measurement'', Rev. 1, 04/2016</ref> This allows to reduce power consumption significantly because
* processor's peripheral bus can be disabled as well
* external PHY is put in power-down mode.
{|class="wikitable" style="text-align: center;"
|-
!Average board power consumption ([[#PSUBlockDiagramHeadless|probe #1]])<br>[mW]
!Average processor subsystem power consumption ([[#PSUBlockDiagramHeadless|probe #2]])<br>[mW]
|-
| 71 || 63
|-
|}
 
 
<pre>
#!/bin/bash
 
echo 8 > /proc/sys/kernel/printk
 
ifconfig eth0 down
 
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
</pre>
 
===Deep-sleep mode (aka suspend)===
The same test bed described in the [[#Idle configurations|Idle configuration]] section has been used.
 
First the system has been configured to set up optimized idle mode, as described [[#Optimized idle|here]].
Then ''deep-sleep mode'' has been enabled by issuing the following commands:
<pre>
root@sbc-lynx:~# echo enabled > /sys/devices/soc0/soc.0/2000000.aips-bus/2000000.spba-bus/2020000.serial/tty/ttymxc0/power/wakeup
root@sbc-lynx:~# echo mem > /sys/power/state</pre>
The first command is used to enable the console UART as wake up source.
 
The following table recaps the power consumptions measured under this condition.
{|class="wikitable" style="text-align: center;"
|-
!Average board power consumption ([[#PSUBlockDiagramHeadless|probe #1]])<br>[mW]
!Average processor subsystem power consumption ([[#PSUBlockDiagramHeadless|probe #2]])<br>[mW]
|-
| 51||43
|-
|}
 
 
Ethernet PHY supports several power-management modes. The most aggressive is the ''slow-oscillator mode''. At the time of this writing, Linux kernel does not support this mode. The ''power-down mode'' is used instead. If ''slow-oscillator mode'' were implemented, about 7mW would be spared.
<br />
<br />
 
==Use case #2: system equipped with LCD panel==
<div id="PSUBlockDiagram">The following picture shows a simplified block diagram of the measurement system.</div>
[[File:SBCLynx-simplified-PSU.png|thumb|center|400px|Simplified block diagram of the measurement system]]
[[File:SBCLynx-simplified-PSU.png|thumb|center|600px|Simplified block diagram of the measurement system]]  Two custom power probes have been used:*power probe #1 is connected to the input power rail (12V) supplying the entire system (including LCD panel logic and backlight if present)*power probe #2 is connected to the input power rail of the PMIC NXP PF3000 (nominal voltage is 3.75V); this, in turn, powers the processor subsystem. ===Heavy load configurations===Measurements have been performed on the following platform (also denoted as ''testbed1'' in the rest of the document):
* SBC Lynx rev.0 (S-XUBB0000C0R) equipped with a plug-in board for 24-bit RGB LCD interfacing
**LCD p/n: KOE TX11D06vm2Apa (https://www.koe-europe.com/doc/TX11D06VM2APA.pdf)* System software: [[SBC_Lynx_Embedded_Linux_Kit_AXEL ULite and SBC Lynx Embedded Linux Kit (XUELK)|XUELK 0.9.0]], patched to include 24-bit RGB LCD support* root file system mounted via NFS over Ethernet connection* processor's LDO is enabled(required to perform voltage scaling).
The following table shows the summary result of data collected at different checkpoints:
{|class="wikitable" style="text-align: center;"
|-
!Checkpoint
!Processor subsystem power consumption ([[#PSUBlockDiagram|probe #2]])<br>[mW]
|-
| U-Boot prompt ||854760 ||568
|-
| Linux prompt [1]||10002390 ||1270
|-
| StressAppTest (LCD Blanked)||12001980 ||1610
|-
| StressAppTest + LCD || 22202780 ||1620
|-
| Complete Stress Test + LCD || 28803070 ||1880
|-
|}
[1] In this configurationcondition, Linux kernel spends most of the time in idle state because user space applications and interrupt service routines run for very short periods. However, LCD is turned on (LCD power consumption is about 600mA600mW).
Additional notes and reference:
* U-boot is set to work run processor at 396MHz* At U-boot prompt the LCD interface and circuitry are turned off* At Linux prompt, a fixed processor clock frequency of 528MHz has been set (via <code>userspace </code> governor)* All the measures include Ethernet link at 100M* <code>StressAppTest </code> application is used to stress CPU and DDR3 DDR3L RAM (https://github.com/stressapptest/stressapptest)* A 4.3 inches 480x272 LCD is used to test the 24bit parallel video interface output. The LCD backlight is driven by the 12V VIN using an external circuitry at ; brightness is set to 100% brightness
* Complete Stress Test includes the following tests:
** <code>StressAppTest</code>** USB Hosthost: read/write/verify operations on an a USB memory stick** USB otg tested as Host: read/write/verify operations on an USB memory stick** uSD card: read/write/verifyoperations** ETHEthernet: <code>iperf </code> TCP test at 100Mrunning** NAND: stress test with <code>mtd </code> kernel modules.
===Idle configurations===Some power-constrained applications can't afford to make use of [[#Deep-sleep mode (aka suspend)|deep-sleep mode]] when the system "has nothing to do", because wake up process takes may take too long to complete. In such situations aggressive implementation of so-called idle mode can come to help.Basic assumption is that the system spends most of the time in a system an idle condition, (that is there are no user applications ready to run nor interrupt requests to serve). Two idle configurations have been tested, detailed in the following sections: generic idle and system idle. System idle is the same nomenclature used NXP official documentation (specifically processor's data sheet<ref name="IMX6ULIEC">Freescale Semiconductor, ''i.MX 6UltraLite Applications Processors for Industrial Products Data Sheet'', Rev. 1, 04/2016</ref> and AN5170 application note<ref name="AN5170">NXP Semiconductors, ''i.MX 6UltraLite Power Consumption Measurement'', Rev. 1, 04/2016</ref>).
Measurements have been performed on the following platform (also denoted as ''testbed2'' in the rest of the document):
* SBC Lynx rev.0 (S-XUBB0000C0R) equipped with a plug-in board for 24-bit RGB LCD interfacing* System software: [[SBC_Lynx_Embedded_Linux_Kit_AXEL ULite and SBC Lynx Embedded Linux Kit (XUELK)|XUELK 0.9.0]]* UBIFS root file system mounted from Flash NAND* processor's LDO is enabled*TBD elencare modifiche hw (phy can ecc.required to perform voltage scaling)* Power monitorsSome hardware optimizations have been implemented to minimize power consumption: two custom current probes ** CAN transceiver has been turned off** all the unneeded pull-ups on signals in the VDD_SNVS_IN voltage domain have been usedremoved** RS232 transceiver is shutdown via unused processor's GPIO**RS485 polarization network has been removed.====Generic idle====In this case the default governor (<code>interactive</code>) is used. Ethernet controller and PHY are active (but cable is disconnected).<pre>root@sbc-lynx:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governorinteractive</pre>{|class="wikitable" style="text-align: center;"|-!Board power consumption ([[#PSUBlockDiagram|probe #1 is connected to the input power rail at 12V]]) [1]<br>[mW]**!Processor subsystem power consumption ([[#PSUBlockDiagram|probe #2 ]]) [1]<br>[mW]|-| 370||325|-|}[1] '''24MHz active oscillator power consumption is connected included'''. As the board under test is equipped with iMX6UL revision 1.0, active oscillator is required to implement the input power rail fix described by errata ERR009455. Typical consumption of this oscillator is about 20mW. Future revision of the PMIC NXP PF3000; thisboard will be populated with silicon revision 1.1 or newer. Thus active oscillator will be removed. For more details please refer to ''Chip Errata for the i.MX 6UltraLite''<ref name="IMX6ULCE">Freescale Semiconductor, in turn''Chip Errata for the i.MX 6UltraLite'', powers NXP iMX6UL processorRev. 0.1, DDR3L SDRAM, Flash memories, Ethernet PHY, TBD02/2016</ref>.
Two ====Optimized idle configurations have been tested, detailed in ====In this case the following sections<code>powersave</code> governor is used. Nomenclature Most importantly, Ethernet interface is the same used disabled, as described in the processor's data sheet'i.MX 6UltraLite Power Consumption Measurement'' application note<ref name="IMX6ULIECAN5170">Freescale SemiconductorNXP Semiconductors, ''i.MX 6UltraLite Applications Processors for Industrial Products Data SheetPower Consumption Measurement'', Rev. 1, 04/2016</ref>. This allows to reduce power consumption significantly because*processor's peripheral bus can be disabled as well*external PHY is put in power-down mode.
Please note that the consumption measured by power probe #2 takes into account PMIC PF3000 too. TBD===System idle===In this case the default <code>interactive</code> governor is used.{|class="wikitable" style="text-align: center;"
|-
!Board power consumption ([[#PSUBlockDiagram|probe #1]]) [1],[2]<br>[mW]!Processor subsystem power consumption ([[#PSUBlockDiagram|probe #2]]) [1],[2]<br>[mW]
|-
| TBD [2]90 ||TBD [2]72
|-
|}
[1] Processor subsystem includes:'''24MHz active oscillator power consumption is included'''. As the board under test is equipped with iMX6UL revision 1.0, active oscillator is required to implement the fix described by errata ERR009455. Typical consumption of this oscillator is about 20mW. Future revision of the board will be populated with silicon revision 1.1 or newer. Thus active oscillator will be removed. For more details please refer to ''Chip Errata for the i.MX 6UltraLite''<ref name="IMX6ULCE">Freescale Semiconductor, ''Chip Errata for the i.MX 6UltraLite'', Rev. 0.1, 02/2016</ref>. * iMX6UL The following commands have been used in order to configure the system. The command <code>ifconfig eth0 down</code> disables processor's Ethernet controller and puts the external PHY in power-down mode.<pre>#!/bin/bash echo 8 > /proc/sys/kernel/printk ifconfig eth0 down echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor # Disable MPUART0 (RS232 transceiver)# MPUART0_ONecho 83 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio83/directionecho 0 > /sys/class/gpio/gpio83/value # MPUART0_DENecho 136 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio136/directionecho 0 > /sys/class/gpio/gpio136/value # MPUART0_RXENecho 137 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio137/directionecho 0 > /sys/class/gpio/gpio137/value # Disable MPUART1 (RS485 transceiver)# MPUART1_ONecho 84 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio84/direction* DDRL SDRAMecho 0 > /sys/class/gpio/gpio84/value* TBD</pre>
[1] Power consumption of the following parts is excludedThe system automatically enters to and exits from system idle mode when needed:*CAN PHY<pre>*RS485 polarization networkroot@sbc-lynx:~# ./idle.shroot@sbc-lynx:~#Bus freq set to 24000000 start...*TBDBus freq set to 24000000 done!
[2] 24MHz active oscillator power consumption is includedBus freq set to 400000000 start. As the board under test is equipped with iMX6UL revision 1.0, active oscillator is required to implement the fix described by errata ERR009455. For more details please refer Bus freq set to ''Chip Errata for the i.MX 6UltraLite''<ref name="IMX6ULCE">Freescale Semiconductor, ''Chip Errata for the i.MX 6UltraLite'', Rev. 0.1, 02/2016</ref>. Future revision of the board will be populated with silicon revision 1.1 or newer. Thus active oscillator will be removed.400000000 done!
===LowBus freq set to 24000000 start...Bus freq set to 24000000 done! Bus freq set to 400000000 start...Bus freq set to 400000000 done! Bus freq set to 24000000 start...Bus freq set to 24000000 done! root@sbc-lynx:~#root@sbc-power idle===lynx:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governorpowersave</pre> In this case It is worth to remember that the use of <code>powersave</code> governor '''has a drawback in terms of system reactivity''', because processor is relatively slow to get out of the idle condition. This can lead to phenomena such as the UART RX FIFO overrun, shown in the following box{{efn|This is the same issue described [[Linux_and_interrupt_latency_(Axel)#A_real-word_case:_UART_RX_FIFO_overrun|here]].}}. In this example, a relatively long command string has been pasted into the serial console terminal:<pre>root@sbc-lynx:~# imx-uart 2020000.serial: Rx FIFO overruncat /sys/devices/system/cpu/cpugovernorcat: /sys/devices/system/cpu/cpugovernor: No such file or directoryroot@sbc-lynx:~#</pre> ===Deep-sleep mode (aka suspend)===The same test bed described in the [[#Idle configurations|Idle configuration]] section has been used. As  First the system has been configured to set up optimized idle mode, as described in [[#Optimized idle|here]].Then ''i.MX 6UltraLite Power Consumption Measurementdeep-sleep mode'' application notehas been enabled by issuing the following commands:<ref name="AN5170"pre>root@sbc-lynx:~# echo enabled >NXP Semiconductors, ''i/sys/devices/soc0/soc.0/2000000.aips-bus/2000000.MX 6UltraLite Power Consumption Measurement'', Revspba-bus/2020000. 1, 04serial/tty/ttymxc0/power/wakeuproot@sbc-lynx:~# echo mem > /sys/power/2016state</refpre>, The first command is used to enable the console UART as wake up source. The following table recaps the use of power consumptions measured under this governor allows to reduce power consumption significantly in idle condition.{|class="wikitable" style="text-align: center;"
|-
!Board power consumption ([[#PSUBlockDiagram|probe #1]]) [1],[2]<br>[mW]!Processor subsystem power consumption ([[#PSUBlockDiagram|probe #2]]) [1],[2]<br>[mW]
|-
| TBD 57||TBD47
|-
|}
[1] Power consumption of When entering DSM mode, iMX6UL turns 24MHz external active oscillator off. As the following parts board under test is equipped with iMX6UL revision 1.0, active oscillator is excluded:required to implement the fix described by errata ERR009455. For more details please refer to ''Chip Errata for the i.MX 6UltraLite''<ref name="IMX6ULCE">Freescale Semiconductor, ''Chip Errata for the i.MX 6UltraLite'', Rev. 0.1, 02/2016</ref>.*CAN [2] Ethernet PHY*RS485 polarization network*TBDsupports several power-management modes. The most aggressive is the ''slow-oscillator mode''. At the time of this writing, Linux kernel does not support this mode. The ''power-down mode'' is used instead. If ''slow-oscillator mode'' were implemented, about 7mW would be spared.
[2] 24MHz active oscillator power consumption is included. As the board under test is equipped with iMX6UL revision 1.0, active oscillator is required to implement the fix described by errata ERR009455. For more details please refer to ''Chip Errata for the i.MX 6UltraLite''<ref name="IMX6ULCE">Freescale Semiconductor, ''Chip Errata for the i.MX 6UltraLite'', Rev. 0.1, 02/2016</ref>. Future revision of the board will be populated with silicon revision 1.1 or newer. Thus active oscillator will be removed.
==Deep-sleep mode (aka suspend)==
TBD
-----
4,650
edits