Platform Power Test
This article introduces how to measure the platform's power consumption, including supported test scenarios, configuration, and EVB settings, and how to use CMD to measure power consumption. Users can refer to platform power consumption to understand the power generated by certain functions, such as Bluetooth Low Energy/Bluetooth test scenarios. In addition, when users have issues with power consumption, they can also use platform power consumption to check for any hardware or application setting problems, such as static power test scenarios.
Supported Test Scenarios
Platform power refers to the basic power consumption of IC functions. The following scenarios are supported.
-
Static Power Test Scenarios
-
Bluetooth Low Energy Power Test Scenarios
Advertising
Scan
Connected
-
Bluetooth Power Test Scenarios
Page Scan
Inquiry Scan
Page
Connected
Sniff Mode
Inquiry
How to Measure Platform Power Consumption?
This section introduces how to measure platform power consumption, including the following items:
-
Prepare the test image.
On the default SDK image, modify the configuration and replace the configuration bin.
-
Settings for EVB.
Set up the test environment.
Test procedure and test case.
Settings for Configuration
The configuration in MCUConfig Tool.
Disable Log Output
Disable MCU log.
Disable MCU Log
Disable DSP log.
Disable DSP Log
Enable Bluetooth Low Energy Test Usage
Enable BLE Test usage and configure LE link number, LE master link number, and LE slave link number.
Configure Bluetooth Low Energy Test Usage
Disable Buck Support for RTL87x3D
When testing RTL87x3D, user needs to turn off the external buck.
Disable Buck
Fixed Transmit Power
To ensure the stability of power consumption data, the tested scenario for RTK fixed the transmit power of BR/EDR at 6dBm and LE at 0dBm.
Fixed TX Power
To disable transmit power control and fix the transmit power, please follow the steps shown below.
Enable Export RF TX power to System Config Bin.
Enable Export Frequency Offset to System Config Bin.
Set BR/EDR Level Number of Power Control to 1. LE transmit power setting is also controlled by this setting.
Set the transmit power of BR/EDR/LE to the target value.
Settings for EVB
This section will introduce the settings for the jumpers of EVB.
RTL87x3D
The following table lists the jumpers of RTL87x3D.
Name |
Condition |
|---|---|
DEV_1 |
Floating |
VDEV2 |
Floating |
KEY |
Floating |
LED |
Floating |
VIO1 |
Floating |
VIO2 |
VEXT |
VIO3 |
Floating |
VIO4 |
Floating |
VIO5 |
Floating |
VIO_FLASH |
VEXT |
TXD |
M3_0 |
RXD |
M3_1 |
FT_VIO |
Floating |
Note
VIO1 needs to be connected to VEXT and FT_VIO needs to be connected to VIO1 when burning the image.
RTL87x3E
The following table lists the jumpers of RTL87x3E.
Name |
Condition |
|---|---|
V_DEV1 |
Floating |
V_DEV2 |
Floating |
KEY |
Floating |
LED |
Floating |
R62 |
Remove |
TX |
M3_0 |
RX |
M3_1 |
FT_VIO |
Floating |
Note
FT_VIO needs to be connected to VIO1 when burning image.
How to Measure on EVB?
EVB Environment shows the tested situation of RTK.
The power supply used by RTK is KA3003P.
The current meter used by RTK is DMM6500.
The phone used by RTK is Android.
The power supply is set to 3.7V.
The positive terminal of the power supply is connected to the VBAT.
-
The current meter is configured as follows.
The current range is 100mA.
The sample rate is 60000 samples/s.
The sample time is 30s.
Reset the EVB, and the interface shown in Platform Power Serial Interface will appear.
Enter the commands.
Start measuring.
EVB Environment
Note
RTKChip: RTL87x3D and RTL87x3E are supported.
CMD
This section introduces the serial port tool and the commands used in the test case.
Serial Port Tool
A serial port tool on the PC, such as PUTTY, needs to be opened, and the baud rate set to 115200. When the EVB is reset, the following interface is displayed in the following figure.
Platform Power Serial Interface
Help
Users can enter the help command to query the commands supported by the current IC.
Help CMD
Test Case
This section introduces the test cases and CMD used in each test. Once the user enters the CMD and receives the response, the measurement can start. After a test case is completed, users need to reset the EVB before running another test case.
Static Power Test Case
This section lists the CMD used in the static power test scenarios.
Test Case |
Ship Mode |
|---|---|
Command |
state off |
Response |
lps_mode 0 |
Test Case |
Power Down |
|---|---|
Command |
state down |
Response |
lps_mode 1 |
Test Case |
DLPS |
|---|---|
Command |
state dlps |
Response |
lps_mode 2 |
Test Case |
DLPS RET |
|---|---|
Command |
state dlps_ret |
Response |
lps_mode 2 |
Description |
Not supported for RTL87x3D. |
Test Case |
DLPS PFM |
|---|---|
Command |
state dlps_pfm |
Response |
lps_mode 2 |
Test Case |
LPS |
|---|---|
Command |
state lps |
Response |
lps_mode 4 |
Test Case |
DVFS High Performance |
|---|---|
Command |
dvfs high |
Response |
Power test dvfs high |
Test Case |
DVFS Low Performance |
|---|---|
Command |
dvfs low |
Response |
Power test dvfs low |
Test Case |
CPU Active |
|---|---|
Command |
cpu active |
Response |
Power test cpu freq active |
Description |
CPU can not enter auto slow. |
Test Case |
CPU Sleep |
|---|---|
Command |
cpu sleep |
Response |
Power test cpu freq sleep |
Description |
CPU can enter auto slow. |
Test Case |
CPU 625k |
|---|---|
Command |
cpu 625k |
Response |
Power test cpu freq 625k |
Test Case |
CPU Frequency |
|---|---|
Command |
cpu number |
Response |
Power test cpu freq number |
Description |
For example: Set CPU 20M CMD: cpu 20 Response: Power test cpu freq 20 |
Test Case |
DSP1 Disable |
|---|---|
Command |
dsp1 disable |
Response |
Power test dsp1 freq disable |
Description |
Close dsp1 clock. |
Test Case |
DSP1 Frequency |
|---|---|
Command |
dsp1 number |
Response |
Power test dsp1 freq number |
Description |
For example: Set DSP1 20M CMD: dsp1 20 Response: Power test dsp1 freq 20 |
Test Case |
Coremark |
|---|---|
Command |
coremark enable |
Response |
Power test coremark enable |
Test Case |
Transmit Power |
|---|---|
Command |
txpower 0 0 0 0 0 |
Response |
Power test tx power txpower 0 0 0 0 0 |
Parameter 1 |
0: BR 1M |
Parameter 2 |
0: EDR 2M |
Parameter 3 |
0: EDR 3M |
Parameter 4 |
0: LE 1M |
Parameter 5 |
0: LE 2M |
Description |
In units of 0.5dbm. |
Test Case |
Continuous Transmit |
|---|---|
Command |
cont_tx 12 5 |
Response |
Power test cont_tx cont_tx 12 5 |
Parameter 1 |
12: Transmit Power This parameter only works when transmit power control enabled. |
Parameter 2 |
5: Packet Type 1DH1 = 0 1DH3 = 1 1DH5 = 2 2DH1 = 3 2DH3 = 4 2DH5 = 5 3DH1 = 6 3DH3 = 7 3DH5 = 8 LE1M = 9 LE2M = 11 LR8 = 12 LR2 = 13 1DM1 = 14 1DM3 = 15 1DM5 = 16 AUX1 = 17 |
Test Case |
Packet Receive |
|---|---|
Command |
packet_rx 5 |
Response |
Power test packet_rx packet_rx 5 |
Parameter 1 |
5: Packet Type The type is the same as in continuous transmit. |
Bluetooth Low Energy Power Test Case
This section lists the CMD used in the Bluetooth Low Energy power test scenarios.
Test Case |
Bluetooth Low Energy Advertising |
|---|---|
Command |
gap_le_cmd le_adv_power_test_start 0xA0 23 |
Response |
BLE_EXT_ADV_MGR_ADV_ENABLED |
Parameter 1 |
0xA0: Advertising Interval In units of 0.625ms, range: 0x000020 to 0xFFFFFF. |
Parameter 2 |
23: Advertising Data Length Range: 0 to 31 |
Test Case |
Bluetooth Low Energy Scan |
|---|---|
Command |
gap_le_cmd le_scan_power_test_start 0 0xA0 0x04 0 |
Response |
GAP_MSG_LE_EXT_ADV_REPORT_INFO |
Parameter 1 |
0: Scan Mode 0 means passive scan, and 1 means active scan. |
Parameter 2 |
0xA0: Scan Interval In units of 0.625ms, range: 0x0004 to 0xFFFF. |
Parameter 3 |
0x04: Scan Window In units of 0.625ms, range: 0x0004 to 0xFFFF. |
Parameter 4 |
0: Duplicate Enable 0 means disable, and 1 means enable. |
Test Case |
Bluetooth Low Energy Connect |
|---|---|
Command |
DUT: gap_le_cmd le_conn_power_test_start 0 0x50 0x50 SUT: gap_le_cmd le_create_conn 0x33 0xf4 0x34 0x34 0xf4 0x33 |
Response |
SUT: GAP_MSG_LE_EXT_ADV_REPORT_INFO DUT: BLE_EXT_ADV_STOP_CAUSE_CONN |
CMD 1 Parameter 1 |
0: Connect Slave Latency Range: 0x0000 to 0x01F3 |
CMD 1 Parameter 2 |
0x50: Connect Interval MIN In units of 1.25ms, range: 0x0006 to 0x0C80. |
CMD 1 Parameter 3 |
0x50: Connect Interval MAX In units of 1.25ms, range: 0x0006 to 0x0C80. |
CMD 2 Parameter |
0x33 0xf4 0x34 0x34 0xf4 0x33: the address of the DUT. Needs to be set in BD Address of configuration, the order is 0x33 0xf4 0x34 0x34 0xf4 0x33. |
Bluetooth Power Test Case
This section lists the CMD used in the Bluetooth power test scenarios.
Test Case |
Page Scan Parameters |
|---|---|
Command |
gap_legacy_cmd page_scan_param_set 0x00 0x800 0x12 0x4000 0x40 0x17 0x21 0x92 0x3c 0x90 |
Response |
Power test gap legacy 0x40 0x17 0x21 0x92 0x3c 0x90 |
Parameter 1 |
0x00: Page Scan Type 0x00 means standard scan, and 0x01 means interlaced scan. |
Parameter 2 |
0x800: Page Scan Interval N*0.625ms |
Parameter 3 |
0x12: Page Scan Window N*0.625ms |
Parameter 4 |
0x4000: Page Timeout N*0.625ms |
Description |
The last six commands can give a random bluetooth address. |
Test Case |
Page Scan |
|---|---|
Command |
gap_legacy_cmd radio_mode_set 0x03 0x40 0x17 0x21 0x92 0x3c 0x90 |
Response |
Power test gap legacy 0x40 0x17 0x21 0x92 0x3c 0x90 |
Description |
The last six commands can give a random bluetooth address. |
Test Case |
Inquiry Scan Parameters |
|---|---|
Command |
gap_legacy_cmd inquiry_scan_param_set 0x00 0x800 0x12 0x40 0x17 0x21 0x92 0x3c 0x90 |
Response |
Power test gap legacy 0x40 0x17 0x21 0x92 0x3c 0x90 |
Parameter 1 |
0x00: Inquiry Scan Type 0x00 means standard scan, and 0x01 means interlaced scan. |
Parameter 2 |
0x800: Inquiry Scan Interval N*0.625ms |
Parameter 3 |
0x12: Inquiry Scan Window N*0.625ms |
Description |
The last six commands can give a random bluetooth address. |
Test Case |
Inquiry Scan |
|---|---|
Command |
gap_legacy_cmd radio_mode_set 0x02 0x7a 0x9b 0x8d 0xe9 0xdd 0x64 |
Response |
Power test gap legacy 0x7a 0x9b 0x8d 0xe9 0xdd 0x64 |
Description |
The last six commands can give a random bluetooth address. |
Note
The result of inquiry scan will be affected by the number of Bluetooth devices in the environment.
Test Case |
Page |
|---|---|
Command |
gap_legacy_cmd page_start 0xff 0xff 0xff 0xff 0xff 0xff |
Response |
Power test gap legacy 0xff 0xff 0xff 0xff 0xff 0xff |
Description |
This test case can only last about five seconds. |
Test Case |
Inquiry |
|---|---|
Command |
gap_legacy_cmd inquiry_start 0x0A 0x7a 0x9b 0x8d 0xe9 0xdd 0x64 |
Response |
BT_EVENT_INQUIRY_RSP |
Description |
The last six commands can give a random bluetooth address. This test case can only last about five seconds. |
Test Case |
Bluetooth Connect |
|---|---|
Command |
DUT: gap_legacy_cmd radio_mode_set 0x03 0xff 0xff 0xff 0xff 0xff 0xff SUT: gap_legacy_cmd hfp_ag_connect 0x33 0xf4 0x34 0x34 0xf4 0x33 DUT: gap_legacy_cmd radio_mode_set 0x04 0xff 0xff 0xff 0xff 0xff 0xff |
Response |
DUT: BT_EVENT_HFP_CONN_CMPL SUT: BT_EVENT_HFP_AG_CONN_CMPL |
|
CMD 2 Parameter |
0x33 0xf4 0x34 0x34 0xf4 0x33: the address of DUT. Needs to be set in BD Address of configuration, the order is 0x33 0xf4 0x34 0x34 0xf4 0x33. |
Test Case |
Bluetooth Sniff Mode |
|---|---|
Command |
DUT: gap_legacy_cmd radio_mode_set 0x03 0xff 0xff 0xff 0xff 0xff 0xff SUT: gap_legacy_cmd hfp_ag_connect 0x33 0xf4 0x34 0x34 0xf4 0x33 DUT: gap_legacy_cmd radio_mode_set 0x04 0xff 0xff 0xff 0xff 0xff 0xff DUT: gap_legacy_cmd link_policy_set 0x05 0x22 0xff 0xad 0xad 0xff 0x22 SUT: gap_legacy_cmd hfp_ag_connect 0x33 0xf4 0x34 0x34 0xf4 0x33 SUT: gap_legacy_cmd sniff_enter 0x320 0x320 0x2 0x4 0x33 0xf4 0x34 0x34 0xf4 |
Response |
DUT: BT_EVENT_HFP_CONN_CMPL SUT: BT_EVENT_HFP_AG_CONN_CMPL DUT: BT_EVENT_ACL_CONN_SNIFF SUT: BT_EVENT_ACL_CONN_SNIFF |
|
CMD 2 Parameter |
0x33 0xf4 0x34 0x34 0xf4 0x33: the address of DUT. Needs to be set in BD Address of configuration, the order is 0x33 0xf4 0x34 0x34 0xf4 0x33. |
|
CMD 4 Parameter |
0x22 0xff 0xad 0xad 0xff 0x22: the address of SUT. Needs to be set in BD Address of configuration, the order is 0x22 0xff 0xad 0xad 0xff 0x22. |
|
CMD 6 Parameter 1 |
0x320: Sniff Max Interval 500.000msec N*0.625ms |
|
CMD 6 Parameter 2 |
0x320: Sniff Min Interval 500.000msec N*0.625ms |
|
CMD 6 Parameter 3 |
0x2: Sniff Attempt |
|
CMD 6 Parameter 4 |
0x4: Sniff Timeout 5.00msec N*1.25ms |