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.

ADC TMS570LS4357

Other Parts Discussed in Thread: HALCOGEN

Hello,

I tried to implement a example to configured the adc in a TMS570LS4357, but I have many problems during my  programation.

First, I tried use other channel and other adc group. I use the ADC 2 and the pin 19. I configured the adc in HALCode like a image

But when I activated the pin 19, the time is in 0, no change like in the example

And when I program the code the MCU only wait for the finish of the conversion. I use the same configuration (adc 1 and pin 9), bbut the code do  the same, is only wait for the finish of the conversation. I don't know what is the problem.

This is the code that I use:

void main(void)
{
/* USER CODE BEGIN (3) */
adcData_t adc_data;
adcData_t *adc_data_ptr = &adc_data;
unsigned int j, value;

sciInit();

adcInit();
adcStartConversion(adcREG2, 1U);
//while(!adcIsConversionComplete(adcREG2, 1U));
adcGetData(adcREG2, 1U, adc_data_ptr);
value=(unsigned int)adc_data_ptr->value;
for(j=0;j<8;j++)
{
command[j]=(value>>28)&15;
if(command[j]>9)
command[j]+=7;
command[j]+=48;
value=value<<4;
}
sciSend(CPU, 8 , command);
sciSend(CPU, 2, (unsigned char*)"\r\n");

}

And thanks for your attention

Regards