element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog Demonstrating Power Measurement tool (PMT) using LPCXpreso on LPC4367 development board
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Freedom development platform requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 7 Aug 2016 7:40 PM Date Created
  • Views 298 views
  • Likes 2 likes
  • Comments 0 comments
  • lpcxpresso4367
  • lpc4367
  • power measurement tool
Related
Recommended

Demonstrating Power Measurement tool (PMT) using LPCXpreso on LPC4367 development board

bheemarao
bheemarao
7 Aug 2016

Refer to my earlier blog on working with OM13088-LPC4367 LPCXpresso development board; i am using the same project executable of peripheral timer which blinks LED at every 1 second interrupt for demonstrating the PMT

 

The Power measurement tool enables the measurement of power usage on the

LPCXpresso boards that incorporate the power measurement circuit – for example the

LPCXpresso 54102 board. The power measurement tool is composed of three parts:

 

1. An LPCXpresso board featuring the power measurement circuit

2. The Power measurement firmware

3. LPCXpresso Power Measurement plug-in (part of LPCXpresso IDE 7.7.2 and above)

 

The Power Measurement Tool enables you to visualize the current usage of the  LPCXpresso54102 board from within the LPCXpresso IDE (v7.7.2 or later). It is able to capture a burst of samples of the target current usage, the target supply voltage or the shield current at up to 200ksps. This information is displayed in a graph and can be exported for further analysis. The average values of the collected data can also be displayed.

 

Built-in current measurement

The LPCXpresso4367 includes an on-board current measurement system consisting of a pair of amplifiers and a fast, 2 channels ADC, which is controlled by the on-board Link2 debug probe. Each amplifier measures the voltage drop across of two series resistors, one pair of resistors being in line with the Target MCU supply and one in line with the I/O supply. By default, one of the series resistors in each of these circuits is shorted by (JP7 for Target supply, JP9 for I/O supply) in order to allow the ADC to measure up to 235mA (Target supply) / 32mA (I/O supply) without the ADC input saturating. JP7 can be removed to make more accurate measurements when the Target MCU is consuming 52mA or less, and/or JP9 can be removed if the I/O supply current is 32mA or less. Note that the current measurement system will not be damaged if the amplifier outputs saturate.

 

image

Current measurement system range selection

 

Jumper

Position

Supply

Current range

JP7

Shunted (default)

Target

58uA-235mA

JP7

Open

Target

  1. 12.6uA-52mA

JP9

Shunted (default)

I/O

8uA-32mA

JP9

Open

I/O

4uA-16mA

 

The ADC can sample the amplifier out at up to 200k samples/second, configurable under control of the Link2 probe.

The current measurement system is supported by version 8.0 and later versions of the LPCXpresso IDE, which includes controls to select sample rate and enter the sense resistor values selected by JP7 and JP9.

 

JP7, JP9

The on-board current measurement circuitry includes a choice of two sense resistors for both the Target and I/O supplies in order to enable more accurate current measurement when the Target MCU is running in low power modes. JP7 and JP9 are used to select short a second sense resistor in the path of the current supplies of the Target and I/O supplies respectively.

 

A current meter may be installed across JP10 terminals to measure the Target MCU I/O current consumption. Pin 1 (square pad) is positive and pin 2 is negative. By default JP7 is shunted by a 0Ω resistor installed at JS15. Remove the resistor at JS15 to measure current at JP7.

 

A current meter may be installed across JP7 to measure the Target MCU I/O VDD input current. The 0Ω resistor at JS14 must be removed and the current meter connected at the positive input at JP7 pin 1 (square pad) and negative input at JP7 pin 2.

 

Power Measurement Firmware

The power measurement tool requires the latest version of the Link2 firmware to be installed on the probe. This firmware provides a data channel through which the power usage information is sent to be displayed in LPCXpresso. The firmware is downloaded via the DFU mechanism. Since it resides in RAM you need to re-download it every time the board is power cycles. LPCXpresso will perform this step automatically, but first you need to choose the version of the probe to use.

 

