AN92584 RAMTRON | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 42
Technical content
www.cypress.com Document No. 001-92584 Rev. *A 1 AN92584 Designing for Low Power and Estimating Battery Life for BLE Applications Authors: Uday Agarwal, Kunal Patel, Vikram, Prathap Reddy, Santosh S Associated Project: Yes Associated Part Family : CY8C4xx7 -BL, CY8C4xx8 -BL, CYBL10X6X , CYBL10X7X Software Version: PSoC ® Creator™ 3. 2 Related Application Notes: AN91267 , AN94020 To get the lates t version of this application note, or the associated project file, please visit http://www.cypress.com/go/AN92584 AN92584 teaches you how to design low -power applications with PSoC 4/PRoC™ BLE devices. It also guides you on how to compute the current consumption and battery life for a BLE application and provides tips and tricks to minimize the current consumption to increase battery life.
Contents
3.1 Example Project 1: Low-Power Modes in
3.2 Example Project 2: Low-Power Modes in
4.6 Implementing System Design
1 Introduction
Bluetooth Low Energy (BLE) devices such as heart-rate monitors are typically battery operated. A long battery life is a key requirement for such devices. This application note shows how to implement a low -power solution and estimate the battery life for the device using Cypress’s BLE solutions. Before you read this document, you should have a basic knowledge of BLE and have read the Getting Started with PSoC 4 BLE or Getting Started with PRoC BLE application notes. This application note is divided into two sections. The first section guides you in implementing low -power BLE solutions using PSoC 4/PRoC BLE devices. It first provides an overview of the clocks and low-power modes available in these devices. It then explains how to manage the clocks and the power modes in your application to reduce current consumption. The implementation is illustrated in the example projects provided with this application note. A procedure to measure the average current in the CY8CKIT-042-BLE Bluetooth Low Energy (BLE) Pioneer K it is also discussed. A power calculator tool provided with this application note makes it easy for you to estimate the current consumption for a given configuration of the device.
parts of the system and the idle time between BLE operations adds significantly to the average current consumption.
2 Design and Implementation for Low-Power BLE
that should be managed to conserve power.
2.1 System Clocks
The five clock sources and the clocks derived from these sources are shown in Figure 1. Figure 1. PSoC 4/PRoC BLE System Clocks also lists the APIs that are used to turn ON or OFF the clock sources.
Table 1. System Clocks performing flash write operations. packet transmissions and reception.
2.2 System Power Modes
active components, wakeup sources, and the APIs available to put the system into one of the low-power modes. Table 2. System Power Modes
0 Active CySysPmSleep()
1 Watchdog timer
2 Liquid crystal display
3 BLE subsystem
10 External reset
4 Power-on reset
5 Brownout detect
11 Continuous time block mini
8 General-purpose input/output
9 Serial communication block
2.3 BLE Subsystem Power Modes
the BLESS into the specific power mode. The BLESS internal states directly map to the states returned from the Get_Blessstate()API. o The application calls the CyBle_EnterLPM() function with the input parameter as ACTIVE. o The BLESS internally triggers the exit at a time determined by the BLE stack within the BLE Component. Upon exit from the DEEPSLEEP or SLEEP mode, the BLESS enters the ACTIVE mode. Table 3. BLESS Power Modes
2.4 Recommendations for Low Power
implement a low-power design in PSoC 4/PRoC BLE devices. Deep-Sleep mode during this time if there is no pending application processing. CYBLE_BLESS_STATE_ECO_STABLE state. should be used for the CPU clock. This allows the IMO to be turned OFF to reduce current consumption. If the ECO is used in the system Sleep mod e, the ECO clock should be divided down from 24 MHz to 3 MHz. the system exits the Sleep mode. lower ppm reduces the listening window time in the BLE Peripheral role, thus reducing the current consumed . If your application does not use the ILO, the ILO should be stopped to reduce current consumption. Figure 2. Low-Power Implementation Recommendations
2.5 Low-Power Implementation
- Configure your project in PSoC Creator™.
- Implement the recommendations in your application code.
2.5.1 PSoC Creator Configuration
The following configurations should be implemented in your project to ensure a low-power operation. The LFCLK in the system must be set to use the WCO to operate the BLESS in the DEEPSLEEP mode.
- Access this setting in the Clocks tab of the .cydwr file in your project.
- Click Edit Clock to open the Configure System Clocks window, as shown in Figure 3.
- Go to the Low Frequency Clocks tab.
- Confirm that the WCO tab is selected and the WCO is selected as LFCLK.
Figure 3. LFCLK Setting operate in the low-power mode to reduce current consumption.
- Access this setting under the Clocks tab of the .cydwr file.
- Click Edit Clock to open the Configure System Clocks window, as shown in Figure 4.
- Go to the Low Frequency Clocks tab.
- Select the Low Power option.
Figure 4. WCO Low-Power Mode Settings selected, then an error is reported when you build the project.
Figure 5. Deep Sleep Setting for BLE Component
- Configure P2.2 as the WAKEUP pin.
- Set the WAKEUP pin active HIGH or active LOW as required by your application.
pin is active LOW by default. mode. They will still be available for programming the device upon chip reset.
- Go to the System tab in the .cydwr file.
- Click Debug Select under Programming\\Debugging, as shown in Figure 6.
- Change the value to GPIO.
Figure 6. Debug Pin Setting
2.5.2 Implem enting Low -Power Operations in Application Code
(comments are labeled with “C<number>”) for the reference implementation. [C1] Stop the ILO to reduce current consumption. the Sleep mode. The clock to the CPU is switched from the IMO to the ECO before entering the Sleep mode. The ECO-derived clock is available when the CPU wakes up from the Sleep mode. conditions if it can enter the DEEPSLEEP mode. Therefore, no check is required before calling this function. specific. Refer to the function definition of run_application()for a reference implementation [C5].
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 10 [C6] Call the ManageApplicationPower() function to manage the power mode transitions for the application-specific, non-BLE components. [C7] Call the ManageSystemPower()function. The function checks both the application power mode and the BLESS power mode to put the entire system into the Sleep or Deep-Sleep mode. int main() /* Variable declarations */ CYBLE_LP_MODE_T lpMode; CYBLE_BLESS_STATE_T blessState; uint8 interruptStatus; /* Enable global interrupts */ CyGlobalIntEnable; /* C1. Stop the ILO to reduce current consumption */ CySysClkIloStop(); /* C2. Configure the divider values for the ECO, so that a 3-MHz ECO divided clock can be provided to the CPU in Sleep mode */ CySysClkWriteEcoDiv(CY_SYS_CLK_ECO_DIV8); /* Start the BLE Component and register the generic event handler */ apiResult = CyBle_Start(AppCallBack); /* Wait for BLE Component to initialize */ while (CyBle_GetState() == CYBLE_STATE_INITIALIZING) CyBle_ProcessEvents(); /*Application-specific Component and other initialization code below */ applicationPower = ACTIVE; /* main while loop of the application */ while(1) /* Process all pending BLE events in the stack */ CyBle_ProcessEvents(); /* C3. Call the function that manages the BLESS power modes */ CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP); /*C4. Run your application specific code here */ if(applicationPower == ACTIVE) RunApplication(); /*C6. Manage Application power mode */ ManageApplicationPower(); /*C7. Manage System power mode */ ManageSystemPower(); * C5. Function Name: RunApplication() * Summary: * This function is a template to run Application-specific code.
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 11 * Parameters: * none inline void RunApplication() * Place your application code here /* if you are done with everything and ready to go to sleep, then set it up to go to sleep. Update the code inside if() specific to your application*/ if(0) applicationPower = SLEEP; /* if you are done with everything and ready to go to deepsleep, then set it up to go to deepsleep. Update the code inside if() specific to your application*/ if (1) applicationPower = DEEPSLEEP; BLE Stack Event Handler The BLE stack event handler function handles the events generated by the BLE stack. Employ the following low - power techniques in the event -handling section soon after the BLE stack i s initialized (an EVT_STACK_ON event is received): [C8] Set the device sleep-clock accuracy (SCA) based on the tuned ppm of the WCO. The SCA is defined by the Bluetooth specifications in seven subranges in the total range of 0 ppm to 500 ppm. The code snippet for these is shown below: void AppCallBack(uint32 event, void* eventParam) CYBLE_BLESS_CLK_CFG_PARAMS_T clockConfig; switch(event) /* Handle stack events */ case CYBLE_EVT_STACK_ON: /* C8. Get the configured clock parameters for BLE subsystem */ CyBle_GetBleClockCfgParam(&clockConfig); /* C8. Set the device sleep-clock accuracy (SCA) based on the tuned ppm of the WCO */ clockConfig.bleLlSca = CYBLE_LL_SCA_000_TO_020_PPM; /* C8. Set the clock parameter of BLESS with updated values */ CyBle_SetBleClockCfgParam(&clockConfig); /* Put the device into discoverable mode so that a Central device can
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 12 connect to it. */ apiResult = CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST); /* Application-specific event handling here */ break; /* Other application-specific event handling here */ case CYBLE_EVT_GAP_DEVICE_CONNECTED: Power Management Functions The power management functions control the application and system power mode transitions. Application Power Management The function ManageApplicationPower() manages the power state transitions for all the components used by the application, except the BLE Component. Five application power states are defined. You should customize this function for your application. The ACTIVE power state indicates that the app lication is active. There is no specific action required when the application is active. The WAKEUP_SLEEP and WAKEUP_DEEPSLEEP states indicate that the system is waking up from the Sleep or Deep-sleep mode, respectively. The application should also wake up the components from their Sleep or Deep - Sleep modes. The SLEEP and DEEP SLEEP states are entered when the application has completed all application processing and is requested at the end of it to enter the Sleep or Deep -Sleep modes. The non -BLE compone nts used by the application are put into their respective Sleep or Deep -Sleep modes. Note that the definition of the Sleep and Deep - Sleep are application-specific. void ManageApplicationPower() switch(applicationPower) case ACTIVE: // don’t need to do anything break; case WAKEUP_SLEEP: // do whatever wakeup needs to be done applicationPower = ACTIVE; break; case WAKEUP_DEEPSLEEP: // do whatever wakeup needs to be done. applicationPower = ACTIVE; break; case SLEEP: * Place code to place the application components to sleep here break; case DEEPSLEEP:
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 13 * Place code to place the application components to deepsleep here break; System Power Management The application should call the ManageSystemPower() function to put the system into low -power modes. The function puts the system into the allowed low-power modes as follows: [C9] Get the current internal state of the BLESS by calling the CyBle_GetBleSsState()function. [C10, C11] If the BLESS is in the D EEPSLEEP mode and the non -BLE application components are also in the Deep-Sleep mode [C10], then put the system into the Deep -Sleep mode [C11]. The code execution halts here until the system wakes up from the Deep-Sleep mode due to an interrupt. [C12] If t he BLESS does not enter the DEEPSLEEP mode, it is either because it is at the beginning or in the middle of an event. The system can be put into the Sleep mode in this period except in the CYBLE_BLESS_STATE_EVENT_CLOSE state. [C13, C14, C15, C16] There are two possibilities about the application power mode under the above condition. If the application is in the Deep -Sleep mode [C13], the system can use the ECO instead of the IMO as the clock source in the Sleep mode. First, the HFCLK source is switched to the ECO and the IMO is stopped [C14]. The system is then put into the Sleep mode [C15]. The code execution halts here until the system wakes up from the Sleep mode due to an interrupt. The IMO is restarted upon wakeup and the clock source for HFCLK is reve rted to the IMO [C16]. [C17, C18] If the application is in the Sleep mode and requires the IMO [C17], then the system is put into the Sleep mode [C18], without switching OFF the IMO. Note 1: It is important that the code to handle the low -power transitions is protected in a critical section and that interrupts are not allowed to change the thread of operation. In the code snippet, this critical section is bound by the CyEnterCriticalSection() function at the beginning and the CyExitCriticalSection() function at the end. If you do not put the code in this critical section, it may result in race conditions between the system and the BLESS in entering the BLESS low-power modes, causing the device to enter an unknown state from which it cannot recover. Note 2: When you put the BLESS into the DEEPSLEEP mode in the application using the CyBle_EnterLPM()function call, the ECO is configured to be OFF within the function. Therefore, the application need not do an explicit ECO OFF. However, if you are not using the BL ESS, then you need to explicitly stop the ECO in the system if it is not required. This is because the system API call, CySysPmDeepSleep(), will not turn OFF the ECO. This can be done by calling the CySysClkEcoStop()API, described previously, just before putting the system into the Deep-Sleep mode. The code snippet follows. void ManageSystemPower() /* Variable declarations */ CYBLE_BLESS_STATE_T blePower; uint8 interruptStatus ; /* Disable global interrupts to avoid any other tasks from interrupting this section of code*/ interruptStatus = CyEnterCriticalSection(); /* C9. Get current state of BLE sub system to check if it has successfully
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 14 entered deep sleep state */ blePower = CyBle_GetBleSsState(); /* C10. System can enter Deep-Sleep only when BLESS and rest of the application are in DeepSleep or equivalent power modes */ if((blePower == CYBLE_BLESS_STATE_DEEPSLEEP || blePower == applicationPower == DEEPSLEEP) applicationPower = WAKEUP_DEEPSLEEP; /* C11. Put system into Deep-Sleep mode*/ CySysPmDeepSleep(); /* C12. BLESS is not in Deep Sleep mode. Check if it can enter Sleep mode */ else if((blePower != CYBLE_BLESS_STATE_EVENT_CLOSE)) /* C13. Application is in Deep Sleep. IMO is not required */ if(applicationPower == DEEPSLEEP) applicationPower = WAKEUP_DEEPSLEEP; /* C14. change HF clock source from IMO to ECO*/ CySysClkWriteHfclkDirect(CY_SYS_CLK_HFCLK_ECO); /* C14. stop IMO for reducing power consumption */ CySysClkImoStop(); /*C15. put the CPU to sleep */ CySysPmSleep(); /* C16. starts execution after waking up, start IMO */ CySysClkImoStart(); /* C16. change HF clock source back to IMO */ CySysClkWriteHfclkDirect(CY_SYS_CLK_HFCLK_IMO); /*C17. Application components need IMO clock */ else if(applicationPower == SLEEP ) /* C18. Put the system into Sleep mode*/ applicationPower = WAKEUP_SLEEP; CySysPmSleep(); /* Enable interrupts */ CyExitCriticalSection(interruptStatus );
3 Example Projects
3.1 Example Project 1: Low-Power Modes in Advertisement
This project shows how to implement low -power modes in a PSoC 4/PRoC BLE device during the advertising state. occur when the device is in the advertising state. ppm. The IMO clock is 16 MHz in the example, but it can be lower in real applications. Table 4. Advertisement Settings The default clock settings used for the project are listed in Table 5. Table 5. Clock Settings After you build and program the project into the kit, measure the current and capture the current profile for analysis. You can modify these configuration parameters and choose the optimum parameters according to your application.
3.2 Example Project 2: Low-Power Modes in Connection
role. The project can also be used to measure the current consumption of the device for various connection intervals.
Table 6. Connection Settings The default clock settings used in the project are shown in Table 7. Table 7. Clock Settings analysis. You can also modify these configuration parameters and choose the optimum parameters for your design.
3.3 Average Current Measurement
The example projects can be used to measure the average current consumption and observe the current profile. be set to be the same as the advertising or the connection interval.
- Build the chosen example project provided with this application note and program the binary into the BLE
- Connect a multimeter across jumper J15 of the BLE Pioneer K it. A multimeter such as the Keysight 34410A
digital multimeter should be used.
- Set the aperture for the measurement based on the advertising interval or connection interval. If the exact
aperture is not available, then set it to an integral multiple of the advertising or connection interval.
- Measure the current. The current measured is the average current over one interval.
settles to a stable value, which is the average current.
3.3.1 Average Current in Advertising and Connection States
to the higher WCO clock inaccuracy of the dongle WCO crystal. Table 8. Advertising Interval Versus Average current Table 9. Connection Interval Versus Average Current
Figure 8. Average Current Versus Connection Interval
3.3.2 Current Profile for Advertising and Connection States
To observe the current profile described previously for the advertising and connection events, follow this procedure.
- Connect a current probe such as Tektronix TCP0030 across the jumper wire on the J15 connector.
- Connect the probe to a high-performance oscilloscope such as Tektronix DPO 4054.
- Set the range of resolution for the current axis between 2 mA and 5 mA and the range of resolution for the time
axis between 500 µs and 800 µs.
- Trigger the oscilloscope to capture the waveform.
Profile and Appendix B: Connection State Current Profile.
3.4 Power Calculator
how you use the various low-power modes. highlighted when you click on any input cell. 12, or 16 MHz. You should also select the transmit power level configured in the BLE Component configuration. Table 10. Advertisement Calculator Input Parameters Based on the inputs, the sheet automatically updates the average current in the blue cell. Table 11. Advertisement – Battery Life Calculation used in your design. The clock accuracy of the Central device, typically 031_TO_050_PPM, must also be entered. The transmit power level configured in the BLE Component is also selected.
Table 12. Connection Calculator Input Parameters Based on the inputs, the sheet updates the average current in the blue cell.
4 BLE Applications
4.1 BLE System Power
BLE connectivity. Each block contributes to the average current of the overall system.
4.1.1 Sensing Block
significant current during the sensing operation. have enough samples for accurate processing of the sensor data. to be in low-power states if there is no activity. Figure 11. System Block Diagram
4.1.2 Data and Event P rocessing Block
compress the data to reduce the over-the-air bandwidth required to transfer the data to the peer device.
4.1.3 BLE Connect ivit y Block
determine the current consumption.
4.2 Battery Life
lifetime of device usage, reducing the battery cost and allowing the devices to be smaller (See Table 13). Table 13. CR Battery Comparison idle, how long the device is switched OFF, and so on. Based on the usage profile, the device can be put through different low -power states to reduce current consumption. usage profile and a current profile in various system states to estimate the battery life. Figure 12. A user uses this device through the day; the user may switch it OFF intermittently. The current consumed
Figure 12. Usage and Current Profile
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 25
4.3 Techniques for Increasing Battery Life
From these equations, it is evident that battery life can be increased by using the following approaches to reduce the average current consumed: Reduce the Active mode current: The sensing and processing functions contribute equally, if not more, to the overall system current consumption. Therefore, you shou ld take a system view and reduce the current consumption in all active operations such as sensing, data processing, and BLE transactions. Reduce the active time: Reduce the time spent in CPU or RF operations so that the system can be in the idle or OFF sta tes more often. The current consumed in these idle or OFF states is as important as the current consumed during active operations. The current consumption in these states should be reduced by using the available low-power modes. The following is a list of suggestions to reduce the average current in PSoC 4/PRoC BLE devices and effectively increase the battery life.
4.3.1 Reducing the Active C urrent
Operate at L ower CPU Clock F requency The application should be designed to allow the CPU to operate at lower clock frequencies to reduce the current. For example, power-optimal algorithms and implementations tuned to the CPU architecture should be used to reduce the processing power required for sensor data processing. Shut Down Unused Resources The application can put the unused peripherals and clocks into the available low -power modes permanently. In addition, peripherals and clocks that are not required often or that are required only in specific usage modes should be put into their lowest power modes, wherever possible. For example, you can turn the ILO OFF for most BLE applications. The WCO can be used for all LFCLK requirements such as the watchdog timer or BLESS. Utilize Chip -Level Integration Integration of the sensing circuit and other external interfaces in a single chip reduces the overall system current consumption due to improved performance, reduced I/O switching, and communication overheads. PSoC 4 BLE is a highly integrated device that includes Cypress CapSense ®, programmable analog with 12 -bit ADC, four opamps with comparator mode, two low -power comparators that can operate in the Deep -Sleep mode, a programmable digital block, and up to 32 GPIOs multiplexed with different communication interfaces such as I 2C, SPI, and UART. This system integration must b e utilized to reduce the external components that need to be present on a PCB for the application and improve the overall system-level current consumption. Reduce Transmit Power Most applications require 0 -dBm RF transmit power. However, the transmit powe r can be lowered if the device is designed to work for ranges of less than 5 m. This reduces the RF current consumption. For example, by operating the device at –6 dBm, the transmit current can be reduced by 3 mA.
4.3.2 Reducing the Active Time
Schedule Activities Around the Connection Event The application should align the sensing and data processing operations to the beginning or end of BLE connection events. The application can then complete all the processing and put the system into the D eep-Sleep mode along with the BLESS until the next BLE connection event. This is more power efficient than processing asynchronous to the BLE events, because it allows the system to be in the Deep-Sleep mode for longer times (refer to Figure 1). However, note that the application activity should be avoided during the BLE events when the BLESS is transmitting or receiving packets. This reduces the peak current consumption that adversely impacts the battery life of some types of batteries such as coin-cell batteries. Lower Sensor Scan Rates
completed. This avoids the latency in sending the data upon the first activity. updated with a slave latency value of 9, the current consumption drops to 17 µA. These points are illustrated with two example BLE use cases: a fitness application and an HID application.
4.4 Example Application: Heart-Rate Monitor
one of the most common fitness applications that use BLE today to monitor fitness levels.
4.4.1 System Architecture
operational amplifiers and hardware filters are used for this purpose. application firmware for further processing. to convert the signal into a heart-rate value by using a timing procedure. value to a heart-rate collector device, usually with a refresh rate of once per second. Figure 14. HRM System Block Diagram
4.4.2 HRM Usage Profile
An HRM is typically used in one of these ways.
- Using the HRM during a training or exercise routine, generally for 1-2 hours per day.
- Wearing the HRM all day in an ultra -low-power mode and turning it active multiple times during the day for short
durations. The average active time is approximately one hour per day.
4.4.3 Application Design for Low Power
sensor scan rate is usually about 20 milliseconds. During the sensor scan, the system is put in the Sleep mode. Deep-Sleep mode when all the BLE and system processing is completed. CTBms available on the chip (PSoC 4 BLE only) are used to interface to the external sensor. Figure 15. HRM Firmware Design
4.5 Example Application: Remote Control
how a low-power design should be done in such a case.
4.5.1 System Architecture
capacitance of the sensor to a digital quantity, which can be processed by the firmware. so on. This data is sent as an HID report over BLE to the BLE Central device. increased using slave latency to save power and maintain a BLE connection. The overall system can be represented as shown in Figure 16. Figure 16. Remote Control System Architecture
4.5.2 Remote Control Usage Profile
If the remote is used for 25 minutes a day, it will be in a low-power state for the rest of the day. the remaining 20 percent of the time.
4.5.3 Application Design for Low Power
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 31 Active state: The Active state denotes that all the scanning and processing activities are carried out at the highest required rate. Typically, the trackpad scan is done every 10 ms in the Active state. Therefore, most of the current consumption of the system originate s in the Active state. The firmware will remain in the Active state as long as user activities are happening. Idle state: When using the trackpad, users may keep the trackpad idle for several seconds between touch activities. The Idle state saves power when the trackpad in not being used for an idle period. This state is entered if no touch activity is detected for a specified timeout in the Active state. In this state, the trackpad is scanned at a rate lower than needed for a smooth mouse movement, but su fficient to detect the start of a touch activity without an observable delay. The BLE connection uses slave latency to reduce the use of the radio, while maintaining readiness to send the data without latency when a user activity is detected. The system an d BLESS are in the Deep-Sleep mode for most of the time. Low-Power state: The system is expected to stay in the low -power state for most of the time. The application enters this state from the Idle state if a user activity is not detected during the Idle state for additional time. In this state, a BLE connection is sustained with no application data exchange. The application may also increase the slave latency to reduce the use of the radio while sustaining the connection. The trackpad still needs to be scanned to detect user activity. To detect a touch activity, a high resolution of the touch is not needed. Therefore, only the alternate rows of the trackpad are scanned. The system is in the Deep-Sleep mode for most of the time. Shutdown state: When the battery voltage drops below the operable voltage, the system stops all the activities and shuts down. This is done by putting the system in the Hibernate or Stop mode. It should be noted that in each of these states, the system undergoes power mode transition s among the Deep - Sleep, Sleep, and Active modes for optimizing power, based on the device activity. Only the durations for which the device remains in the Active or Deep-Sleep mode are different in different states.
4.6 Implementing System Design Recommendations
4.6.1 RF Transmit Power
RF transmit power can be reduced to conserve power. To configure the RF transmit power in your project, open the Configure BLE window from the BLE Component instance, as shown in Figure 19. 1. Go to the GAP Settings tab. 2. Configure the TX power level (dBm) to the desired setting from the list.
Figure 19. Changing the RF Transmit Power Level
4.6.2 Connection Parameter Update
Central device as required by the application.
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 33
5 Summary
PSoC 4/PRoC BLE devices support multiple systems and BLESS low -power modes that enable you to design a highly power -efficient solution. The advertising and connection current profiles indicate that the Deep -Sleep mode current is equally important to the RF transmit/receive currents when considering a reduction in the overall average current. The advertising and connection power calculator can help you choose the right set of parameters. The battery life of a BLE application depends on the system-level current consumption. In most applications, sensing and processing can consume more power than the BLE operations, so attention must be paid to reduce the overall system current. The system -level low-power techniques suggested should help you in designing a low -power BLE solution by including some suggestions, where possible, at the system design stage. You can also use the power calculator tool to help you make decisions on the system parameters to improve the battery life.
6 Appendix A: Advertising State Current Profile
packets and requests for additional data. ms. Advertising events are illustrated in Figure 20, with one advertising event as an example. Figure 20. Advertising Event and Interval
- T_IFS is Inter Frame Space, which is defined to be 150 µs. This is to allow the radio to switch between transmit and receive states.
6.1.1 Current Profile
relative current levels across the states.
Figure 21. Advertising Current Profile system into the Active mode. After the interrupt is processed, the system is put back into a low-power mode.
Table 14. Advertising Current Profile Stages ready. The ECO interrupts the CPU once the amplitude is stable. DEEPSLEEP mode. It switches from the WCO clock to the stable ECO clock and generates an interrupt. transactions are completed in stage F. The system remains in this stage until the start of the advertising event. active during this period. The advertising packets are transmitted on the three advertising channels. it continues to receive until the end of the packet. This state is optional and depends on the advertising type settings.
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 37 F – After transmitting the three advertising packets, the BLESS generates an “end -of-event” interrupt tha t wakes up the CPU. The BLE stack and application complete any event -specific or other application -specific activities in this period. The application then programs the BLESS to enter the DEEPSLEEP mode by calling the CyBle_EnterLPM()function in the BLE Component. The BLESS takes two LFCLK cycles (approximately 120 µs) to switch to the WCO and enter the DEEPSLEEP mode internally. The BLE Component therefore puts the system into the Sleep mode until the DEEPSLEEP mode entry is complete. J – The system is in the Sleep mode in this state, waiting for the BLESS to enter the DEEPSLEEP mode. Once the transition is complete, the BLESS generates an interrupt to indicate successful entry into the DEEPSLEEP mode, which wakes up the CPU. G – When the application receiv es the interrupt at the end of stage J, the application puts the system also into the Deep-Sleep mode no processing is required. Note: In the profile described, it is assumed that the application is only managing the BLE advertising events and not handling any system -level tasks and interrupts. Additional system -level processing will change the current profile depending on the implementation.
7 Appendix B: Connection State Current Profile
Figure 22. Connection Event and Interval
7.1.1 Current Profile
Figure 23. The figure illustrates the power modes used, along with the BLESS internal state transitions and relative
Figure 23. Peripheral Connection Current Profile modes, and the system power modes are tabulated in Table 15.
Table 15. Connection Current Profile States connection event and generates an interrupt to wake up the system from the Deep-Sleep mode. Stages A, B, and C in the connection current profile remain the same as that for the advertising current profile. Central and Peripheral devices between the events. mode until the DEEPSLEEP mode entry is complete. Deep-Sleep mode, if no processing is required. depending on the implementation.
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 41 Document History Document Title: AN92584 – Designing for Low Power and Estimating Battery Life for BLE Applications Document Number: 001-92584 Revision ECN Orig. of Change Submission Date Description of Change ** 4701892 KMVP 03/26/2015 New Application Note *A 4765378 KMVP 05/14/2015 Updated Associated Part Family
Designing for Low Power and Estimating Battery Life for BLE Applications www.cypress.com Document No. 001-92584 Rev. *A 42 Worldwide Sales and Design Support Cypress maintains a worldwide network of offices, solution centers, manufacturer’s representatives, and distributors. To find the office closest to you, visit us at Cypress Locations. Products Automotive cypress.com/go/automotive Clocks & Buffers cypress.com/go/clocks Interface cypress.com/go/interface Lighting & Power Control cypress.com/go/powerpsoc Memory cypress.com/go/memory PSoC cypress.com/go/psoc Touch Sensing cypress.com/go/touch USB Controllers cypress.com/go/usb Wireless/RF cypress.com/go/wireless PSoC® Solutions psoc.cypress.com/solutions PSoC 1 | PSoC 3 | PSoC 4 | PSoC 5LP Cypress Developer Community Community | Forums | Blogs | Video | Training Technical Support cypress.com/go/support PSoC is a registered trademark and PSoC Creator is a trademark of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are the property of their respective owners. Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709 Phone : 408-943-2600 Fax : 408-943-4730 Website : www.cypress.com © Cypress Semiconductor Corporation, 201 5. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, l ife saving, critical control or safety applications, unless pursuant to an ex press written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life -support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress here by grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conj unction with a Cypr ess integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or rep resentation of this Source Code except as specified above is prohibited without the express written permission of Cypress. Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes witho ut further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in lif e-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ prod uct in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Use may be limited by and subject to the applicable Cypress software license agreement.