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.

TMS320F28379D: How can I generate a single pulse using ePWM?

Part Number: TMS320F28379D

The main idea is to generate a single pulse in the ePWM that can be later modulated by the chopper, creating a controlled clock signal.

How could I generate this single pulse using the ePWM module without cyclic events from happening?

Best Regards

  • Hello,

    We could make the PWM do this, but since the PWM is really designed for repetition it's not very straightforward. I think the best solution for you is to use an extra serial communications peripheral such as the SCI. You'll have pulse width control by configuring the data and baud rate.

    For example, sending 0xF would create a shorter pulse than 0xFF. Then you can fine tune the width via the baud rate.

    EDIT: My apologies, I missed the bit about modulation afterwards. There's a few ways to do this with the ePWM. One of the ways I would look at is to setup a PWM with SYNC in enabled (disable external sync paths). Set the TBPRD to something small like 2 and TBCTR = 0 and TBCTR = PRD set the output low via the AQ. Now set the TBPHS to 0xFFFF- # number of cycles in your pulse. Set CMPA=TBPHS and have CMPA set the PWM output high. You can then force a SYNC event via software, the TBCTR will jump to the CMPA value which is greater than TBPRD. It will then overflow and go back to the few counts between 0 and TBPRD where it is constantly being set low. When you are ready to use the PWM as normal you can then reconfigure it.

    Regards,

    Kris