The power measurement firmware comes in two flavors of the “bridge probes”: the CMSISDAP and the RedLink firmware. The “non-bridged” version of these firmwares does not support power measurement. The non-bridged versions are provided for customers who experience USB bandwidth issues. If you are unable to debug your part with the bridged firmware try switching back to the standard firmware – you will not be able to use the power Measurement tool, but should be able to do everything else.

 

There are four firmware choices:

 

1. CMSIS-DAP (Default)

2. CMSIS-DAP (Non-bridged – Debug only)

3. Redlink

4. Redlink (Non-bridged – Debug only)

 

 

Choose the CMSIS-DAP (Default) option if you want to use the power measurement or SWO trace. If you debug in another tool chain, this option will allow LPCXpresso to capture the power data – even without a debug connection. Note that LPCXpresso does not need to be debugging the target to be able to use the power tool with this option. For example you could be tracking the power usage in LPCXpresso and debugging your code in Keil uVision using this firmware. It also includes the SWO functionality and the serial I/O bridge.

 

The CMSIS-DAP (Non-bridged – Debug only) option excludes the power tool, SWO trace and Serial I/O bridge extensions. This version uses less USB bandwidth and should be used if you experience USB issues. Power measurement and SWO trace will be unavailable.

 

The Redlink firmware is similar to the CMSIS-DAP (Default) but only works in LPCXpresso. In some cases it can perform faster than the CMSIS-DAP version.

 

The Redlink (Non-bridged – Debug only) is the Redlink equivalent of the CMSIS-DAP (Non-bridged – Debug only) firmware, and should be used if you want to use Redlink, but are having USB issues.

 

 

Let us start the procedure to measure the Current/Volltage:

 

1) On the LPCXpresso board or Link2 make sure that the jumper beside the Link USB socket is closed. This jumper puts the Link into DFU mode and allows new firmware to be downloaded.

 

image

 

2) Connect the Link USB socket on the board to your computer.

Open the LPCXpresso preferences page from the main menu bar

 

  Window -> Preferences

image

Locate the Redlink Options page by expanding the LPCXpresso item.

• Select “CMSIS-DAP (Default)” from the Redlink boot type options.

image

Download the firmware to the probe by pressing the Boot Debug Probe button

 

image

If there is a probe in DFU mode the following dialog box will appear.

image

It will initialise LinkServer with CMSIS DAP ~bin.hdr file as shown below:

image

image

Double check that the board is connected using the USB socket labeled Link (not Target) and that the jumper JP5 is closed, then power cycle the board and retry.

Note: the firmware must be re-downloaded every time the probe is power cycled.

 

This will be done automatically if you are using debugging with the LPCXpresso IDE Once the firmware is downloaded you can download your code to the target if it is not already in flash.

Click on Power measurement tool as shown below:

 

Note: i am using the Periph_timer project from my earlier blog Working on with LPCXpresso development board OM13088 with LPC4367 MCU

image

Now we need to configure the power probe, click on the configure icon as shown below:

image

Now select the option “other boards” for power probe circuit as shown as we are using LPC4367 dev board

image

Now select the Capture detail as shown below:

image

Data Source: Target Current (we are measuring current), 200KSPS and capture for 10 seconds

Then finally start the process by clicking 'start'

 

You can see the current consumption graph which shows 13mA

image

You can see the minimum, Maximum and average current consumption:

 

Now we will change the LED colour from blue to Green and the blink rate from 10 seconds to 1 seconds

 

Changing to Green LED and timer interval

 

Now let’s change this to blink at 1 Hz  i.e at interval of 1 sec

 

Change TICKRATE_HZ to 1 in timers.c

#define TICKRATE_HZ 1

 

And we will change instead of blue LED to green LED by changing

 

Board_LED_Set(0, On);  to Board_LED_Set(1, On); which is connected to Port-0, pin- 7 (defined in board.c)

image

Build the project again and execute the project

Reload the changed project to observe the change in current consumption:

image

image

Hence with the power measurement tool it has made easy to measure the current/voltage consumption of the project.

 

Below is the video on how to make the settings to change Green LED and perform Power Measurement Tool on LPCXpresso tool:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Happy Power measurement using LPCXpresso on  OM13088OM13088 LPC4367 development board image image image

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube