ADC is always BUSY and Conversion does not complete

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC is always BUSY and Conversion does not complete

Jump to solution
2,080 Views
akbar_ar
Contributor II

ADC is always BUSY and Conversion does not complete

when i add a while loop to check the ADC mode is BUSY the control stays in this while loop 

I am trying to Read the Pin values using Adc_Readgroup

but to read successfully the conversion should be complete 

I am calling functions 

Adc_Calibrate(AdcGroup_0,&adc0_cal_status);

/* Setup the variables to contain the ADC results */
Adc_SetupResultBuffer(AdcGroup_0, &ADC_Group0Results[0]);

/* Initiate the initial conversion */
Adc_StartGroupConversion(AdcGroup_0);

before calling

Adc_ReadGroup(AdcGroup_0,&ADC_Group0Results[0]);

kindly find the configuration file below

0 Kudos
1 Solution
2,074 Views
VinhNguyen13
Contributor II

Hi man,

Did you enable the Port Pin for ADC, and the Clock in MCU? Just hint for you.

View solution in original post

3 Replies
2,075 Views
VinhNguyen13
Contributor II

Hi man,

Did you enable the Port Pin for ADC, and the Clock in MCU? Just hint for you.

2,030 Views
akbar_ar
Contributor II

Hi Vinhnguyen

             The problem is resolved the problem was I have two versions of the project there is no issue in the older version. When you replied i did checked the port pins and Mcu clock. the port pin was enabled and Mcu clock was set to SIRC. At later point of time when i was comparing the two versions i found that SIRC was not under Mcu control so i changed to SOSC clock now it works

           Your hint helped though but i was late to find it

2,053 Views
akbar_ar
Contributor II

Hi VinhNguyen

                 Thank You for the reply

                 Port pins are enabled in PORT and Clock(4Mhz SIRC) is enabled for ADC in MCU

Regards

Akbar

0 Kudos