This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADC10 ISR not triggering with basic code from example



I have tried all I can think of to get the ADC ISR to run.  Below in the code example:

I am expecting that when a conversion is done another should kick off.  I don't really care about the returned value.

I would settle for a break point set at the statement adcVal = ADC10MEM; to actually stop the debugger.


#include "io430.h"
#include "intrinsics.h"

unsigned short int adcVal;

int main( void )
{
  // Stop watchdog timer to prevent time out reset
  WDTCTL = WDTPW + WDTHOLD;
 
  __disable_interrupt();
  ADC10CTL0 = ADC10IE | ADC10ON | REFON | ADC10SR | ADC10SHT_3 | SREF_1;
  ADC10CTL1 = ADC10SSEL_0 | ADC10DIV_3 | INCH_10;
  __delay_cycles(3000);
  ADC10CTL0 |= ENC;
  __enable_interrupt();
 
  while(1) {
  if ((ADC10CTL1 & ADC10BUSY) == 0) {
    ADC10CTL0 |= ADC10SC;
  }
  }
 
//  return 0;
}

#pragma vector = ADC10_VECTOR
  __interrupt void ADC10_ISR(void) {

  adcVal = ADC10MEM;
  }

**Attention** This is a public forum