Part Number:MSP430F5528
Tool/software: Code Composer Studio
Hi,
I want to set my MSP430F5528 into LPM3, however using energyTrace (using MSP-FET) I can't see any difference at all in energy consumption between active mode and LPM3. When debugging, I can see that the debugger in CCS v7 says "MSP430: Warning: CPU is currently OFF and debugging capabilities will be limited." when putting a breakpoint by the LPM3 code.
I also tried to set it to LPM4 to see if I would not get any respons from it anymore, but it behaves as normal and "wakes up" with the internal VLO interrupt. So I'm not sure low-power mode is working here but what could be wrong?
(Note that I am using the MSP430 that is on the TDC1000-TDC7200EVM board, if that would make any difference?)
Here is the code:
main.c
void main(void) { WDTCTL = WDTPW+WDTHOLD; // Stop WDT // oscillator fail if LED keeps flashing after InitMCU InitMCU(); next_trigger_time = 0; // init 100ms interval timer (timer1) timer1_A0_init(); // init timer0 A0 for programmable external osc wake up time // or when MSP430TIMER_TDC is true, init as capture timer to continuously run timer0_A0_init(); USBPWRCTL &= ~(SLDOEN+VUSBEN); // disbale internal 3.3v and 1.8v LDOs while (1) // Main loop { if (next_trigger_time) { next_trigger_time = 0; __no_operation(); LPM3; __no_operation(); } } }
interrupt service routine:
//****************************************************************************** // Timer1 A0 interrupt service routine //------------------------------------------------------------------------------ #pragma vector=TIMER1_A0_VECTOR __interrupt void TIMER1_A0_ISR (void) { _low_power_mode_off_on_exit(); __delay_cycles(800); // wake up time is 3.5us from LPM3 next_trigger_time = 1; __no_operation(); }
I can't figure out what is going on here...
Kind regards,
Thibault