小弟现在在使用m430f247,客户要求低功耗,但是我发现打开adc后,电流增加500多ua,下面是函数,一旦调用adc_init()函数后,电流就会变大,我想通过adc_lp()使ADC12CTL0和ADC12CTL1置0,但是没效果如图,那几个寄存器位依旧是1.求大神帮帮忙,谢谢了。void adc_init()
{
volatile unsigned int i;
P6SEL |= BIT4;
ADC12CTL0 = ADC12ON+SHT0_2+REFON+REF2_5V; // Turn on and set up ADC12
ADC12CTL1 = SHP;
ADC12MCTL0 = SREF_1+INCH_4;
for ( i=0; i<0x3600; i++);
ADC12CTL0 |= ENC;
}
void adc_lp()
{
P6SEL |= BIT4;
ADC12CTL1 &=~ SHP;
ADC12CTL0&=~(ADC12ON+SHT0_2+REFON+REF2_5V);//adc off
ADC12CTL0 &=~ ENC;
}
|