Hi,
I want to measure the power consumption of an MSP430 device over the time. For that setup I use the MSP430F5529LP Launchpad.
I did some measurements and I have observed interesting jumps in the power consumption:
The used test program is:
#include <msp430.h> void terminateAllGPIOs(){ // All pins are outputs // All pins pulled to low P1DIR = 0xFF; P1OUT = 0x00; P2DIR = 0xFF; P2OUT = 0x00; P3DIR = 0xFF; P3OUT = 0x00; P4DIR = 0xFF; P4OUT = 0x00; P5DIR = 0xFF; P5OUT = 0x00; P6DIR = 0xFF; P6OUT = 0x00; P7DIR = 0xFF; P7OUT = 0x00; P8DIR = 0xFF; P8OUT = 0x00; } void initTests() { // Configure LED on P1.0 P1DIR = BIT0; // P1.0 output } void leftLEDBlink() { int i; __delay_cycles(1000000); // ~1 second delay for(i=0;i<4;i++) { __delay_cycles(500000); // ~0.5 second delay P1OUT^=(BIT0); // toggle the led } } /* * main.c */ void main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer terminateAllGPIOs(); // Disable USB powering USBPWRCTL &= ~VUSBEN; // Disable USB LDO (3.3 V) USBPWRCTL &= ~SLDOEN;// Disable secondary USB LDO (1.8 V) initTests(); leftLEDBlink(); }
Do you have ideas what causes these jumps?
I did already experiment with
- different frequencies on MCLK, SMCLK, ACLK
- different core voltages (PMMCOREVx)
- different programs
- keeping the pins and usb in standard configuration
- pull the supply voltage low / high impedance before the measurement
The consumption behaviour can be quite different. Here is an example without calling the function terminateAllGPIOs() and without disabling the USB powering but pulling the supply voltage to 0 V before the measurement instead of keeping it high impedant:
Do you have an explanation for the jumps in the power consumption?
Best regards
Martin