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 Dual Channel Read

Other Parts Discussed in Thread: TMS570LS1114, TMS570LS2124

I am developing a motor-control application and needs to read the current (measured over sense-resistors) in two of the motor-phases at the same time. I will use the TMS570LS1114 which has two 12-bit ADCs.

We are doing the hardware pin-out and assigning the analog signals to the pins of the TMS570. I want the ADC1 to be triggered and run at the same time as ADC2. ADC1 should convert one current-reading and ADC2 another.

Are there any limitations for assigning my signals to any of the ADC-pins or could my current-signals go to ANY pin as long as one goes to a pin accessible by ADC1 and the other to one pin which could be read by ADC2 ?

I remember doing this on an Infineon XMC4k and then the current-signals had to go into the ADC-pins numbered with 0 (actually Channel 0, group 0 and 1) to be possible to convert at the same time. Otherwise they were not.

  • Hi Robert,

    I guess you're going to trigger your ADCs to trigger of the same source. If you want to ensure that your currents are read at exactly the same time, then they need to use the same ADC channel number. So ADC1IN[00] and ADC2IN[00], ADC1IN[01] and ADC2IN[01] etc. Depending on your configured sample/discharge times, the time difference between reads of successive channels on a single ADC (so ADC1IN[00] and ADC1IN[01] for example) will be about 1us.

    Beware though, on our TMS570LS2124, and I guess on your TMS570LS1114, there is a silicon issue whereby reading a shared ADC input channel (so ADC1IN[08] to ADC1IN[23] and ADC2IN[00] to ADC2IN[15]) causes cross channel leakage to any other channel sampled at the same time, whether it be shared OR unique.

    See my associated post http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/314565/1233910.aspx.

    There's not much that can be done about it. I have proposed some workaround as you will see in the post. I think the degree of cross channel leakage will depend on your hardware implementation. We are going to characterise our hardware and take it into account in the software.

    Regards, Tony.

  • Robert,

    The ADC module supports three conversion groups, each of which can be triggered by a different source. You can configure one hardware event to trigger a conversion group in ADC1 and a conversion group in ADC2. The first channels selected for conversion in these groups will then be sampled simultaneously as long as you have configured the ADC1 and ADC2 modules identically (clock frequency, prescalers, sample time, etc.). The LS1114 MCU has an additional "Enhanced Channel Selection Mode" that allows even more flexibility in defining which channels are converted in which order.

    The issue that Tony is referring to applies to the case when there is current injected into a dual-input channel (one that can be converted using either ADC1 or ADC2, there are 16 such channels). This cross-coupling issue is significantly reduced if the input levels are lower than VCCAD - 0.3V.

    Let me know if this helps.

    Regards, Sunil

  • Hi Tony,

     thanks for your very detailed answer. Ive read through your earlier post as well. My first thought are that all the channels of ADC2 are shared, how will it ever then be possible to use, since it will always be affected ?

     Do I understand you correctly that if I use ADC1IN[00] and ADC2IN[00] (both read at the same time) the reading on ADC1 will be fine but the ADC2IN[00] will be affected (due to the leaking) from ADC1IN[08] ?

     If this is the case, I see no other way forward then limit the signal level for the current-readings to be below VCCAD-0.3 V (like Sunil suggests below). That will however, affect the resolution of our current-reading.

     Brgrds, Rob

  • Hi Rob,

    Robert Pettersson said:
    My first thought are that all the channels of ADC2 are shared, how will it ever then be possible to use, since it will always be affected ?

    Indeed, that is the big issue. You will note in my other post that by empirical measurement, it seems that the offset applied to the unique channel is directly proportional to the voltage applied (read) on the shared channel. I'm thinking that I will apply this proportional offset within software.

    However, I haven't yet investigated Sunil's workaround, I think some further investigation is required for a target dependent scenario to determine the best approach in our particular case and potential respin of the hardware.

    Robert Pettersson said:
    Do I understand you correctly that if I use ADC1IN[00] and ADC2IN[00] (both read at the same time) the reading on ADC1 will be fine but the ADC2IN[00] will be affected (due to the leaking) from ADC1IN[08] ?

    I think you have misunderstood. The reading on the shared channel, ADC2IN[00] here, will be okay. The reading on the unique channel, ADC1IN[00] here, is the one that will be affected.

    I've attached the document that Sunil refers to (draft errata) which I hope is not a problem for TI.

    3058.0508.ADC_shared_channel_injection_offset.pdf

    Regards, Tony.