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 Configuration TMS570LS4357

Hello

I tried to implement the video example of the adc on Hercules. But I use the TMS570LS4357 and I have many problems.

First I used the adc 2 and the 19 pin, and use the following configuration on HalCode Generator

But when I acttivated the pin 19, the time no change like in a example

I generate the code and use the same code in Code Compeser (I change the adcREG1 to adcREG2), but the MCU only wait for the finish the conversation. And later I change my configuration ADC1 and pin 9, like a example but the MCU do the same, only wait for the finish.

This is the lines of the code:

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");

Thanks

Juan Carlos