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
Rakesh MuralidharanI am always getting a current consumption of 900uA @ 3VThis is way above the CPU limits. Also when I put break point in the program the device current reduces to 200uA
See the ADC12IFG register description in the users guide.(the ADC10 is different: it only has one IFG bit as it has only one result register, and it is auto-cleared when the ISR is entered)
When you place a breakpoiont, the CPu stops (of course, as this is the intention of a breakpoint) and current drops.
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.