Other Parts Discussed in Thread: MSP430F2618
Hi
I was using the Evaluation module for MSP430F2618
My application needs CPU to be active and must have low power. For this purpose i tried out a small program to run uC at a low clock rate
I modified one example code of MSP430F2618
#include <msp430x26x.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
BCSCTL3 |= LFXT1S1 ;
BCSCTL2 |= (SELM1+SELM0+SELS);
ADC12CTL0 = SHT0_2 + ADC12ON; // Set sampling time, turn on ADC12
ADC12CTL1 = SHP+ ADC12SSEL1; // Use sampling timer
ADC12IE = 0x01; // Enable interrupt
ADC12CTL0 |= ENC; // Conversion enabled
P6DIR &= 0x01; // P6.0, i/p
P6SEL |= 0x01; // P6.0-ADC option select
//P1DIR |= 0x01; // P1.0 output-LED
for (;;)
{
ADC12CTL0 |= ADC12SC; // Start convn, software controlled
_BIS_SR(CPUOFF + GIE); // LPM0, ADC12_ISR will force exit
}
}
// ADC12 interrupt service routine
#pragma vector=ADC12_VECTOR
__interrupt void ADC12_ISR (void)
{
//if (ADC12MEM0 < 0x7FF)
//P1OUT &= ~0x01; // Clear P1.0 LED off
//else
//P1OUT |= 0x01; // Set P1.0 LED on
_BIC_SR_IRQ(CPUOFF); // Clear CPUOFF bit from 0(SR)
}
I am always getting a current consumption of 900uA @ 3V
This is way above the CPU limits. Also when I put break point in the program the device current reduces to 200uA
Please let me know how to make CPU work in lower clock rate