Hello,
I'm trying to test the on-chip temperature sensor of MSP430F2617. For this purpose I decided to start with a really simple code based on a TI example.
Concretely, I just want to read a single temperature value of the sensor. When debugging the code I find that the ISR of the ADC12 it's not called. My ADC12 configuration is as follows:
ADC12CTL0 = SHT0_7 + REFON + ADC12ON; // I want to use internal reference 1.5 V
// ADC12CTL1 is ok with the default values. CSTARTADD_0 + ADC12DIV_0 + ADC12SSEL_0 + CONSEQ_0
ADC12MCTL0 = SREF_1 + INCH_10;
ADCIE = 0x0001; // Interrupt enabled ADC12IFG.0
To start sampling and conversion: ADC12CTL0 |= ENC + ADC12SC (in the main loop)
And afterwards I enter the micro to low power mode by: _BIS_SR (LPM0_bits | GIE);
The ISR is:
#pragma vector=ADC12_VECTOR
__interrupt void adc12_ISR (void)
{
temp = ADC12MEM0;
_BIC_SR_IRQ(LPM0_bits);
}
I know that the temperature value will not be with the format desired, but I cannot go further because that simple code is not working. I don't understand why it cannot reach ISR. I'm using IAR and FET debugger tool. Did I forget sth?
Thx.