SPRADF4 December   2023 TMS320F280023C , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280039C , TMS320F280039C-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S , TMS320F28P650DK

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Basic CLB Implementation
  6. 3Turn-On Delay Configurations
  7. 4Turn-Off Delay Configurations
  8. 5Different Options to Turn On or Turn Off SR PWM
    1. 5.1 Software Control Method
    2. 5.2 Hardware-Based Scheme
  9. 6How to Adjust the SR PWM Clamping Time
  10. 7Summary
  11. 8References

Basic CLB Implementation

The document, Implement Three-Phase Interleaved LLC on C2000™ Type-4 PWM, showcases using CLB for SR control. This application note discusses making the CLB logic more feasible for actual applications.

Figure 2-1 shows EPWM1 is selected as the primary-side PWM, EPWM2 is selected for SR PWM as the example, and the expected SR PWM configurations for resonant and SR clamp modes are included.

To achieve adjustable turn-on delay for SR PWM, the CLB module is not used to create the final SR PWM signals but the intermediate signal overriding the action qualifier (AQ) submodule output is used, meaning the addition of turn-on delay by the dead band (DB) submodule of the EPWM module is possible.

GUID-20231103-SS0I-WSSX-STB1-NSK6QSXHD0HW-low.png Figure 2-1 CLB Configurations and SR Control Logic

The turn-on event is aligned with the rising edge of EPWM1A in example SR EPWM2A. The turn-off event follows the falling edge of EPWM1A during resonant mode or is limited by max on-time during SR clamp mode. Counter 0 is defined to start counting at the rising edge in the CLB and provide the match 1 event when the counter value reaches the predefined one (the predefined period corresponds to half of the resonant period). Users can utilize a look-up table (LUT) for ORing the falling edge and the match 1 event of Counter 0.

The finite state machine (FSM) is required for creating the expected logic for EPWM2A. In Figure 2-2, S0 is set to turn high at E0 and low at E1, with the rising edge of EPWM1A as an E0 event and LUT output as an E1 event. In Table 2-1, the Karnaugh map is created for S0 state.

GUID-20231103-SS0I-Q9SR-RCNV-GHJNDDLSF50G-low.png Figure 2-2 State Machine in the FSM Block
Table 2-1 FSM0 S0 Karnaugh Map
FSM0 S0
S0 E0E1 00 01 11 10
0 0 0 1 1
1 1 0 0 1

Based on the Karnaugh map, Equation 1 for FSM0_S0 is deducible as:

Equation 1. S0 = (~S0 & E0) | (S0 & ~E1)

In Table 2-2, using FSM0_S0 to override the module output of EPWM2A is possible by assigning FSM0_S0 to output 4 of the CLB2 module directly with the CLB multiplexer output enable register CLB_OUT_EN. In the Table 2-2 example, the CLB2 module is selected for EPWM2 for the reasons explained in this section.

Table 2-2 Peripheral Signal Multiplexer Table for CLB2
CLB2
CLB2 CLB2_OUT0_0 PWMA EPWM2
CLB2 CLB2_OUT1_0 PWMA_OE EPWM2
CLB2 CLB2_OUT2_0 PWMB EPWM2
CLB2 CLB2_OUT3_0 PWMB_OE EPWM2
CLB2 CLB2_OUT4_0 AQ_PWMA EPWM2
CLB2 CLB2_OUT5_0 AQ_PWMB EPWM2
CLB2 CLB2_OUT6_0 AQ_PWMA EPWM2
CLB2 CLB2_OUT7_0 AQ_PWMB EPWM2

EPWM2B differs regarding FSM configurations because EPWM2B creates the AQ module output with the reverse polarity of EPWM1B (explained further in Section 3). Similarly, CLB2_OUT5 is activated to select FSM1_S0 as the AQ module output for EPWM2B.

Using the same method, the Equation 2 for FSM1_S0 is:

Equation 2. S0 = (S0 & ~E0) | (~S0 & E1)

Alternatively, the CLB configuration diagram in Figure 2-3 is configurable to where IN0~IN4 refers to the falling edges of EPWM1A and EPWM1B and the rising edges of EPWM1B and EPWM1A. Additionally, IN5 turns the SR on and off (explained further in Section 5).

GUID-20231103-SS0I-D07D-LRJZ-CZJCL4J5FHHR-low.png Figure 2-3 CLB Configuration Diagram