AnsweredAssumed Answered

Aduc7060 ADC interrupt is not working

Question asked by SenthilKumar.M on Jun 18, 2015
Latest reply on Jul 2, 2015 by MMA

     Hi All,

         We have been using aduc7060 for our temperature converter product.

         I have to trying to arm ADC in continuous interrupt mode. I have did the following settings, but the interrupt routine never been wake up. Please help me to fix this issue.

 

ADC Initialization Code:

                                      // Enable ADC0 result ready interrupt source

                                      ADCMSKI = BIT0;

                                     // 50 Hz no filtering, Chop off, No averaging

                                     ADCFLT  = 0X7F;

                                      ADC0CON = BIT10 | BIT15;    // Gain = 1, Unipolar, enable ADC0, Int Reference

                                    // ADC extended functionality is disabled

                                     ADCCFG = 0;

                                    // Offest Self Calibration

                                    ADCMDE  = ( BIT2 | BIT4 | BIT7 );

                                    while((ADCSTA & BIT0) != BIT0){ } // Wait for Calibration routine to complete

  

                                     // Gain Self Calibration

                                   ADCMDE  = ( BIT0 | BIT2 | BIT4 | BIT7 );

                                    while((ADCSTA & BIT0) != BIT0){} // Wait for Calibration routine to complete

                                  

                                    // ADC0/1, Gain = 1, Unipolar, Int Reference

                                    ADC0CON = ( BIT15 | BIT11 | BIT10 );

                                 

                                    // Enable Continuous conversion mode

                                   ADCMDE  = ( BIT0 | BIT7 );

                               

                                  // Enable ADC0 interrupts

                                    IRQEN |= BIT10;

 

 

 

 

IRQ Handler:

                                  void IRQ_Handler(void) __irq
                                  {
                                           ULONG Irq_Status = 0;
                                           UBYTE Irq_Comiid0_data = 0;
 

                                       // Read off IRQSTA register
                                         Irq_Status = IRQSTA;

                                      //ADC0 Interrupt
                                   if (Irq_Status & BIT10)
                                   {
                                        sig_adc_raw_data = ADC0DAT;// Read ADC0 conversion result
  
                                    }

 

                                  // Timer 1 interrupt source occurs every 10ms

                                      if ( Irq_Status & BIT4 )

                                   {

                                               

                                   }

                              }

 

 

 

However I am Initialized a Timer interrupt, and the timer interrupt handler is executing fine.

Outcomes