SNIU028D February 2016 – September 2020 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138A , UCD3138A64
In addition to the fault detection and connection described above, there are other registers in the Fault Mux Registers that control other functions. One of these functions is IDE/DCM detection. IDE stands for Ideal Diode Emulation. DCM stands for Discontinuous Mode. They are both controlled by the IDECTRL register in the Fault Mux register set.
Some isolated power topologies simple employ rectification diodes on the secondary side. In Ideal Diode emulation, FETs are used instead of diodes. They are turned on when the diode would be conducting and turned off when the diode would be reverse biased. This increases efficiency because the voltage drop across the FET is lower than the drop across the diode. This is called Synchronous Rectification, so the FETs are called Sync FETs for short.
In continuous mode, current is always flowing, and the sync FET can be turned on for the entire time when the primary side is off, except for dead times. This function is served perfectly by the Normal Mode of the DPWM module. Note that IDE/DCM Detection only works in Normal Mode.
In discontinuous mode, however, current is not flowing continuously, so the sync FET must be turned off before the end of the period to emulate the diode. Otherwise energy can flow back from the secondary to the primary.
In discontinuous mode, the on time(duty) for the sync FET (Db) is proportional to the DPWMA on-time (Da). The multiplying factor depends on the topology, the circuit configuration and on Vin and Vout. This multiplying factor needs to be frequently calculated by firmware and placed in the IDE_KD register.
FaultMuxRegs.IDECTRL.bit.IDE_KD = kd_value;
IDE must also be enabled in the DPWM module:
Dpwm1Regs.DPWMCTRL2.bit.IDE_DUTY_B_EN = 1; //enable ide
Db is calculated by Da (Filter Duty) times IDE_KD. KD is an unsigned value with 4 integer bits and 9 fractional bits. For example, a 0b0001.000000000 would equate to a multiplier of 1 (“0b” signifies binary, and the “.” is used to divide the fractional from the integer part). This would correspond to a hex value of 0x200. For this value of Kd, Db would be exactly the same as Da. There is only one IDE_KD register, but each Filter can can calculate using the KD. Each Filter’s output of the IDE value is controlled by the IDE_EN bit in a DPWM module. The DPWM module is selected by the LoopMux.FILTERMUX.bit.FILTERx_PER_SEL bitfield as shown below:
Normally FILTERx_PER_SEL will already be pointing at the right Filter, because it is also used to provide the period for the Filter to use in calculating the duty value.
In some cases, however, for example where KCOMP is used instead of period, it is still necessary to set FILTERx_PER_SEL so that IDE_EN can be multiplexed properly.
Note also that IDE_EN still needs to be set on any DPWM which is using IDE, even though that DPWM may not be providing IDE_EN to the Filter. If IDE_EN is not set, the normal dead times will be used to control DPWMB.
The IDECTRL register also contains a means to detect DCM. As mentioned before, in continuous mode, the sync FET is on for the entire time that DPWMA is off. So Db = 1-Da. In discontinuous mode, Db < 1-Da. So the DCM detection logic triggers an interrupt when Db < 1-Da. Hysteresis is provided to prevent the interrupt from triggering repeatedly when steady state is close to the boundary between continuous and discontinuous. This is done with the DCM_LIMIT_H and DCIM_LIMIT_L registers.
The DCM_DETECT bit is set when:
It is reset when:
The DCM_DETECT bit can be monitored in the FAULTMUXRAWSTAT register. The status of the interrupt can be read in the FAULTMUXINTSTAT register. The interrupt is enabled by DCM_INT_EN in the IDECTRL register.