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.

TMDX570LC43HDK: Enhanced Pulse Width Modulator (ePWM) Module to generate 25KHz frequency

Part Number: TMDX570LC43HDK
Other Parts Discussed in Thread: HALCOGEN

Hi Team, 

I need a support on the ePWM module to generate a 25kHz frequency to motor control in TMDX570LC43HDK.

Thanks in advance.

  • You can use the example provided within HALCoGen to configure any of the ePWM modules.

  • Hi Sunil,

    Yes, I have undergone the example of hetPWM.c

    I have a doubt in HALCoGen configuration in HET1 Tab,


    This Pin 8 is refers to HET1[8] or HET1[0] because it says PWM 0 and Pin 8.

    And also Dir should be selected for output is it correct 

    How to configure the particular frequency and its formula ?

    I have attached the file because it is not upload the picture

    Thank you in advance.

  • Hi Santhosh,

    You can use either the ePWMx modules or the HETx modules to generate PWM outputs. HALCoGen includes examples for both methods.

    The file you uploaded shows you are trying to configure the HET module to generate PWM. HET is a timing coprocessor with a dedicated instruction set that can be used to implement various timing functions. HALCoGen includes a template HET program that is used to get started quickly. This template program supports up to 8 PWM outputs, up to 8 input signal edge detection examples, and up to 8 input pulse width capture examples.

    The 8 PWM outputs are labeled PWM0 through PWM7. You can assign any of the available HET terminals to these PWM outputs. In your example, PWM0 is assigned to HET1[8] terminal.

    You do need to configure the PWM output terminals as output.

    The PWM frequency and duty cycle are configured using the "Duty %" and "Period" fields on the "Pwm 0-7" tab in HALCoGen. The actual formula for the PWM period is based on an understanding of the time base used by the HET module. This is described in detail in the technical reference manual (TRM).

    Hope this helps.