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.

TMS570LS1224: PWM generation using GPIO

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Hii,

i want to generate PWM signal using GPIO. is there any way to generate controlled pwm signal with variable duty ratio and period without usind Loop for Delay or Interrupt.

  • Hello,

    1. TMS570LS1224 device has ePWM module which can be used to generate complex pulse width waveforms with minimal CPU overhead or intervention.

    2. The N2HET module on this device can also be used to generate PWM signals. N2HET is a High-End Timer timing coprocessors. 

    The duty ratio can be changed during run time. 

  • Hi, Thanks for reply. i want to use ONLY GPIO to generate PWM without using NHET/ePWM module. is it possible ?

  • Hello Amit,

    Yes, you can use one GPIO to generate a PWM output signal.

    If the PWM is used to control a servo motor with hard realtime response requirements, you will need to use hardware PWM (ePWM, or N2HET) rather than GIO PWM.

    If your application is more tolerant of low-timing resolution and high jitter, GIO PWM can be an option.

    This device has one RTI module. The RTI module has two independent counters, and four configurable compares to generate system ticks. You can toggle GPIO pin in the RTI compare interrupt routine. 

    Please refer to example_rtiBlinky.c in HALCoGen help

  • Thank you for reply.