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.

TMS320F280025C: EPWM, connection when using only one side

Part Number: TMS320F280025C

Tool/software:

Hello.
I am using the EPWM module but use only one side (A or B
only).
So I do not configure the action qualifier for the unused pins, how should I connect them?
Is it ok to leave it unconnected?

  • Hiroki,

    It is okay to leave it unconnected/floating.

    In case you want to use that GPIO on channel B for something else the do not assign that GPIO to channel B. You follow the procedure below with code snippet: To use only one ePWM channel A without channel B in C2000, you need to configure the ePWM module to operate in a single channel mode. Each ePWM module in C2000 has two output channels, A and B, but they can be configured independently. Here are the steps to configure channel A without using channel B:

    1. Initialize the ePWM module by setting the required period, frequency, and duty cycle for channel A using registers like TBPRD, CMPA, etc.
    2. Enable the ePWM output for channel A by setting the appropriate bits in the AQCTLA register.
    3. Leave the channel B output disabled by not modifying the AQCTLB register. Here's an example code snippet in C to configure ePWM1 channel A without using channel B
      // Configure ePWM1 channel A
      EPwm1Regs.TBPRD = 1000; // Set period
      EPwm1Regs.CMPA.bit.CMPA = 500; // Set duty cycle to 50%
      EPwm1Regs.AQCTLA.bit.ZRO = AQ_SET; // Set output on EPWM1A at CTR=0
      EPwm1Regs.AQCTLA.bit.CAU = AQ_CLEAR; // Clear output on EPWM1A at CTR=CMPA
      
      // Leave ePWM1 channel B disabled
      EPwm1Regs.AQCTLB.bit.ZRO = AQ_NO_ACTION; // No action on EPWM1B
      EPwm1Regs.AQCTLB.bit.CBU = AQ_NO_ACTION;