It has past a quite a long time since the last post, but I finally got time so I post a new article. This time, I introduce an unique feature, which is a power debugging on MCUXpresso IDE. The power debug doesn’t give you a powerful debugging, but you can monitor a dynamic power consumption and it is visualized on MCUXpresso window.
Such similar feature is already available on IAR EWARM using I-Jet probe. It also give you a way to monitor the system power consumption.
In order to use the feature on MCUXpresso IDE, it needs LPC-LINK2 on-board ICE whose firmware is programmed in LPC4370 on LPCXpresso board.
This time, I would use QN9080DK instead of LPCXpresso board, but the board has LPC4370 on the board and supports LPC-LINK2 LinkServer. I believe it can be used for the power measurement on MCUXpresso IDE.
You can get this board from NXP web site(http://www.nxp.com) and it cost you about $99. Ok, let’s go, then.
Contents
What I am going to do
To measure a dynamic power consumption and visualized on MCUXpresso IDE.
Preparation
Software
- MCUXpresso IDE
*: MCUXpresso IDE is a free of charge to use and no code size limitation. It is a Ecripse-based IDE. Download from here (→https://www.nxp.com/mcuxpresso)
- QN9080 SDK
This SDK includes an example project of power measurement profile. This time, I will use the power measurement profile.
LPC-Scrypt
It is the tool that switch the firmware for on-board ICE of LPCXpresso board. It is also a free of charge to use and available on NXP web site. I need CMSIS-DAP LinkServer this time, but you can change it to J-Link anytime.
LPC-Scrypt can be downloaded from here →LPC-Scrypt Official download page
LPC-Scrypt is not needed this time, but it is very useful if you have.
Hardware
- QN9080DK

Install MCUXPresso IDE
After download, you can install it according to a dialog.
QN9080DK’s on-board ICE (LPC4370) is programmed as MCUXpresso LinkServer(CMSIS-DAP) as a default. You don’t need to do anything if you don’t want to change the firmware from the default.
If you have already changed the firmware of the on-board ICE, you have to put it back to MCUXpresso LinkServer to use a power measurement tool. And, it can be done by LPC-Scrypt.
This time, I won’t explain how to use the LPC-Scrypt.
Jumper configuration of QN9080DK
You need to configure the jumper pin on the board for the power measurement tool. As you can see the schematics below, J12 and J13 needs to be removed so that sense resisters(4.12 ohm) become effective. Then, it comes to 8.24 ohm in series in total.
Download QN9080 SDK
It doesn’t matter what application runs when a power measurement is done. This time, I would use QN9080DK board since it is known that the power consumption is very small. I would like to measure the power consumption during active and sleep mode and use the SDK power measurement profile for the board.
First, you need to download QN9080 SDK from NXP web site. (From here Download QN9080 SDK)
Start MCUXpresso IDE
At lower window, there are many tabs and click the install tab to select. All you have to do it to install SDK is to drag&drop the whole folder of the SDK(either zip file or unzipped file is no problem ).
Import SDK example project
When you import any project, you have to click Import SDK example(s) … from Quickstart pannel.
Select QN9080 board and go to Wireless Example-Bluetooth, and select Power_Profiling. Then, click finish.
Build project
Once the projet has been imported, it would be emerged in project pane.
You need to click this project to select, and then click “Build” from Quick start panel as you can see below picture.
Download application
After the project of the application has been built, you can download it in QN9080 board. Connect your board with USB cable.
USB connecters are available on the QN9080DK, J2 connecter is the right one to download the application.
Now you are ready to start debug, click “debug” in quick start panel. It starts immediately to download and debug.
It detects automatically which debug probe is used. You might as well simply click “ok”.
However, my PC is Macbook, MacOS HighSiera. MCUXpresso IDE crashed on my PC and couldn’t start debugging.
I successfully download the built application by suing Windows PC.
I really want NXP to fix this bug as soon as possible.
Power measurement
Now I am going to measure the power consumption.
It is so easy to measure it on MCUXpresso. As you can see below picture, there is “Power measurement tool” tab. Click and select it.
You need to configure power measurement settings. Choose target resister as 8.24 ohm. and Sample period is set as you like. Click “Start”.
Measurement result
LED status indication shows as below when you press “button1”.
- LED Blue : Power down
- LED Green : Sleep
- LED Red : アクティブ
- LED Blue : Power down
- LED off:
This time, I measure the status of active mode and sleep.
Active mode power consumption

Above picture is the active mode power consumption. You can select the range you want to enlarge, and make it large as above.
You can see the peak current as 3.3 or 3.4mA. This current is measured where total current flows, so RF(TX or RX) and MCU runs in total. Not only RF current flows, but MCU also does.
The current measurement is done by means of measuring the voltage through a sense resister by LPC4370 fast ADC.
It can be seen that TX and RX state changes dynamically.
It is very handy that you can observe the dynamic current consumption on MCUXpresso when you measure it on your device. I believe that there is not that much error from actual value.
Sleep mode power consumption

It seems that there is an error in a range of about 120uA to 130uA. The sleep mode current looks about 450uA in average.
Sleep mode also seems be so small current as well as active mode.
Summary
This time, I just introduced you the tool of power consumption feature on MCUXpresso IDE. And, I measured it on Bluetooth LE device, QN9080.
It was found that QN9080 power consumption is so low in both of active and sleep mode.
Why not you try to measure your board?
Be aware that you need LPC4370 on board as on-board ICE and FW should be MCUXpresso LinkServer(CMSIS-DAP).