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.

TMS570LS0914: Precise AD conversion using a PWM signal

Part Number: TMS570LS0914
Other Parts Discussed in Thread: HALCOGEN

Hello,

In a project we would like to implement two current controls on the TMS570LS0914, which are to be controlled via a PWM signal.

- For the first PWM control the N2HET[30] (Pin 127) is used. An AD value is evaluated via AD1IN[21] (pin 65).

- For the second PWM control N2HET[14] (pin 125) is used. An AD value is evaluated via AD1IN[01] (pin 71).

The duty cycle of a 16kHz PWM signal is to be controlled. An AD value is to be measured and evaluated at a high level. The problem at this point is that the duty cycle can reach <10%, whereby the duration of a high level is < 7us. The following photo shows the signal (relevant signals: purple = PWM signal, yellow = signal at the AD pin):

Here I have the following questions:

- What is the ideal way to allow timing of AD conversion at such short levels?

- For the second control, EVENT based triggering of the conversion is possible. Could this already be the solution to our problem?

- Is a precise AD conversion possible with the first control variant and the current hardware wiring (N2HET[30] (pin 127) & AD1IN[21] (pin 65))? Unfortunately EVENT based triggering would not be possible with this variant.

Thank you in advance for your help.

  • Hello,

    1. LS0914 implements several ePWM modules. The ePWM module can generate two output: SOCA and SOCB (start of ADC conversion), to synchronize with the on-chip ADC modules.

    2. If NHET is used to generate PWM, you can generate a trigger signal on a NHET pin to start ADC conversion.

        For example, when counter = 200, the NHET pin is toggled for1 period   (cnt instruction)

                              when counter = 100, the NHET is toggled for 50% duty cycle  (data field in ecmp instruction)

                               you can toggle another NHET pin (for example NHET[30] or NHET[14])  when counter=x ( 0 < x < 200). (data field in ecmp instruction)

        

  • Hello,

    thanks for the answer.

    I have a problem understanding how to set the SOC for the ePWM signals.

    For the ADCs, it is clear to me how to do this adjustment with Halcogen.

    However, I do not understand the division between ePWM_A1, ePWM_A2 and ePWM_B. The choice between A and B seems to be relatively clear and can (if I understand correctly) be made here:

    For example, how can I configure a PWM3 (like EPWM3A) signal as ePWM_A1 and a PWM5 (like EPWM5A) signal as ePWM_A2?

    ...

  • Hello,

    Please refer to section 7.5 of device datasheet:

    7.5.2.3 Controlling ADC1 and ADC2 Event Trigger Options Using SOC Output from ePWM Modules