Other Parts Discussed in Thread: MSP430FR2311, ENERGYTRACE
Tool/software: Code Composer Studio
1 Without using ADC the power consumption is around 1.02uA .
2 My custer closed the ADC after ADC acquisition, but the CPU power will jump to 43.964 uA.
My question isHow to reduce the power consumption to 1.02uA?
3 ADC acquisition code is as follow:
uint16_t adc_get_adc(void)
{
int retry = 10;
int count = 0;
uint32_t adc_sum = 0;
ADCCTL0 &= ~ADCENC; // Disable ADC
ADCCTL0 = ADCSHT_2 | ADCON; // ADCON, S&H=16 ADC clks
ADCCTL1 = ADCSHP; // ADCCLK = MODOSC; sampling timer
ADCCTL2 = ADCRES; // 10-bit conversion results
//ADCIE = ADCIE0; // Enable ADC conv complete interrupt
ADCIE = 0;
ADCMCTL0 = ADCINCH_13 | ADCSREF_0; // A13 ADC input select = 1.5V Ref
// Vref = DVCC
// Configure reference module located in the PMM
PMMCTL0_H = PMMPW_H; // Unlock the PMM registers
PMMCTL2 |= INTREFEN; // Enable internal reference
while(!(PMMCTL2 & REFGENRDY)); // Poll till internal reference settles
while (retry--) {
uint16_t adc = 0;
ADCCTL0 |= ADCENC | ADCSC;
__no_operation();
__delay_cycles(1);
adc = ADCMEM0;
if (adc > 0) {
adc_sum += adc;
count++;
}
}
ADCCTL0 &= ~ADCSC;
ADCCTL0 &= ~ADCENC;
ADCCTL0 &= ~ADCON;
ADCCTL1 &= ~ADCSHP;
ADCMCTL0 &= ~ADCINCH_13;
PMMCTL0_H = PMMPW_H; // Unlock the PMM registers
PMMCTL2 &= ~INTREFEN; // Disable internal reference
PMMCTL2 = 0;
return count > 0 ? adc_sum / count : 0;
}
Best regards








