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.

TMS570LS0714: TMS570ls0714 ADC Stuck in conversation while loop

Part Number: TMS570LS0714
Other Parts Discussed in Thread: HALCOGEN

I am trying to read voltage by using adc in TMS570lS07 and i have done all the intructions in (ADC Display)help topic but my ADC did not work and stucks in  while((adcIsConversionComplete(adcREG1,adcGROUP1))==0); also the flag there has 0 as return value so please can any one help us to solve solve this problem ??

#include "sys_common.h"
#include "system.h"

#include "esm.h"
#include "adc.h"
#include "gio.h"
#include "het.h"




adcData_t adc_data[4];
void wait(uint32 time);



void main(void)
{
    uint32 ch_count=0;

    gioInit();
    hetInit(),
    adcInit();


    while(1) /* ... continue forever */
    {


        adcStartConversion(adcREG1,adcGROUP1);


        /* ... wait and read the conversion count */
        while((adcIsConversionComplete(adcREG1,adcGROUP1))==0);
        ch_count = adcGetData(adcREG1, adcGROUP1,&adc_data[0]);

        ch_count = ch_count;

    }
}


void wait(uint32 time)
{
    while(time){time--;};
}
  • Hello,

    If the ADC group1 is configured as SW triggered, the conversion can be started by calling adcStartConversion(adcREG1,adcGROUP1).

    If the ADC group1 is configured as HW triggered, the trigger signal should be applied after you calling adcStartConversion(adcREG1,adcGROUP1). The trgiier sources can be selected from HALCOGen GUI.