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.

TMS570LC4357: ADC1 periodic read

Part Number: TMS570LC4357

Sir,

I want to convert inputs at 4 channels of ADC1  in SCI RX interrupt ISR and send it to a serial port. The RX interrupt is generated in every 1 ms. I have written some code in which EPWM_B hardware trigger source is triggering SOC for ADC continuously and I am trying to read values every 1ms. But not yet getting result. I have also tried RTI_COMP0 trigger source but failed to get the values. how to solve. Softwatre  trigger also I have tried but unable to get the results. I think there is some timing mismatch. One more doubt is abt FIFO buffer size. how much it should be.

Thanx

deepak 

  • Hello Deepak,

    Please get the adc data in adcNotification(), then send the data out in SCI ISR.

    Use adcEnableNotification(adcREG1,adcGROUP1) to enable the notification of a conversion. In single conversion mode for conversion complete and in continuous conversion mode when the FiFO buffer is full.

    Since you use every PWM to trigger the ADC sampling, the single conversion mode should be used.