Other Parts Discussed in Thread: MSP430F47176
I am checking the electric current consumption. I connected the Ammeter in sequence of the GND of MSP430 to the GND of power generator (KX-100L) to know how much the MSP consumes.
I am interested in the current consumption while MSP uses ADC module (SD16_A). The current I measures was around 2.2mA (2200 microA).
Is this typical current consumption while using ADC ISR continuously? Or are there any way to reduce this consumption less than 1.1mA?
I also appreciate if someone suggest me which part I should refer in the User's Guide. I use MSP430F47176.
The bottom is the code I use for measuring the ADC ISR current consumption.
By the way, the current consumption of MSP430 LPM3 mode was 0.05mA. I think I do not make large mistake in the connection of Ammeter.
======================================================
#include <msp430x471x6.h>
void main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW+WDTHOLD;
FLL_CTL0 |= XCAP14PF;
do
{
IFG1 &= ~OFIFG;
for (i = 0x47FF; i > 0; i--);
}
while ((IFG1 & OFIFG));
SD16CTL = SD16REFON;
for (i = 0; i < 10000; i++);
FLL_CTL0 |= XCAP14PF;
for (i = 0; i < 10000; i++);
SD16CTL = SD16REFON + SD16SSEL0;
SD16CCTL0 |= SD16GRP + SD16OSR_128;
SD16CCTL1 |= SD16GRP;
SD16CCTL2 |= SD16GRP;
SD16CCTL3 |= SD16GRP;
SD16CCTL4 |= SD16GRP;
SD16CCTL5 |= SD16SNGL;
SD16INCTL0 = SD16INTDLY_0;
for (i = 0; i < 0x3600; i++);
do
{
IFG1 &= ~OFIFG;
for (i = 0x47FF; i > 0; i--);
}
while ((IFG1 & OFIFG));
SD16CCTL5 |= SD16SC;
SD16CCTL5 |= SD16IE;
while(1) {
_BIS_SR(LPM3_bits + GIE);
}
}
#pragma vector=SD16A_VECTOR
__interrupt void SD16ISR(void)
{
unsigned int tmp;
switch (SD16IV)
{
case 2:
break;
case 4:
break;
case 6:
break;
case 8:
break;
case 10:
break;
case 12:
break;
case 14:
tmp = SD16MEM0; // dummy reading
tmp = SD16MEM1;
tmp = SD16MEM2;
tmp = SD16MEM3;
tmp = SD16MEM4;
tmp = SD16MEM5;
SD16CCTL5 |= SD16SC;
break;
}
__bic_SR_register_on_exit(LPM3_bits);
}