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.

TMS570LS3137: TMS570LS3137 internal ADC sample time setting question

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN,

8 channel are used, 8 times sampling in 1ms, that means total 64 points sampling in 1ms. Customer wants to scatter the 64 points sampling in average in 1ms, so they need to set the sample time for each sampling.

we did not find a detailed description/formula to set the sample time of internal ADC module. so 2 questions below:

1. From the HalCoGen tool, a formula is derived

    tTotal = tScan + (tDischarge + tSample + tConversion) * NumChnnl

   is it correct?

2. please provide the specific description on how to calculate the sample time of TMS570LS3137 internal ADC module

  • Hello Richard,

    The sample time is determined by the value programmed into the ADxxSAMP register. The sample time is ADxxSAMPval+2 ADCLOCK cycles.

    I think you are really trying to calculate what the overall conversion time is. In the formula that you have noted, I don't understand what tScan is. The total conversion time will be the part included in the parentheses in your formula. However, there will be some delay during the switching of the muxed inputs to the ADC core for each channel and also some delay in getting the results into the ADC buffer but these delays are no necessarily quantified in the datasheet making fine timing estimations difficult.

    If the intent is to control the frequency of conversions to arrive at equally spaced conversions (1ms/64 = 15.625nS intervals or 64KHz frequency), it would be better to setup a trigger source from one of the timers on the device and then trigger conversions on one of the conversion groups (G1, G2 or EV). This could be done by setting up a PWM on one of the NHET channels or by using the RTI in 1ms intervals and calling the conversion within the RTI ISR.
  • Hi Chuck,

    thank you for your reply!