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
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Power Monitoring your LPC55S69-EVK
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jafoste4
  • Date Created: 15 Apr 2021 8:18 PM Date Created
  • Views 430 views
  • Likes 3 likes
  • Comments 0 comments
  • monarch go
  • lpc55s69
Related
Recommended

Power Monitoring your LPC55S69-EVK

jafoste4
jafoste4
15 Apr 2021

The LPC55S69 EVK has an onboard ADC that can be used to power monitor your kit. In particular this is monitoring the power usage of the processor. To enable this feature some minor rework is required in addition to modifying the lpadc_dma SDK example. Join me as we walk through this process of enabling this functionality.

Version

Date

Version

Revision

April 2021

01Initial Release

 

1.Required Hardware

  • LPC55S69-EVK
  • MAX471 Amplifier
  • Soldering Equipment

 

2. Required Development Software

  • NXP IDE
  • LPC55S69 SDK

 

3. Hardware Setup

  1. Solder the MAX471 amplifier onto the back of your LPC55S69-EVK as shown
    • You may question what is the need of the MAX471. The MAX471 is nessecary to allow of higher bit resolution. Without the amplifier your applicaiton would be limited to 4 bit resolution due to the 2.43 ohm current measurment resistor (R91) that is on the board. With the addition of this amplifer we are able to utilize all 16bits of ADC operation that is supported by the ADC on the EVK. This allows us to get more useful information in terms of power management.
    • image
  2. Plug into the microUSB port P6 on the LPC55S69 EVK and connect it to your PC. This is your debug and power link between the EVK and the IDE.
    • image
  3. Your Hardware is setup and ready to begin your development.

 

4. Application Setup

  1. Create a new workspace using the NXP IDE you have installed.
  2. Import the lpadc_dma SDK example into this workspace
    • image
  3. Now we must edit this application to properly configure the output we are reading over the ADC. Make the following changes to your lpadc_dma.c source file located in the source directory
    1. Add the following under the variable section *Line 44
      • image
    2. Remove Line144 through Line 146
      • image
    3. On Line 144 add the following
      •         ADC_CONVERSION = ((uint16_t)(g_AdcConvResult[0] & ADC_RESFIFO_D_MASK) >> g_LpadcResultShift);
                Current = ADC_CONVERSION/311.65;
        
        
                PRINTF("Adc conversion word : 0x%X\r\n", g_AdcConvResult[0]);
                PRINTF("Adc conversion value: %d\r\n",  ADC_CONVERSION);
                PRINTF("Current value: %d mA \r\n",  Current);
            }

    4. Your application is now all configured and ready to read the ADC.
  4. Run the Application
    1. Select Clean & then Debug from the Quick Start Panel
      • This will force the applciation to rebuild and kickstart the application on your LPC55S69-EVK
    2. Slect OK to connect to your LPC55S69 target
    3. Select resume from the top of the menu to start the application
      • image
    4. The demo will now be running, go to the conose window and select ENTER on your keyboard. This will kick off an ADC read as shown
      • image
    5. You will see the ADC conversion word, conversion value and the interpretation into mA. You are now successfully monitoring the PWR of the LPC55S69-EVK.
    6. One thing of note is the ADC is operation is 12 bit mode currently. For 16 bit operation you will need to add DEMO_LPADC_USE_HIGH_RESOLUTION into the Preprocessor settings.
      • To access the Preprocessor setting, under the Quickstart Panel select Edit project settings
        • image
      • Go C/C++ Build -> Settings -> Preprocessor and select the + then copy and past DEMO_LPADC_USE_HIGH_RESOLUTION and select OK
        • image
      • Select Apply  and Close to enable the new settings.
    7. Now that the Preprocessor setting are updated your application will now be reporting back in 16 bit operation. Please note, the conversion between the ADC value and the current in mA will need to be corrected to get useful information. This can be done by going to line 146 and updating it as shown below.
      • image
    8. You can now rerun the demo in 16 bit operation using clean and debug once again.
  • 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