SNIU028D February 2016 – September 2020 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138A , UCD3138A64
The UCD3138 has sophisticated hardware for generating complex waveforms beyond the simple DPWMA and DPWMB waveforms already discussed. The DPWMC, the Edge Generation Module, and the IntraMux play a key role in delivering this capability.
DPWMC is a signal inside the DPWM logic. It goes high at the Blanking B begin time, and low at the Blanking B end time.
The Edge Gen module takes DPWMA and DPWMB from its own DPWM module, and the next one, and uses them to generate edges for two outputs. For DPWM3, the DPWM0 is considered to be the next DPWM. Each edge (rising and falling for DPWMA and DPWMB) has 8 options which can cause it. The options are:
The Edge Gen is controlled by the DPWMEDGEGEN register. It also has an enable/disable bit.
The IntraMux is controlled by the Auto Config registers. The IntraMux takes signals from multiple DPWMs and from the Edge Gen. It can be programmed to route these signals to the DPWMA and DPWMB outputs. This is useful for complex topologies like Phase Shifted Full Bridge, especially when they are controlled with automatic mode switching. It is disabled by setting the Intramux to Pass Through mode for each of the DPWM signals, A and B. If the Intra Mux is enabled, high resolution must be disabled.
Here is a drawing of the Edge Gen/Intra Mux:
Here is a list of the IntraMux modes for DPWMA:
Here is a list of the IntraMux modes for DPWMB:
The DPWM number wraps around just like the Edge Gen unit. For DPWM4, DPWM(n+1) is DPWM0, DPWM(n+2) is DPWM1, and so on.
Note that the Fault logic affects the Fault module, which is before the Edge Gen and IntraMux units (refer to Figure 2-1). The effect of a fault must be calculated taking into account the impact of the Edge Gen and IntraMux units.
Also the GPIO_A_EN & GPIO_B_EN bits inside the DPWMCTRL1 register affect the signal state before the IntraMux unit. So if these bits are meant to be used to turn the DPWM output off, the bits in the original DPWM are supposed to be altered. And not the bits in the DPWM module that the outputs are redirected through.