nRF51 SDK - S110 SoftDevice
|
The Power Profiling Applicationis designed to be used to measure the current consumption of the nRF51822, loaded with S110 SoftDevice, during advertisement and data transmission. The user can change some of the parameters (listed below) of this application and measure current consumption.
This application also demonstrates the use of Vendor Specific (128 bit) UUIDs.
This application can be used in two different modes:
1. Connectable mode:
In this mode, the application advertises in connectable mode. It sets itself up with a service and a characteristic with 'Notify' property. This characteristic has a CCCD associated with it.
Once the central enables notification of this characteristic (writes 0x0001 to this CCCD), the application starts sending notifications of this characteristic for a time interval equal to the value of APP_CFG_CHAR_NOTIF_TIMEOUT. The application will attempt to send one notification per connection interval, but this is not guaranteed. There is a possibility that in one connection interval there are no notifications but in the next there are two notifications. This depends on when exactly the repeating application timer expires. The total number of notifications sent by the application will be close to (APP_CFG_CHAR_NOTIF_TIMEOUT / (APP_CFG_CONNECTION_INTERVAL)). After sending these notifications, the application puts the chip in 'System Off' mode.
2. Non-connectable mode:
In this mode, the application advertises the given length of data (APP_CFG_ADV_DATA_LEN) for a given duration of time (APP_CFG_NON_CONN_ADV_TIMEOUT) in non-connectable mode and then puts the chip in System Off mode.
The application demonstrates the use of two different power saving modes, namely CPU Sleep and System-Off mode. All sample applications delivered with the SDK use these two modes.
Low Power Mode:
The application uses the nrf_wait_for_app_event() function to enter CPU sleep mode. This will place the chip in 'Low Power' mode. The chip will wake up from this mode on application interrupts. Typically, any application should call nrf_wait_for_app_event() in an infinite loop in main. It will return when an application interrupt has occurred, thereby allowing the main thread to process it if needed.
System OFF Mode:
This is the deepest power saving mode the system can enter. In this mode, all core functionality is powered down, and most peripherals are therefore non-functional or non-responsive. The only mechanisms that are functional and responsive in this mode are the reset mechanism and the wakeup mechanism.
This sample application starts up, configures wakeup buttons, and enters the Szstem OFF mode. On button presses, the application wakes up and goes into either 'Connectable mode' or 'Non-connectable mode' based on which button is pressed.
For more information on both modes, see nrf_wait_for_app_event() and the nRF51 Series User Specification (Section: POWER - Power control).
Compiler Optimization:
This example is optimized for reduced power consumption. Therefore, the default optimization level for this example application is 'Level 3' (-O3
) and 'Optimize for Time' (-Otime
). If the Keil debugger is needed for debugging purposes, the optimization level should be changed to 'Level 0' (-O0
), and 'Optimize for Time' should be removed to ease the use of the debugger.
The name of the example is ble_app_pwr_profiling_s110_pca10028. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\Nordic\nrf51\examples\ble_peripheral\ble_app_pwr_profiling
The application does not use any LEDs.
Button assignments:
Test the Power Profiling Application with the Master Control Panel by performing the following steps: