Hi,
I'm trying to run a simple code for an acquisition on ADC of F28027 and I'm not able to trigger the conversion through software.
After doing all the configurations of the ADC I have a task that should be able to trigger the ADC conversion by forcing the start of conversion like this:
ADC_forceConversion(myAdc, ADC_SocNumber_0);
//Wait for end of conversion.
while(ADC_getIntStatus(myAdc, ADC_IntNumber_1) == 0){
GPIO_setLow(myGpio, GPIO_Number_3);
}
GPIO_setHigh(myGpio, GPIO_Number_3);
// Clear ADCINT1
ADC_clearIntFlag(myAdc, ADC_IntNumber_1);
// Get temp sensor sample result from SOC1
saidaADC = ADC_readResult(myAdc, ADC_ResultNumber_0);
I have a LED (GPIO_Number_3) blinking after each conversion, but the task stays stuck inside the while loop, meaning that there is some issue with the conversion.
Could it be the start of conversion order before the while loop that's not running?
I'm sorry by posting a question on what seems to be a simple thing, but I wasn't able to find an example of ADC acquisition with software trigger source.
Thanks in advance,
Mário