Other Parts Discussed in Thread: MSP430F6733
Hi,
i am working on MSP430F6733 and trying to use ADC10A in "Repeat-Single-Channel Mode".
Even after configuring ADC and starting conversion, ADC10BUSY is never cleared or interrupt never raised after conversion.
Below is code snippet:
void InitSarADC(void)
{
P1DIR &= 0xFD; // Configure A1/P1.1 as input
P1SEL |= 0x02; // Select Analog fn
PMAPPWD = 0x2D52u;
PMAPCTL = PMAPRECFG;
P1MAP0 = 31; // Configure Map register
ADC10CTL0 = 0x00; // Disable ADC
ADC10CTL0 |= 0x10; // ADC On
ADC10CTL0 |= 0x290; // ADC10MSC
ADC10MCTL0 = 0x01; // Select A1
ADC10CTL1 = 0x06F4; // Repeat-single-channel + MCLK + clock / 8 + SAMPCON sourced from the sampling timer T0.
ADC10CTL2 = 0x10; // 10 bit
ADC10IE = 0x33; // Configure Interrupt
}
void StrtConv(void)
{
ADC10CTL0 |= 0x03; //Enable conversion
}
ISR( ADC10_VECTOR, ADC10_SAR )
{
tUI16 Temp;
RT++;
if(RT > 10 )
{
Temp = ADC10MEM0;
Temp += RT;
}
}
Any suggestions?