DATASHEET SEARCH SITE | WWW.ALLDATASHEET.COM
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 28
Technical content
the core enters a sleep state and fewer peripherals are active. Figure 1. Defining the Power Budget—Active and Low Power Modes and provides guidelines for achieving low power consumption in a variety of configurations and applications. Precision32™ Application Notes ar e listed on the following website: www.silabs.com/32bit-appnotes.
2 Rev. 0.1 4. Reducing Active Mode Power Consumption In active mode, the core is fetching instructions from memory and executing those instructions, and a large number of peripherals may be active at once. This section discusses ways to reduce t he SiM3L1xx device power consumption in active mode (Normal, PM1, PM4, or PM5). 4.1. Dynamic AHB/APB Clock Scaling One of the easiest ways to reduce ov erall system power consumption is to reduce the active mode time, which maximizes the amount of time spent in the low power mode. If the longest path to the next low power mode is the execution of code (e.g., a math algorithm), then it is typically beneficial to run the AHB clock at the fastest speed possible to reduce the time spent in active mode. If the longest path to the next low power mode is the transfer or collection of data through a peripheral, it is best to run the clock at the lowest speed required for the peri pheral. For example, if using the UART at 115200 baud and the core is waiting for data to finish transferring, then running the AHB and APB at the slowest clock to achieve 115200 baud may be the lowest power configuration. However, if data is being transferred memory to memory by the DMA, running the clocks at the fastest speed possible yields the lowest power consumption. Due to the clock system of the SiM3L1xx devices, the AHB and APB clo cks can be dynamica lly changed quickly and easily using the CLKCTRL module based on the needs of the application. 4.2. Using the DMA and DTM Modules The Direct Memory Access (DMA) and Data Transfer Manager (DTM) modules help move data without core intervention. This reduces overall power consumption by removing the power consum ed during flash accesses. Additionally, since the Cortex-M3 is a load-store architecture where data is loaded into and out of registers only, multiple instructions are required to move data from one area of memory to another, so the DMA and DTM may be faster than data moves by the core, depending on the AHB load. Instead of performing the data moves, the core can eith er sleep using wait-for-inter rupt (WFI) or wait-for-event (WFE) instructions, or the core can perform other tasks in parallel, reducing the active mode time. For more information on how to use the DMA and DTM modules, see “AN666:Usage Guide for e SiM3U1xx,SiM3C1xx, and SiM3L1xx DMA and DTM Modules” on the Silicon Labs 32-bit application notes website: www.silabs.com/32bit-appnotes. 4.3. Code Optimization There are several different coding techniques, compiler, and library options available for the Precision32 devices. These options will change both code size and execution speed, which may result in power consumption savings in systems which aim to execute code in active mode as qu ickly as possible before ente ring a low power state. In addition to getting to the low power mode more quickly, changing the project settings may lead to smaller code footprints, compacting the code into a smaller area with fewer memory accesses. The power consumption benefits of code optimization for speed or size will vary depending on the project requirements and code. For more information on how to write efficient code and the various optimization settings, see”AN720: Precision32™ Optimization Consideratio ns for Code Size and Speed” on the Silicon Labs 32-bit application notes website: www.silabs.com/32bit-appnotes.
instructions will take less power because the core isn’t executing complex instructions. clock, when the APB is enabled. stalls, so there is no change in power consumption with a different flash speed mode. reduced power consumption in active mode. Figure 2. Power Consumption Code Dependency
circuits with some buffer to ensure correct operation. Figure 3. Reducing Power Consumption with Adaptive Voltage Scaling
Figure 4. Reducing Power Consumption with the DC-DC Buck Converter
- Loads between 5 and 15 mA
- Power switch size set to 0 (PSMD = 0)
- Asynchronous mode enabled (ASYNCEN = 1)
- Minimum pulse width set to 40 ns (MINPWSEL = 3)
- Power switch size set to 0 (PSMD = 0)
- Synchronous mode enabled (ASYNCEN = 0)
- Minimum pulse width disabled (MINPWSEL = 0)
- Power switch size set to 3 (PSMD = 3)
- Synchronous mode enabled (ASYNCEN = 0)
- Minimum pulse width disabled (MINPWSEL = 0)
Table 1 shows a summary of these settings for each load configuration. (VBAT) or the dc-dc converter output independently. yield lower power consumption. bypassed (BEN = 1), which connects VBATDC to VDC, or disabled (DCDCEN = 0). Table 1. DC-DC Load Configurations
Rev. 0.1 7 5. Reducing Power Consumption in Low Power Modes In low power mode, the device core halts and the number of active peripherals typica lly reduces to the minimum required by the application (i.e., real time clock). This section discusses techniques to reduce the SiM3L1xx device power consumption in low power modes (PM2, PM3, PM6, and PM8). 5.1. SiM3L1xx Low Power Mode Overview The SiM3L1xx devices feature seven low power modes in addition to normal operating mode. Several peripherals provide wake up sources for these low power modes, in cluding the Low Power Timer (LPTIMER0), RTC0 (alarms and oscillator failure noti fication), Comparator 0 (CMP0), Advanced Capture Counter (ACCTR0), LCD VBAT monitor (LCD0), UART0, low power mode charge pump failure, and PMU Pin Wake. In addition, all peripherals can have their clocks disa bled to reduce power consumption with the clock control (CLKCTRL) registers whenever a peripheral is not being used. The SiM3L1xx devices have the power modes defined in Table 2. 5.1.1. Normal Mode (Power Mode 0) Normal mode encompasses the typical full-speed operation. The power consumption of the device in this mode will vary depending on AHB/APB clock speeds, the settings of CLKCTRL and the peripherals, and the dc-dc converter and LDO settings. 5.1.2. Power Mode 1 Power Mode 1 occurs when the core executes code from RAM instead of flash. The power consumption of the device is less than normal mode when in PM1. 5.1.3. Power Mode 2 In Power Mode 2, the core halts and the peripherals run at full speed. To place the device in this mode, the clock settings in CLKCTRL should remain the same as Normal or Power Mode 1 and the core should execute a WFI or WFE instruction. If the WFI instruction is called from an interrupt service routine, the interrupt that wakes the device from PM2 must be of a sufficient priority to be recogn ized by the core. It is recommended to perform both a DSB (Data Synchronization Barrier) and an ISB (Instruction Synchronization Ba rrier) operation prior to the WFI to ensure all bus access is complete. 5.1.4. Power Mode 3 Fast Wake Power Mode 3 Fast Wake occurs when all the clocks are stopped except for the LFOSC0 or RTC0TCLK. The core and the peripherals are halted in this mode. The available wake up sources to wake from PM3 are controlled by the Power Management Unit (PMU). The available wake up sources are: Low Power Timer (LPTIMER0), RTC0 (alarms and oscillator failure notification), Comparator 0 (CMP0), advanced capture counter (ACCTR0), LCD VBAT monitor (LCD0), UART0, and PMU Pin Wake. Any reset event will also wake the device from PM3. If the WFI instruction that wakes the device from PM3 Fast Wake is called from an interrupt service routine, the interrupt that wakes the device from PM3FW must be of a sufficient priority to be recognized by the core. By keeping the core clock running at a slow frequency in PM3 and changin g the AHB and APB clocks to the Low Power Oscillator, the de vice can wake up faster than in standard Power Mode 3 at the expense of higher power consumption. 5.1.5. Power Mode 3 Power Mode 3 occurs when all the clocks are stopped, and the core and the peripherals are halted. Waking from PM3 requires one of the PMU wake sources described in “5.1.4. Power Mode 3 Fast Wake” to be properly configured. If the WFI instruction is called from an interrupt service routine, the interrupt that wakes the device from PM3 must be of a sufficient priority to be recognized by the core. 5.1.6. Power Mode 4 Power Mode 4 is the same as normal operation except the AHB clock operates at a slower speed. The power consumption of the device in this mode will vary depe nding on the AHB/APB clo ck speeds, the settings of CLKCTRL and the peripherals, and the dc-dc converter and LDO settings.
8 Rev. 0.1 5.1.7. Power Mode 5 Power Mode 5 is the same as PM1 with a slower AHB clo ck source selected. The core executes code from RAM instead of flash. The power consumption of the device in PM5 is slightly less than PM4. 5.1.8. Power Mode 6 In Power Mode 6, the core halts and the peripherals run at a slower speed than PM2. To place the device in this mode, the clock settings in CLKCTRL should remain the same as PM4 or PM5, and the core should execute a WFI or WFE instruction. If the WF I instruction is called from an interrupt se rvice routine, the inte rrupt that wakes the device from PM6 must be of a sufficient priority to be recognized by the core. 5.1.9. Power Mode 8 In Power Mode 8, the core and most peripherals are halted, most clo cks are stopped, and re gisters retain their state. In addition, the LDO regulators are disabled, so all active circuitry operates directly from VBAT. Alternatively, the PMU has a specialized VBAT-divided-by-2 low power mode charge pump that can power some internal modules while in PM8 to save power. The fully operational functions in this mode are: LPTIMER0, RTC0, UART0 running from RTC0TCLK, port match, advanced capture counter, and the LCD controller. This mode provides the lowest power consumption for the device, but requires an appropriate wake up source or reset to exit. The available wake up or reset sources to wake from PM8 are controlled by the Power Management Unit (PMU). The available wake up sources are: Low Power Timer (LPT IMER0), RTC0 (alarms and oscillator failure notification), Comparator 0 (CMP0), advanc ed capture counter (ACCTR0), LCD VBAT monitor (LCD0), UART0, low power mode charge pump failure, and PMU Pin Wake. The available reset sources are: RESET pin, VBAT supply monitor, Comparator 0, Comparator 1, low power mode charge pump failure, RTC0 oscillator failure, or PMU wake event. To enter this mode, firmware must write the SLEEPDEEP bit in the ARM Syst em Control Register. Firmware must then execute a WFI or WFE instruction. The core will remain in PM8 until an enabled wake up or reset source occurs.
Table 2. SiM3L1xx Power Modes
- Connect a USB Debug Adapter to the 10-pin CoreSight connector (J14).
- Remove the three shorting blocks from J7.
- Remove the JP2 Imeasure shorting block and put a multimeter across (positive side on the bottom pin).
- Move the VBAT Sel switch (SW2) to the middle +3.3 V_VREG position.
- Move the VIO Sel (SW8) and VIORF Sel (SW9) switches to the bottom VBAT position.
- Connect the 9 V power adapter to POWER (J6).
- Download the code to the board.
- Remove the debug adapter connection.
- Measure the power of the device.
Figure 5. SiM3L1xx MCU Card Power Measurement Configuration—Fixed VBAT
9 V Power
- Connect a USB Debug Adapter to the 10-pin CoreSight connector (J14).
- Remove the three shorting blocks from J7.
- Remove the JP2 Imeasure shorting block.
- Move the VBAT Sel switch (SW2) to the bottom BAT position.
- Move the VIO Sel (SW8) and VIORF Sel (SW9) switches to the bottom VBAT position.
- (Optional) Place a battery in the BT1 holder.
- (Optional) Instead of a battery, connect the positive terminal of a bench power supply to the positive
prevent any circuitry on the board from interfering with the power measurement.
- Download the code to the board.
- Remove the debug adapter connection.
- Measure the power of the device.
Figure 6. SiM3L1xx MCU Card Power Measurement Configuration—Varying VBAT
12 Rev. 0.1 5.2.2. Configuring a Device for Normal (PM0) and Power Mode 4 In Normal (PM0) and Power Mode 4, the device executes code from flash. The only difference between PM0 and PM4 is the core clock speed (fast and slow, respectively). To configure a device to run in PM0 or PM4: 1. Enable the clocks to peripherals that will be configured by firmware. 2. Select the desired clock source (LPOSC0, PLL0, etc.) and speed for both AHB and APB clocks. 3. Select the desired adaptive voltage scaling settings using the LDO module. 4. (Optional) Disable the retention mode of any enabled RAM banks. 5. Set the pins in the lowest power configuration for this mode. 6. Disable all unused peripherals. 7. Disable the clocks to all unused peripherals. 8. Jump to code in flash. To measure the data sheet numbers using an SiM3 L1xx MCU Card and the AN725_PowerModes_0_and_4 example: 2. Open the AN725_PowerModes_0_and_4 example in either Keil µVision or the Precision32 IDE. 3. Select the desired settings using the #defines at the top of the file. There is a set of defines for each data sheet specification. 4. Compile and download the code to the device. 5. Disconnect the USB Debug Adapter. 6. Reset the device. 7. Measure the power consumption of the device. 5.2.3. Configuring a Device for Power Modes 1 and 5 In Power Modes 1 and 5, the device executes code from RAM rather than flash. The only difference between PM1 and PM5 is the core clock speed (fast and slow, respectively). Keil µVision uses a scatterfile with a retention RAM tag defined as MCU_RAM_CODE: MCU_IRAM +0 { .ANY (+RW +ZI) .ANY (MCU_RAM_CODE) The project source file can then define a tag in code to place functions in this section of memory: #define __SI32_RRAM __attribute__ ((section("MCU_RAM_CODE"))) Any functions that use the __SI32_RRAM tag in the definition will be placed in RAM starting at 0x2000_0000: __SI32_RRAM void run_PM1(void) ... For Precision32 projects, a function can be located in RAM by treating it like normal data and applying a data
Rev. 0.1 13 section attribute tag to it. This tag will result in a warning indica ting that code is being placed in the data section, but this warning can be ignored. As an example, placing the PowerModes_2_or_6() function in RAM would look like: void PowerModes_2_or_6(void) ... There are two ways to access the function in RAM: dire ct call or function pointer. Direct calls can cause some issues with debugging the code in RAM, and the debugger may just step over the function instead of stepping into it. To work around this, single step at the instruction level, set a breakpoi nt in the RAM code, or use a function pointer. To configure a device to run in PM1 or PM5: 1. Enable the clocks to peripherals that will be configured by firmware. 2. Select the desired clock source (LPOSC0, PLL0, etc.) and speed for both AHB and APB clocks. 3. Select the desired adaptive voltage scaling settings using the LDO module. 4. (Optional) Disable the retention mode of any enabled RAM banks. 5. Set the pins in the lowest power configuration for this mode. 6. Disable all unused peripherals. 7. Disable the clocks to all unused peripherals. 8. Jump to code in RAM. 9. (Optional) Disable the AHB clock to the flash controller. To measure the data sheet numbers using an SiM3 L1xx MCU Card and the AN725_PowerModes_1_and_5 example: 2. Open the AN725_PowerModes_1_and_5 example in either Keil µVision or the Precision32 IDE. 3. Select the desired settings using the #defines at the top of the file. There is a set of defines for each data sheet specification. 4. Compile and download the code to the device. 5. Disconnect the USB Debug Adapter. 6. Reset the device. 7. Measure the power consumption of the device. The code executes from RAM in this mode, so all functions called should also be in RAM.
14 Rev. 0.1 5.2.4. Configuring a Device for Power Modes 2 and 6 For Power Modes 2 and 6, the core halts and no longer exec utes code, but the active peripherals still run from the APB clock. The only difference between PM2 and PM6 is the APB clock speed (fast and slow, respectively). To configure a device to run in PM2 or PM6: 1. Enable the clocks to peripherals that will be configured by firmware. 2. Select the desired clock source (LPOSC0, PLL0, etc.) and speed for both AHB and APB clocks. 3. Select the desired adaptive voltage scaling settings using the LDO module. 4. Disable Power Mode 8 in the Clock Control module. 5. (Optional) Disable the retention mode of any enabled RAM banks. 6. Set the pins in the lowest power configuration for this mode. 7. Set up the wakeup interrupt source (including priority). 8. Disable the SysTick timer to prevent these interrupts from waking the core. 9. Disable all unused peripherals. 10. Disable the clocks to all unused peripherals. 11. Jump to code in RAM. 12. Execute the DSB (Data Synchronization Barrier), ISB (Instruction Synchronization Barrier), and WFI (Wait for Interrupt) or WFE (Wait for Event) instructions. For SiM3L1xx devices, WFI and WFE have the same behavior. To measure the data sheet numbers using an SiM3 L1xx MCU Card and the AN725_PowerModes_2_and_6 example: 2. Open the AN725_PowerModes_2_and_6 example in either Keil µVision or the Precision32 IDE. 3. Select the desired AHB clock rate using the #defines at the top of the file. 4. Compile and download the code to the device. 5. Disconnect the USB Debug Adapter. 6. Reset the device. 8. Measure the power consumption of the device. 9. Press PB1.5 to wake the device from PM2 or PM6. When this happens, the PB1.7 LED will turn on and the core will sit in an infinite while(1) loop. The interrupt that wakes the core from the halted state must have sufficient priority if the WFI or WFE instruction was called from within an ISR.
Rev. 0.1 15 5.2.5. Configuring a Device for Power Mode 3 Fast Wake In PM3 Fast Wake, all clocks are stopped except for a very low frequency clock (RTC0OSC or LFOSC0) that allows the core to wake up faster than standard PM3. To configure a device to run in PM3 Fast Wake: 1. Enable the clocks to peripherals that will be configured by firmware. 2. Select the desired adaptive voltage scaling settings using the LDO module. 3. Disable Power Mode 8 mode in the Clock Control module. 4. Set the AHB clock to the low power oscillator (LPOSC0). 5. Select the fast wake clock source using the PM3CSEL field in the CLKCTRL PM3CN register. 6. Enable fast wake mode by setting the PM3CEN bit to 1 in the PM3CN register. 7. (Optional) Disable the retention mode of any enabled RAM banks. 8. Set the pins in the lowest power configuration for this mode. 9. Set up the desired PMU wakeup source. 10. Put all of the LDOs in low bias mode. 11. Clear the PMU wakeup flags. 12. Disable the SysTick timer. 13. Disable all unused peripherals. 14. Disable the clocks to all unused peripherals. 15. Execute the DSB, ISB, and WFI or WFE instructions. For SiM3L1xx devices, WFI and WFE have the same behavior. To measure the data sheet numbers using an SiM3L1xx MCU Card and the AN725_PowerMode3_Fast_Wake example: 2. Open the AN725_PowerMode3_Fast_Wake example in either Keil µVision or the Precision32 IDE. 3. Select the desired AHB clock rate using the #defines at the top of the file. 4. Compile and download the code to the device. 5. Disconnect the USB Debug Adapter. 6. Connect PB0.2 to PB1.5 using a short wire and the J21 and J22 headers. 7. Reset the device. 9. Measure the power consumption of the device. 10. Press PB1.5 to wake the device from PM3FW. When this happens, the PB1.7 LED will turn on and the core will sit in an infinite while(1) loop.
16 Rev. 0.1 5.2.6. Configuring a Device for Power Mode 8 PM8 is the lowest power mode where all clocks are stopped and only the PM8 peripherals are available. The RAM banks do not have retention enabled by default, so firmware must enable each bank to retain data through PM8. For most applications, it is recommended to enable rete ntion for all RAM banks, but the specific bank containing the stack pointer must be enabled to ensure proper code operation on an exit from PM8. See “5.5. Retention RAM” for more information on changing the location of the stack pointer. To configure a device to run in PM8: 1. Enable the clocks to peripherals that will be configured by firmware. 2. Enable PM8 mode by setting the PMSEL bit to 1 in the CLKCTRL CONFIG register. 3. Set up the desired PMU wakeup source. 4. Switch the AHB clock to the 20 MHz Low Power Oscillator and adjust the flash read timing as necessary. 5. Enable the retention mode of RAM banks needed by the application (all eight banks recommended for most applications). Note: To properly execute code after exiting PM8, the stack pointer must be located in a RAM bank with retention enabled. 6. Set the pins in the lowest power configuration for this mode. 8. (Optional) If VBAT is between 2.0 to 3.8 V, set the VBAT Monitor threshold to the high setting. 9. Set up the low power peripherals as desired (RTC0, ACCTR0, LCD0, etc.). 10. (Optional) If using the RTC in low-frequency oscillator mode, enable the RTC0 module using the steps in the Reference Manual. If using the RTC in crystal mode, the recommended initialization sequence is: a. Disable RTC0 automatic gain control (AGC) and enable the bias doubler. b. Set up the RTC0 in crystal mode using the list of steps in the Reference Manual. c. (Optional) Enable the charge pump (see Step 10). d. Enable RTC0 automatic gain control and disable the bias doubler. 11. (Optional) Configure and enable the charge pump: a. Enable the low power charge pump monitor in the PMU. b. Enable the RTC0 clock to other modules (CLKOEN = 1 in the RTC0 module). c. Enable the low power charge pump monitor as a reset source. d. Set the low power charge pump load to the appropriate value for the application. See “5.3. Low Power Mode Charge Pump” for more information. e. Enable the low power charge pump and enable it as a PMU wake up source. f. Enable the low power charge pump interrupt. 12. Disable all undesired reset sources. Note: The Watchdog Timer (WDTIMER0) and PVTOSC0 modules will behave as if a power-on reset occurred after exiting PM8, so disabling the Watchdog Timer as a reset source will prevent unwanted resets. 13. Disable the SysTick timer. 14. Disable all unused peripherals. 15. (Optional) Disable the clocks to all unused peripherals. Entering PM8 stops all clocks, so this step is not necessary for this mode. 16. Clear the PMU wakeup flags. 17. Enable the interrupts for the PMU wakeup source (enabled in Step 3). 18. Set the SLEEPDEEP bit in the core. 19. Execute the DSB, ISB, and WFI or WFE instructions. For SiM3L1xx devices, WFI and WFE have the same behavior.
Rev. 0.1 17 To measure the data sheet numbers using an SiM3L1xx MCU Card and the AN725_PowerMode_8 example: 2. Open the AN725_PowerMode_8 example in either Keil µVision or the Precision32 IDE. 3. Select the desired AHB clock rate using the #defines at the top of the file. 4. Compile and download the code to the device. 5. Disconnect the USB Debug Adapter. 6. Connect PB0.2 to PB1.5 using a short wire and the J21 and J22 headers. 7. Power down the board. 8. Power up the board. This will cause a power-on reset that will clear the settings of some modules (i.e., PMU). 10. Measure the power consumption of the device. 11. Press PB1.5 to wake the device from PM8. When this happens, the PB1.7 LED will turn on and the core will sit in an infinite while(1) loop.
circuitry of the LCD and Pulse Counter is always powered directly from the VBAT pin.
- It provides approximately VBAT divided-by-2 to the oscillators and digital logic, reducing their inherent
- It provides a transformer effect which causes the current pulled from the VBAT input to be ideally one-half
of the current actually consumed by the circuitry powered by the charge pump. Equation 1 shows the equation for the output voltage of the charge pump. selected by the RTC0 module, as shown in Table 3. for a given charge pump load current, Equation 2 must be true. reduces the current consumed by the load circuitry. device. Reducing CPLOAD can further reduce the leakage at these temperatures. Table 3. Charge Pump Output Drive Settings
Rev. 0.1 19 5.3.1. Monitor The SiM3L1xx devices include a low-power voltage monitor that compares the output of the low power mode charge pump against a factory-trimmed 0.95 V reference voltage. This monitor can serve as an interrupt, a PM8 wakeup source, and a reset source. It is highly recommended that this monitor be enabled and used as a wakeup or interrupt sour ce. However, if Equation 2 will always be true under all valid operating co nditions, the monitor is not strictly required. Leaving the monitor disabled introdu ces the risk that the device could lock-up, requiring an external reset or power cycle to recover. This can occur if the select ed RTC0 oscillator is disturbed and stops oscillating, thereby causing the charge pump output to fail. Since the charge pump powers the RTC0 oscillators, the RTC fail notification is not sufficie nt to detect this condit ion, and it will not correct itself without external intervention. The charge pump voltage monitor consumes approximately 15 nA, when enabled. When used as a wakeup and interrupt source, the charge pump monitor can alert the firmware that the charge pump output is nearing 0.95 V. This may occur as temper ature rises, for example, causing additional thermal leakage from the PM8 circuitry. The firmware can resp ond by decreasing the charge pump drive impedance by increasing CPLOAD, assuming the drive is not yet at its minimum. Otherwise, firmware must either reduce the PM8 load (by disabling RAM banks or other PM8 active modules) or place the charge pump in bypass mode. When changing the charge pump mode, it is recommended that all digital logic using the RTC0 oscillators be temporarily disabled. Otherwise, a glitch from the oscillators due to the sudden change in the charge pump output may disturb the logic’s operation. 5.3.2. Measuring PM8 Charge Pump Current To measure the charge pump load current, use CMP0 to detect the output voltage of the charge pump during PM8. This output voltage, combined with an ADC measurement of the VBAT value, can help estimate the present charge pump load in PM8. To do this: 1. Enable the charge pump with CPLOAD set to 3. 2. Configure the charge pump monitor to wake up and interrupt the device. 3. Configure CMP0 to wake and interrupt the device if the charge pump output voltage is equal to 16 x VBAT/ 64 (0x10) using the comparator DAC feature. 4. Schedule an RTC0 alarm to wake and interrupt the device in 1 ms. 5. Enter PM8 and wait for a wakeup event. 6. If the wakeup event occurred from the voltage monitor, this indicates the present VBAT voltage is too low to operate the charge pump. The charge pump should be configured for bypass mode and this measurement aborted. 7. If the wakeup event was the comparator, change the CMP0 to compare against 8 x VBAT/64 (0x08). 8. If the wakeup event was the RTC0 alarm, change the CMP0 to compare against 24 x VBAT/64 (0x18). 9. Repeat this process starting at step 4, continuing to change the CMP0 DAC using a successive- approximation method to obtain a 5-bit digital value for the charge pump output voltage, where 0x1F corresponds to 31 x VBAT/64. 10. Use the SARADC0 module to measure the voltage on the VBAT input. 11. Calculate the estimated charge pump load current using Equation 1, the VBAT and final CMP0 DAC value, and the appropriate value for R CPLOAD. If the resulting load current is small enough that the next lowest setting of CPLOAD results in a charge pump output greater than 0.95 V, this sequence can be repeated with CPLOAD set to 2 to obtain a more accurate measurement of the load current, and so forth.
20 Rev. 0.1 5.3.3. Dynamic Charge Pump Drive Impedance The low power mode charge pump supports four drive impedance settings. For applications requiring aggressive PM8 current reduction, these settings can be adjusted dynamically to minimize the total low power mode current consumed. This adjustment could be performed by meas uring the charge pump load current as described in Section 5.3.2 before each entry into PM8 and setting the appropriate drive impedance. However, a faster and simpler method is available. The charge pump dynamic scaling method consists of two parts: 1. Determine when the drive impedance should be decreased by using the charge pump voltage monitor. Each time the monitor trips, firmware should reduce the drive impedance setting. If the setting is already at its minimum, firmware can place the charge pump in bypass mode or disable active PM8 circuitry. 2. Determine when the drive impedance can be increased. On a regular but relatively infrequent basis, firmware can determine if the CPLOAD setting can be decreased by one without causing the charge pump output to fall below 0.95 V as described in this section. The output state of the charge pump in PM8 is given by Equation 1. The required state of the charge pump if CPLOAD is reduced by 1 is given by: Equation 3. Charge Pump Output Voltage at an Increased Impedance In Equation 3, the R CPLOAD-1 term is the drive impedance for CPLOAD -1. Putting these equations together and solving for ILOAD gives: Equation 4. Minimum Charge Pump Output Voltage to Increase Drive Impedance Equation 4 provides the minimum V CP value for the present CPLOAD setting that allows CPLOAD to be reduced by 1 without the output dropping below 0.95 V. Using this equation, the CMP0 DAC setting that corresponds to this equation can be written as: Equation 5. CMP0 DAC Setting for Minimum Charge Pump Output Voltage to Increase Drive Impedance On a regular basis, firmware can perform the following steps: 1. Use the SARADC0 module to measure VBAT. 2. Set the CMP0 DAC to the value determined by Equation 5. 3. Configure CMP0 to wake and interrupt the device if the charge pump output voltage is less than the CMP0 DAC. 4. Schedule an RTC0 alarm to wake and interrupt the device in 1 ms. 5. Enter PM8 and wait for a wakeup event. 6. If the wakeup event was the comparator, CPLOAD should not be reduced by 1. Otherwise, CPLOAD can be reduced by 1. Equation 4 includes some safety margins that might not be immediately obvious, since it assumes that the charge pump load current is independent of the charge pump output voltage. In fact, the PM8 circuitry requires less current as its supply lowers. Sinc e reducing CPLOAD by 1 will decrease the ch arge pump output volt age, the resulting output voltage should always be greater than 0.95 V, assuming Equation 4 is satisfied. VBAT VCP VBAT RCPLOAD RCPLOAD 1– 0.95 V RCPLOAD RCPLOAD 1– + DAC ceiling 32 1 RCPLOAD RCPLOAD 1– 64 0.95 V RCPLOAD 1– + =
example of the common waveforms for 4-mux mode. common signal is 0 V or 3 V, which leads to ±1 V on the segment. must drive a 6 V transition overall. Figure 8. Traditional LCD Segment Transition
3 V 3 V
Rev. 0.1 25 5.4.3. Refresh Rate The LCD0 module on SiM3L1xx devices includes a progra mmable refresh rate by setting the CLKDIV bits in the CLKCONTROL register. The LCD mult iplexor mode must be taken into account when determining the prescaler value. The LCD power consumption will scale proportionally with the refres h rate. For maximum power savings, choose the slowest LCD refresh rate and the minimu m LCD0 clock frequency that provides acceptable performance for the application. For the least flicker, choose a fast LCD refresh rate. 5.5. Retention RAM The retention RAM on SiM3L1xx devices is in eight 4 kB banks. All eight banks are available when not in PM8, but can be individually powered down when in PM8. The current leakage of the RAM at higher temperatures may increase, so disabling any unused banks when entering a low power mode may reduce system power consumption. For most applications, it is recommended to enable retent ion for all RAM banks. The specific bank containing the stack pointer must be enabled to ensure proper code operation on an exit from PM8. 5.5.1. Adjusting the Stack Pointer with Keil µVision With Keil µVision projects, the stack location can be controlled in the scatterfile. The default linker_sim3l1xx_arm.sct scatterfile can be found in the C:\\SiLabs\\32bit\\si32- x.y.z\\si32Hal\\sim3l1xx directory, where x is the major si32HAL version, y is the minor version, and z is the trivial version. Inside the scatterfile: ARM_LIB_STACK (SI32_MCU_RAM_BASE + SI32_MCU_RAM_SIZE) The value in the parentheses after the ARM_LIB_STACK l abel is the location of the stack pointer in memory. Change this value as needed for the application and ensure this RAM bank has retention enabled. 5.5.2. Adjusting the Stack Pointer with the Precision32 IDE In the Precision32 IDE, projects can use a custom linker script file edited manually or the IDE dialogs to modify the stack pointer address. To add a custom linker script file manually: Right-click on the project name in the Project Explorer view and select New Folder. This folder must use the linkscripts name. Copy the link_template.ld file from the Precision32 installation directory ..\\IDE\\precision32\\Wizards\\linker to the project’s linkscripts folder. Open the project’s link_template.ld file and edit the stack line near the bottom of the file:
- Right-click on the project_name in the Project Explorer view.
- Click on C/C++ BuildSettingsTool Settings tabMCU LinkerTarget and input the desired stack
a multiple of 4. Figure 17 shows this dialog in the Precision32 IDE. Figure 17. Using the Precision32 IDE to Select the Project Library project to verify the stack location changed as desired.
Rev. 0.1 27 6. General Power-Saving Tips 6.1. Pins Placing any unused pins in analog mode using the PBSTD module (PBMDSEL.x = 0) disables the drivers and weak pull-ups on the pin. The pin will float and consume little power. For pins that are connected to external hardware, place the pins in analog mode if possible. If this is not possible, place the pins in a natura l state that will consume no power. For exam ple, if a pin has an external pull-down resistor, putting a ‘0’ in the latch will draw no current from the external pull-down. If the system configuration allows it, disabling weak pull-ups on a port-by-port basis may also help reduce unnecessary power consumption in the pins. 6.2. Peripherals Before entering the low power mode, disable any unwanted peripherals. Stopping the clock to the peripheral may disable the peripheral, but if the peripherals operate on a clock independent from the AHB or APB clocks, only the peripheral registers will be disabled. Disabling the module explicitly (D CDCEN = 0 for the DCDC0 module, for example) will ensure the module does not draw extra power in the low power mode. 6.3. Biases In addition to peripherals, disable an y unneeded bias sources in the device before entering the low power mode. These biases draw current to provide voltage references inside the chip. One example of a bias is the 1.2/2.4 V VREF0 module or the ADC internal 1.65 V voltage reference. 6.4. Clocks External oscillators require a bias to start and maintain oscillation. If possible, switching to the internal oscillators and stopping the external oscillato r will reduce the power cons umption. The internal precision oscillator also requires extra current to op erate. In most cases, s witching the AHB and APB clock to the Low Power Oscillator (LPOSC0) or RTC0 oscillator before entering the low power mode will result in the lowest power consumption. The SiM3L1xx devices feature programmable clocks for each peripheral. When entering a low power mode, disabling the clocks to any unused peripherals will reduce the system power consumption.
28 Rev. 0.1 CONTACT INFORMATION Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701 Tel: 1+(512) 416-8500 Fax: 1+(512) 416-9669 Toll Free: 1+(877) 444-3032 Please visit the Silicon Labs Technical Support web page: https://www.silabs.com/support/pages/contacttechnicalsupport.aspx and register to submit a technical support request. Patent Notice Silicon Labs invests in research and development to help our customers differentiate in the market with innovative low-power, small size, analog- intensive mixed-signal solutions. Silicon Labs' extensive patent portfolio is a testament to our unique approach and world-class engineering team. Silicon Laboratories and Silicon Labs are trademarks of Silicon Laboratories Inc. Other products or brandnames mentioned herein are trademarks or registered trademarks of their respective holders. The information in this document is believed to be accurate in all respects at the time of publication but is subject to change without notice. Silicon Laboratories assumes no responsibility for errors and omissions, and disclaims responsibility for any consequences resulting from the use of information included herein. Additionally, Silicon Laboratories assumes no responsibility for the functioning of undescribed features or parameters. Silicon Laboratories reserves the right to make changes without further notice. Silicon Laboratories makes no warranty, rep- resentation or guarantee regarding the suitability of its products for any particular purpose, nor does Silicon Laboratories assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation conse- quential or incidental damages. Silicon Laboratories products are not designed, intended, or authorized for use in applications intended to support or sustain life, or for any other application in which the failure of the Silicon Laboratories product could create a situation where per- sonal injury or death may occur. Should Buyer purchase or use Silicon Laboratories products for any such unintended or unauthorized ap- plication, Buyer shall indemnify and hold Silicon Laboratories harmless against all claims and damages.