Home

AN11043 Power profiles on the LPC1100L

image

Contents

1. Set the System Clock Divider SYSAHBCLKDIV 0x1 to divide by 1 Required by the Power Profiles set_pll API Switch to the sys_pllclkin to the main clock LPC_SYSCON gt MAINCLKSEL 0x1 LPC_SYSCON gt MAINCLKUEN 0x0 LPC_SYSCON gt MAINCLKUEN 0x1 while LPC_SYSCON gt MAINCLKUEN amp 0x01 Wait until updated Specify AHBCLKDIV 1 LPC_SYSCON gt SYSAHBCLKDIV 1 0 END Required by the Power Profiles API RO OHA D oO SB W LY FE All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 6 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L AHB clock 0 system 3 Set system clock divider to 1 system clock SYSTEM CLOCK DIVIDER AHB clocks L 1 to 18 memories J and peripherals AHBCLKCTRL 1 18 2 Set sys_pllclkin as the main clock source SPIOPERIPHERAL opio Perk CLOCK DIVIDER IRC oscillator i main clock UART PERIPHERAL watchdog oscillator CLOCK DIVIDER VAR TAPER a spi roux MAIN CLKSEL main clock select sys_pllckout IRC oscillator IRC oscillator SYSTEM PLL wWDT CLOCK system oscillator sys_pllekin jj DIVIDER WDT_PCLK watchdog oscillator SYSPLLCLKSEL WD TUEN system PLL clock s elect WD T clock update enable 1 Choose IRC or system oscillator IRC oscillato
2. new_clock False use either clocking routine call or custom code to change system clock from current_clock to new_clock Power profiles usage flow diagram taken from the LPC1100L user manual use power routine call to change mode from current_mode to new_mode call or custom code to change 019aab691 AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 10 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L While Fig 4 is more detailed another simplified alternate method can be applied Fig 5 shows a much smaller condensed flow diagram This version can be used for generic multi purpose power profile function calls which handle both the set_p11 and set_power The sample project provided with this application note uses the simplified alternate method The simplified method will always bring the LPC1100L into a default state prior to configuring the new system clock and power mode Simplified flow 1 Use set_power to configure the device to Default mode at 50 MHZ 2 Call set_p11 to set the desired system clock frequency 3 Again use set_power to configure the device to the desired power mode using power profiles and changing system clock current_clock current_mode new_clock new_mode use power routine call
3. p File Edit View Project Flash Debug Peripherals Tools SVCS Wind e 2A Re Ded 4 a 2 2 set power artsample E set power API sample al volatile u endif LPC1 a43 set_power API sample Ey startup i i E core_cm0 c E system_LPC1 bac rom ROM he A startup_LPCI bos 5 i i Call set_pc a a SORGE Na Cert enh MATEY 019aab693 Fig 9 Choose between the set_pll or set_power demonstration After selecting the desired target build perform a Rebuild of all target files Project gt Rebuild all target files All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 15 of 24 NXP Semiconductors AN1 1 043 AN11043 3 2 3 3 2 4 3 2 5 Power profiles on the LPC1100L set_pll demonstration The set_p11 power profiles API demonstration is designed to simply show how easy it is to configure the LPC1100L s system clock by calling the API routines Changes in the system clock frequency can be observed through the UART UI and the status LED toggle rate set_power demonstration The set_power Profile Profiles API demonstration serves to demonstrate several features e Easy usage e Reduced current consumption e Improved CPU performance To demonstrate the reduced current consumption and improved performance this sample application
4. damage NXP Semiconductors accepts no liability for inclusion and or use of NXP Semiconductors products in such equipment or applications and therefore such inclusion and or use is at the customer s own risk Applications Applications that are described herein for any of these products are for illustrative purposes only NXP Semiconductors makes no representation or warranty that such applications will be suitable for the specified use without further testing or modification Customers are responsible for the design and operation of their applications and products using NXP Semiconductors products and NXP Semiconductors accepts no liability for any assistance with applications or customer product design It is customer s sole responsibility to determine whether the NXP Semiconductors product is suitable and fit for the customer s applications and products planned as well as for the planned AN11043 All information provided in this document is subject to legal disclaimers application and use of customer s third party customer s Customers should provide appropriate design and operating safeguards to minimize the risks associated with their applications and products NXP Semiconductors does not accept any liability related to any default damage costs or problem which is based on any weakness or default in the customer s applications or products or the application or use by customer s third party customer s Customer is responsibl
5. determine how long it needs to wait until the device can continue execution safely Calling this function will allow the user to gear the LPC1100L towards four different types of execution profiles Default mode Low Current mode Efficiency mode Performance mode Each of these profiles is designed to optimize the device towards the specified feature of interest In any case Low Current mode Performance mode and Efficiency mode will All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 8 of 24 NXP Semiconductors AN11043 yield in a lower current Power profiles on the LPC1100L consumption compared to using Default mode Each particular profile power mode is described in Table 2 Table 2 Power profile modes Power profile Description Low Current mode Low Current mode is designed for applications where minimizing current consumption has higher priority than CPU execution time Performance mode Performance mode is intended for applications where it is desired to have the fastest CPU execution regardless of the current consumption Efficiency mode Efficiency mode is intended as a general purpose mode where a balance between performance and low current consumption is needed Default mode Th e device is in Default mode after the device performs a reset The parameters available to be used by set_powe
6. set_power application example 0 17 Sample current consumption and performance POSUILS os E Conclusion Legal information cccssseeseseeesseseenneeeeeenees 21 DEFINITIONS oe eeeececeeececeeeeeeeeeeeeeeeeeeeeeeeeeeeeneees 21 DISCIAIMERS ara a 21 Trademarks ccc cccccccccccecececececeeececececeeeseceeeseeesess 21 List Of FIQUIPES cess eeseeeeeneeeeneneeeenenneeeneenees 22 List of tall secssvcciescedicsicsevecscsdccecsievavacecsietesstiaeys 23 GONG INS cscs soc cecee sac sacescceus ss acaecacecessnestesesecactes se 24 Please be aware that important notices concerning this document and the product s described herein have been included in the section Legal information NXP B V 2011 All rights reserved For more information please visit http www nxp com For sales office addresses please send an email to salesaddresses nxp com Date of release 1 March 2011 Document identifier AN11043
7. system clock frequency the faster the LED will toggle In the set_power demonstration the LED toggling indicates that the LPC1100L is ina ready state waiting for a user input on the UART UI LPCXpresso Current Measurements The application example that demonstrates the set_power API functionality allows for current measurements by inserting an ammeter on the Vpp jumper shown in Fig 6a To measure the microcontroller s current remove J2 amp J3 from the Embedded Artists LPCXpresso Base Board Fig 6b and use an external 3 3V power supply in series with the ammeter The set_power software example changes the pin I O states to minimize the current consumption where applicable Keil s MCB1000 Keil s pVision4 evaluation version is sufficient to compile the Power Profiles application example Keil also provides the MCB1000 development board which is shown in Fig 7 Flashing the LPC1114 302 can be performed by using Keil s uLink JTAG SW debugger or Flash Magic s free ISP programming utility VDD Jumper Status LED PIO2_0 019aab692 Fig 7 MCB1000 featuring the LPC1114FBD48 302 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 13 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L 3 1 2 1 MCB1000 UART User Interface All sample applications included in this appl
8. the appropriate baud rate dividers Selected freq displays the frequency option that was selected from the menu Newly configured freq displays the actual frequency output generated from set_p11 Note that set_p11 has been coded to use the CPU_FREQ_APPROX parameter 3 4 set_power application example The set_power application example also presents a UART UI to the user Here however the user only has the option to choose which set_power power profile test is to be executed Fig 11 shows a sample screen after the user has made several power profile selections A power profile test will 1 Configure the LPC1100L to the selected power mode 2 Disable the UART Interrupt routine to prevent unwanted interrupts during the test Put all the I Os into a low current consumption state for the MCB1000 Start the 32 bit Timer 0 Execute 5000000 divisions using the division library Before the 5000000 divisions complete capture the current consumption from the ammeter Stop Timer 0 after 5000000 divisions Enable the I Os for normal operation All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 17 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L 8 Enable the UART Interrupt routine for proper UART operations 9 Display the timing results in us for 5000000 divisions To keep this project
9. 011 All rights reserved Application note Rev 1 1 1 March 2011 5 of 24 NXP Semiconductors AN1 1 043 2 2 2 AN11043 Power profiles on the LPC1100L A sample call to the set_p11 power profile function would then be performed as follows 1 command 0 12000 2 command 1 16500 3 command 2 CPU_FREQ APPROX 4 command 3 0 J rom gt pWRD gt set_pll command result Similarly the set_power power profile function would be called as follows 1 command 0 24 2 command 1 PWR_CPU_EFFICIENCY 3 command 2 12 4 rom gt pWRD gt set_power command result With both set_p11 and set_power examples the results of the power profile API call are stored in the result array set_pll API function The set_p11 function configures the LPC1100L s system clock The primary advantage of using this function is to relieve the user from having to determine the necessary settings needed to configure the system PLL Usage of this function comes with a set of requirements that must be met to ensure that the system clock is properly configured The sample software included with this application note performs these steps within the config_pll_power function Before calling set_p11 ensure the following see Fig 3 1 Route the IRC or the system oscillator to sys_pliclkin 2 Configure MAINCLKSEL to MAINCLKSEL 0x1 aS main clock a Note that you must update MAINCLKSEL with the MAINCLKUEN register 3
10. 2 2 3 2 3 3 2 4 3 2 5 3 3 3 4 3 4 1 5 1 5 2 5 3 IMEFOGDUCKHION wasicei cerivis cotsceetiveesscessectteresestutesiecivestxe 3 Power profiles API c csssesssseesssseerensseenenseeeee 4 Requirements 2 cceseeneeeeseeeeeeseeeeeeeeeeeeeeneeee 4 Power profiles API 4 Executing power profiles API ce 4 set_pll API function cceeceeeeeeeetteeeeeeeeeeeeee 6 set_power API function ccceeeeeeeeeeeteeeeee 8 Application examples c cccesssseessseenseeee 12 Development boards eeseeesseeeeeeseeeeeeeees 12 LPCXPrES SO iesess ec ssczassscteteepaaiepasdeaensereergettets 12 LPCXpresso UART User Interface 12 LPCXpresso Status LED cscceeeeeeeeeees 13 LPCXpresso Current Measurements 13 Keil S MCB1000 ccccececeessseesseteeeeseteeeeeees 13 MCB1000 UART User Interface c00 14 MCB1000 Status LED cccceceeseseeeeeeeeees 14 MCB1000 current measurements 0 14 Power profiles demonstrations 0006 14 LPCXPresso project selection c ceee 14 Keil s Vision Project selection 0 060 15 set_pll demonstration cceeceeeceeeeeeeees 16 set_power demonstration cseeeeeeeees 16 Configuration options in set_pll and set_power CXGINPICS faisndtid Aah einen Lieieinds 16 set_pll application example eeeee 17
11. 43 Power profiles on the LPC1100L Power API Function ROM Driver Table Table Ptr to Driver Table 1 set_pll Ptr to Driver Table 2 set_power Ptr to Driver Table 3 Ptr to Power Profiles API Ptr to Driver Table 5 Points to ROM Driver Table N N Ptr to Driver Table n 019aab689 Fig 2 ROM pointer structure for API calls The header definitions needed to execute the power profiles API are included in the power_api h header file These definitions include the ROM Driver table and the power profiles API Function table as shown below typedef struct _PWRD void set_pll unsigned int cmd unsigned int resp void set_power unsigned int cmd unsigned int resp PWRD typedef struct _ROM const unsigned p_devl const unsigned p_dev2 const unsigned p_dev3 const PWRD pPWRD Pointer to Power Profiles API function table const unsigned p_dev5 const unsigned p_dev6 const unsigned p_dev7 const unsigned p_dev8 ROM Wo OTD oO B amp B WwW PL FE ROM rom ROM Ox1FFFIFF8 unsigned int command 4 result 2 COHN D oO B WH MH Fo To operate the power profile API functions simply call the desired function with a set of command and result argument arrays These 32 bit unsigned integer arrays are used to supply commands and return error codes AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2
12. AN11043 Power profiles on the LPC1100L Rev 1 1 1 March 2011 Application note Document information Info Content Keywords Power profiles API ROM LPC1100L Low Current Efficiency Performance set_pll set_power LPCXpresso Abstract This application note aims to describe how to use the LPC1100L s power profiles and to point out what advantages they provide NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L Revision history Rev Date Description 1 1 20110301 e Updated Fig 2 e Added Fig 5 e Corrected Default mode is not required for IAP calls 1 20110214 e Initial version Contact information For more information please visit http www nxp com For sales office addresses please send an email to salesaddresses nxp com AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 2 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L 1 Introduction The API driven power profiles featured in the LPC1100L provide users with ready to use power management templates The power profiles can be customized for any low power application allowing designers to reach ideal power levels with minimal application intervention The power profiles serve as an excellent alternative to non configurable low power modes as they can conduct dynamic power management and optimi
13. The software provided with the application notes demonstrates the set_pll and set_power API routines separately Selecting between the set_p11 and set_power demonstrations is performed differently between LPCXpresso and Keil s Vision 3 2 1 LPCXPresso project selection With LPCXpresso simply highlight the desired project demonstration and click on Debug as shown in Fig 8 AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 14 of 24 NXP Semiconductors AN11043 AN11043 Power profiles on the LPC1100L a Develop set_pll abstract txt LPCXpresso File Edit Navigate Search Run Project Window Help A n y v c gt e r R A 8 Of FSS Ee his lt r bor Core Regist T Peripherals abstract txt BS ae get 4The set Suser a 6By sele 7the LPC Sto the L Sthe UAR Quickt variabl Breakp SS Expres O 10 ii Select E Start here i2was sel 13 E New project 14 Newly Import Example project s iSoutput as 16 o Build all projects Debug 17 Note th A Build set_pil Debug 18CPU_FRE 19 rA Clean set_pll Debug SR ts Debug Set_pll Debug 21 t tset 4l 019aab719 Fig 8 Build Debug the project demonstration 3 2 2 Keil s Vision Project selection For uVision the demonstrations are easily selected as shown in Fig 9 pwrprofiles
14. and shall have no liability for the consequences of use of such information In no event shall NXP Semiconductors be liable for any indirect incidental punitive special or consequential damages including without limitation lost profits lost savings business interruption costs related to the removal or replacement of any products or rework charges whether or not such damages are based on tort including negligence warranty breach of contract or any other legal theory Notwithstanding any damages that customer might incur for any reason whatsoever NXP Semiconductors aggregate and cumulative liability towards customer for the products described herein shall be limited in accordance with the Terms and conditions of commercial sale of NXP Semiconductors Right to make changes NXP Semiconductors reserves the right to make changes to information published in this document including without limitation specifications and product descriptions at any time and without notice This document supersedes and replaces all information supplied prior to the publication hereof Suitability for use NXP Semiconductors products are not designed authorized or warranted to be suitable for use in life support life critical or safety critical systems or equipment nor in applications where failure or malfunction of an NXP Semiconductors product can reasonably be expected to result in personal injury death or severe property or environmental
15. ate for the UART UI ENABLE_CLKOUT will enable or disable the clock signal of the main clock onto the CLKOUT pin PIOO_1 To keep current consumption to a minimum this should be kept 0 MAIN_OSC allows the user to select between the main oscillator and the IRC oscillator as the clock source to sys_pliclkin See Fig 3 1 The Execution time results depend on the system clock frequency as shown in Fig 13 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 16 of 24 NXP Semiconductors AN1 1 043 AN11043 Power profiles on the LPC1100L 3 3 set_pll application example The set_pll application example simply presents the user a UART UI to select a desired system clock frequency from the presented list shown in Fig 10 COM1 57600baud Tera Term VT File Edit Setup Control Window Help set_pll Power Profiles Demo LPC1166 MAIN OSC tron d to change the system frequency z A Hz Hz Hz Hz 660006 Hz 15000000 Hz 26600006 Hz 24000000 Hz 30000000 Hz 36000000 Hz 46600006 Hz 48000000 Hz i Newly configured freq 48900008 Hz Fig 10 set_pll project menu By selecting any one of the displayed menu items 0 d the LPC1100L will call the set_p11 API function to change to the selected system clock frequency and then reconfigure the UART for
16. design simple the system frequency can only be change during compile time in the main set_power c file The system clock frequency is determined by the SYS_FREQ preprocessor definition Simply choose one of the commented FREQ definitions to select the system frequency 1 define FREQ 50000000UL 2 define FREQ 36000000UL 3 define FREQ 30000000UL 4 define FREQ 12000000UL 5 define FREQ 6000000UL 6 7 define SYS_FREQ FREQ COM1 57600baud Tera Term VT File Edit Setup Control Window Help Power Profiles Demo LPC1166 MAIN OSC digit from 3 to run a set_power test DEFAULT MODE LOW CURRENT MODE EFFICIENCY MODE PERFORMANCE MODE DEFAULT MODE Test 48600000 Hz MODE Test Duration 12664167 us g LOW CURRENT MODE Test 48660000 Hz LOW CURRENT MODE Test Duration 18645834 us Running EFFICIENCY MODE Test 48660000 Hz EFFICIENCY MODE Test Duration 12664167 us Running PERFORMANCE MODE Test 48000000 Hz PERFORMANCE MODE Test Duration 10312500 us 019aab695 Fig 11 set_power Project Menu AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 18 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L 3 4 1 Sample current consumption and performance results 5000000 Divisions Current consumption mA vs Freq MHz s Default Low Cur
17. e for doing all necessary testing for the customer s applications and products using NXP Semiconductors products in order to avoid a default of the applications and the products or of the application or use by customer s third party customer s NXP does not accept any liability in this respect Export control This document as well as the item s described herein may be subject to export control regulations Export might require a prior authorization from national authorities Evaluation products This product is provided on an as is and with all faults basis for evaluation purposes only NXP Semiconductors its affiliates and their suppliers expressly disclaim all warranties whether express implied or statutory including but not limited to the implied warranties of non infringement merchantability and fitness for a particular purpose The entire risk as to the quality or arising out of the use or performance of this product remains with customer In no event shall NXP Semiconductors its affiliates or their suppliers be liable to customer for any special indirect consequential punitive or incidental damages including without limitation damages for loss of business business interruption loss of use loss of data or information and the like arising out the use of or inability to use the product whether or not based on tort including negligence strict liability breach of contract breach of warranty or any othe
18. et_power API function configures the LPC1100L s power settings for four different execution profiles Low Current mode CPU Performance mode Efficiency mode or the Default mode Changing the device s power profile allows the user to target the microcontroller for his or her application of interest This application note is accompanied by a sample code bundle available on NXP s microcontrollers website This bundle features an implementation of a simple wrapper function that calls both set_p1l and set_power API routines The wrapper is located in power_profiles c and power_profiles h files and can be used as a reference The wrapper implementation code utilizes power profiles header definitions found in the power_api h header file The power_api h header file is found in Common inc directory Executing power profiles API The LPC1100L s power profiles API functions are stored on the device s ROM API calls to the ROM are called through a series of pointers as illustrated in Fig 2 A pointer to the ROM Driver Table is located at 0x1FFF1FF8 Table entry number 4 within that ROM Driver Table contains a pointer to the power profiles API function table The power profiles function table contains the set_p11 and set_power functions All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 4 of 24 NXP Semiconductors AN1 1 0
19. ication notes utilize the LPC1100L s UART as a user interface UI to control the device s functionality The UART is configured for 57600 N 1 It s recommended to use the Tera Term Pro serial terminal with VT100 support which is freely available Tera Term Pro download hitp en sourceforge jp projects ttssh2 releases 3 1 2 2 MCB1000 Status LED An LED connected to PIO2_0 is used as a status indicator It toggles every 0x10000 increments within a software counter The LED is used in both the set_p11 and set_power sample demonstrations In the set_p11 demonstration this LED gives the user a simple visual indication of the relative system clock rate chosen by the user The higher the system clock frequency the faster the LED will toggle In the set_power demonstration the LED toggling indicates that the LPC1100L is ina ready state waiting for a user input on the UART UI 3 1 2 3 MCB1000 current measurements The application example that demonstrates the set_power API functionality allows for current measurements by inserting an ammeter on the Vpp jumper J2 shown in Fig 7 The Vpp header pin located next to J3 can be used for current measurements To measure the microcontroller s current it is recommended to use an external 3 3V power supply in series with the ammeter The set_power software example changes the pin I O states to minimize the current consumption where applicable 3 2 Power profiles demonstrations
20. ill consume less current than Default mode AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 3 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L The goal of this application note is to inform the user when and how to use the power profiles API on the LPC1100L Moreover this application note should only be used as a reference The user needs to determine which power profile would be best suited for their application s particular requirements 2 Power profiles API 2 1 2 2 2 2 1 AN11043 Requirements The power profiles API routines are available only on the LPC1100L LPC111x x02 devices LPC1100 or LPC11C00 devices do not support the power profiles API Power profiles API The power profiles API routines are a simple and easy way to configure the LPC1100L s clock frequency and power modes The power profiles API consists of two function calls e set_pll e set_power The set_p11 API function determines and switches the LPC1100L to the optimal system PLL and system clock divider settings needed to achieve a desired system clock frequency The set_p11 API function relieves the user from having to calculate the required multiplier and divider settings needed to properly configure the system PLL effectively simplifying the overall process in configuring the system clock The s
21. nts 019aab711 a LPCXpresso featuring the LPC1114FBD38 302 b Embedded Artists LPCXpresso Base Board Fig 6 LPCXpresso featuring the LPC1114FBD48 302 3 1 1 1 LPCXpresso UART User Interface All sample applications included in this application notes utilize the LPC1100L s UART as a user interface UI to control the device s functionality The UART is configured for 57600 N 1 It s recommended to use the Tera Term Pro serial terminal with VT100 support which is freely available Tera Term Pro download http en sourceforge jp projects ttssh2 releases AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 12 of 24 NXP Semiconductors AN1 1 043 3 1 1 2 3 1 1 3 AN11043 3 1 2 Power profiles on the LPC1100L The LPCXpresso board itself does not include a UART to RS 232 level shifter Therefore it is recommended to use Embedded Artists LPCXpresso Base Board This board uses a UART to USB converter to facilitate UART communications LPCXpresso Status LED ALED connected to PIOO_7 is used as a status indicator It toggles every 0x10000 increments within a software counter The LED is used in both the set_p11 and set_power sample demonstrations In the set_p11 demonstration this LED gives the user a simple visual indication of the relative system clock rate chosen by the user The higher the
22. output exactly the frequency requested in command 1 CPU_FREQ_LTE Can be used if the requested frequency should not be exceeded such as overall current consumption and or power budget reasons CPU_FREQ_GTE helps applications that need a minimum level of CPU processing capabilities CPU_FREQ_APPROX results in a system clock that is as close as possible to the requested value it may be greater than or less than the requested value command 3 System PLL lock timeout This parameter specifies a timeout on how many polling cycles the API function will wait until a PLL has been achieved This assumes of course that the desired system clock frequency should require the PLL Setting this parameter to the desired system frequency in Hz divided by 10000 should be enough time for PLL lock to take place Result result 0 PLL_CMD_SUCCESS PLL_INVALID_FREQ PLL_INVALID_MODE PLL_FREQ_NOT_FOUND PLL_NOT_LOCKED A call to the set_p11 routine will result with a status code indicating a successful routine call or some type of error result 1 System clock in kHz If the set_p11 function doesn t return any errors this return value indicates at what frequency the system clock was set to 2 2 3 set_power API function The set_power function configures internal power control settings to match a desired type of target application Note that this function does NOT modify the system clock It requires the current and new system clock arguments only to
23. r system oscillator CLKOUT PIN CLOCK gt CLKOUT pin watchdog oscillator DIVIDER p CLKOU TUEN CLKOUT update enable 019aab690 Fig 3 LPC111x LPC11C1x clock generation unit The parameters available to be used by set_p11 are shown below and in Table 1 1 set_pll mode options 2 define CPU_FREQ_EQU 3 define CPU_FREQ_LTE 4 define CPU_FREQ_GTE 5 define CPU_FREQ_ APPROX 6 7 8 w Ne oo set_pll result options define PLL_CMD_SUCCESS 0 9 define PLL_INVALID_FREQ 1 10 define PLL_INVALID_MODE 2 11 define PLL FREQ _NOT_FOUND 3 12 define PLL _NOT_LOCKED 4 AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 7 of 24 NXP Semiconductors AN11043 AN11043 Power profiles on the LPC1100L Table 1 set_pll routine Routine set_pll Description Input command 0 System PLL input frequency in kHz This argument tells the API function at what frequency the IRC system oscillator is currently clocked at command 1 Expected system clock in kHz This argument specifies the desired system clock frequency the API should apply command 2 Mode cPU_FREQ_EQU CPU_LFREQ_LTE CPU_FREQ_GTE CPU_FREQ_APPROX This mode determines the desired outcome if an exact match of the clock frequency requested cannot be found A call specifying cPU_FREQ_EQU will only succeed if the PLL can
24. r are shown below and in Table 3 set_power mode define PWR_DEFAU define PWR_EFFIC define PWR_LOW_C set_power resu define PWR_CMD_S define PWR_INVAL 0 define PWR_INVAL RO OUND oO SB W LH FE define PWR_CPU_PERFORMANCE 1 options LT 0 ENCY 2 RRENT 3 t options UCCESS 0 D_FREQ 1 D_MODE 2 Table 3 set_ power routine Routine set_power Description Input command 0 New system clock in MHz This argument is used to inform the API function to what system clock frequency the LPC1100L should be configured for command 1 Mode PWR_DEFAULT PWR_CPU_PERFORMANCE PWR_EFFICIENCY PWR_LOW_CURRENT This mode indicates which power profile should be enabled Pi R_LOW_CURRENT is intended for those solutions that focus on lowering power consumption rather than CPU performance PWR_CPU_PERFORMANCE Configures the microcontroller so that it can provide more processing capability to the application CPU performance is 30 better than the default option PWR_EFFICIENCY setting was designed as a general purpose mode with a focus of providing a balance between execution time and low current consumption PWR_DEFAULT keeps the device in a baseline power setting similar to its reset state This mode must be used for In Application Programming IAP API routines command 2 Current system clock in MHz This parameter specifies the current clock rate of the LPC1100L when set_power is called If se
25. r theory even if advised of the possibility of such damages Notwithstanding any damages that customer might incur for any reason whatsoever including without limitation all damages referenced above and all direct or general damages the entire liability of NXP Semiconductors its affiliates and their suppliers and customer s exclusive remedy for all of the foregoing shall be limited to actual damages incurred by customer based on reasonable reliance up to the greater of the amount actually paid by customer for the product or five dollars US 5 00 The foregoing limitations exclusions and disclaimers shall apply to the maximum extent permitted by applicable law even if any remedy fails of its essential purpose 5 3 Trademarks Notice All referenced brands product names service names and trademarks are property of their respective owners NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 21 of 24 NXP Semiconductors AN11043 6 List of figures Power profiles on the LPC1100L Fig 1 Fig 2 Fig 3 Fig 4 Fig 5 Fig 6 Fig 7 Fig 8 Fig 9 Fig 10 Fig 11 Fig 12 Fig 13 AN11043 Typical flow of power profiles cee 3 ROM pointer structure for API calls 5 LPC111x LPC11C1x clock generation unit 7 Power profiles usage flow diagram taken from the LPC1100L user manual eceeeeee 10 Simplified Power Profile
26. rent Efficiency Performance Current mA 0 5 10 15 20 25 30 35 40 45 50 Freq MHz 1 The result depicted in this chart applies to 5000000 division function calls from a sample library 2 Results will vary depending on the application 3 Clock source system oscillator 4 No code optimization Fig 12 Sample results of using set_power to reduce current consumption AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 19 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L 5000000 Divisions Process duration us vs Freq MHz s Defaut Low Current Efficiency Performance 160000000 140000000 120000000 100000000 80000000 Time us 60000000 40000000 20000000 0 5 10 15 20 25 30 35 40 45 50 Freq MHz 1 The result depicted in this chart applies to 5000000 division function calls from a sample library 5 Results will vary depending on the application 6 Clock source system oscillator 7 No code optimization Fig 13 Sample Results of using set_power to improve performance 4 Conclusion The power profiles allows the user to easily change the system clock frequency dynamically without having overhead to configure the system PLL if e
27. repeatedly calls a constant runtime divide routine from a static library While the LPC1100L is performing 5000000 calls to the division library the device s current consumption can be measured externally with an ammeter Moreover by using the 32 bit Timer 0 we can also measure how long it takes for these 5000000 division operations to be completed providing a performance metric By capturing the current consumption and time duration of 5000000 divisions we can compare these metrics while the device is in Low Current Efficiency and CPU Performance mode to the Default mode Table 4 simply summarizes what type of typical results can be expected when comparing the Low Current mode vs Default mode Efficiency mode vs Default mode and Performance mode vs Default mode Table 4 set_power power profile comparisons to Default mode Calling 5000000 library division calls Profile Comparison vs Default Mode Current Consumption Execution Time Low Current mode Reduced Increased Efficiency mode Reduced Equal or Increased Performance mode Reduced Reduced Results of the set_power demonstration can be seen in the 3 4 1 Sample current consumption and performance results Configuration options in set_pll and set_power examples The following options will allow for flexible project configurations 1 Configuration options 2 define UART_BAUD 57600 3 define ENABLE_CLKOUT 0 4 define MAIN_OSC 1 UART_BAUD defines the baud r
28. s usage flow diagram 11 LPCXpresso featuring the LPC1114FBD48 302 E A E boideaie Picbiteariceviedsdiee eeeeesdeigeetsicewhse 12 MCB1000 featuring the LPC1114FBD48 302 13 Build Debug the project demonstration 15 Choose between the set_pll or set_power demonstratlON eonen onii 15 set_pll project Menu sssseseeeeeeeseereeeeeserennnee 17 set_power Project Menu cccceeeeeeeee 18 Sample results of using set_power to reduce Current CONSUMPTION ssec 19 Sample Results of using set_power to improve performa NG sisita Antena 20 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 22 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L 7 List of tables Tablet set pll routne scriniis 8 Table 2 Power profile modes eccecceseseeeseeeseneereees 9 Table 3 set_power routine seeeeeeeeeeeeeerererereeereeee 9 Table 4 set_power power profile comparisons to Default TMOG eiee e 16 AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 23 of 24 NXP Semiconductors AN11043 8 Contents Power profiles on the LPC1100L 2 1 2 2 2 2 1 2 2 2 2 2 3 3 1 3 1 1 3 1 1 1 3 1 1 2 3 1 1 3 3 1 2 3 1 2 1 3 1 2 2 3 1 2 3 3 2 3 2 1 3
29. t_p11 was executed prior to calling set_power this argument should set to the system clock frequency used before the set_p11 call AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 9 of 24 NXP Semiconductors AN11043 Power profiles on the LPC1100L Routine set_power Result Description result 0 PWR_CMD_SUCCESS PWR_INVALID_FREQ PWR_INVALID_MODE A call to the set_power routine will result with a status code indicating a successful routine call or some type of error The LPC1100L user manual depicts a flow diagram on how to use the set_p11 and set_power API functions in Fig 4 This diagram is useful if one would want to minimize API function calls by calling only the necessary functions required by the user application It is important to note that a 50 us delay is only required if set_p11 is called immediately after the set_power API function call Fig 4 use power routine call to change mode from current_mode to new_mode use either clocking routine call or custom code to change system clock from current_clock to new_clock using power profiles and changing system clock current_clock current_mode new_clock new_mode current_clock new_clock True use either clocking routine system clock from False current_clock to new_clock current_clock lt
30. to change power mode from current_mode to 50MHz default mode use clocking routine to change from current_clock to new_clock use power routine call to change power mode from 50MHz default mode to new_mode 019aab991 Fig 5 Simplified Power Profiles usage flow diagram AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 11 of 24 NXP Semiconductors AN1 1 043 Power profiles on the LPC1100L 3 Application examples This chapter describes how the program examples demonstrate the Power Profiles features The application examples demonstrate the set_p11 and set_power features separately in two different projects Both demonstrations however utilize a UART user interface and a status LED Current measurements however are only practical in the set_power demonstration 3 1 Development boards The software provided along with this application note is available for the LPCXpresso and Keil uVision4 toolchains and development boards 3 1 1 LPCXpresso The LPCXpresso development software is available at http lpcxpresso code red tech com To use the LPCXPresso board Fig 6a it is recommended to attach the Embedded Artists LPCXpresso Base Board Fig 6b to facilitate UART communications UART Status LED VDD Jumper PIO0_7 019aab710 Remove J2 amp J3 for current measureme
31. ven necessary It also provides a mechanism to optimize the LPC1100L for maximum current savings maximum CPU performance or an optimal balance of the two Low Current mode is designed to achieve the lowest current consumption whereas Performance mode is geared toward the shortest execution time Efficiency mode is intended for general purpose applications where a balance between current consumption and execution time is desired In any case all three of these modes will require less current than Default mode AN11043 All information provided in this document is subject to legal disclaimers NXP B V 2011 All rights reserved Application note Rev 1 1 1 March 2011 20 of 24 NXP Semiconductors AN11043 5 Legal information Power profiles on the LPC1100L 5 1 Definitions Draft The document is a draft version only The content is still under internal review and subject to formal approval which may result in modifications or additions NXP Semiconductors does not give any representations or warranties as to the accuracy or completeness of information included herein and shall have no liability for the consequences of use of such information 5 2 Disclaimers Limited warranty and liability Information in this document is believed to be accurate and reliable However NXP Semiconductors does not give any representations or warranties expressed or implied as to the accuracy or completeness of such information
32. ze CPU operation for various application states This feature minimizes overall energy consumption while maintaining the lowest operating current at low supply voltages Optimized for CPU performance CPU efficiency and lowest active current the power profiles enable maximum operating frequency through the entire voltage range from 1 8 V to 3 6 V without compromising speed or functionality Typical Flow of Power Profiles CPU Performance Cervereny gt 20 30 ri eductid Flexible and easy switching between power profiles during runtime in active power Runtime 019aab688 Fig 1 Typical flow of power profiles The Low Current mode is intended for applications that focus on lowering active current keeping the CPU s high processing capabilities available as required CoreMark benchmarks have shown a 20 to 30 improvement in power consumption when this mode is enabled In CPU Performance mode the microcontroller is configured to increase CPU throughput by providing more processing capability to the application CoreMark benchmark results have proven that scores increase by 35 when compared to regular operation The Efficiency mode is designed to deliver a fine balance between the CPU s ability to execute code process data and at the same time lower active current consumption Regardless of which power mode is used Low Current CPU Performance or CPU Efficiency all three power profile modes w

Download Pdf Manuals

image

Related Search

Related Contents

Dario User Manual.indb  Le dimanche entre le 30 octobre et le 5 novembre  CCPS User Manual  Mode d`emploi  AVIS - Snap-on Equipment  male edge user manual - Size Development Male Enhancement  Avaya CallPilot Manager User's Manual  Graco 1502 Series User's Manual  Service Manual  

Copyright © All rights reserved.
Failed to retrieve file