7.8.2 Adding Output Overvoltage Protection (OVP) in VMC

  1. Open the VMC Configuration created from the MCC SMPS Library.
  2. From the Device Resources, go to CIP Blocks, and click FaultBlock to add it to the Project Resources area.
  3. Click FaultBlock on the Project Resources to open the settings.
  4. The DAC output sets the DAC Voltage Reference to be used for OVP. Setting this to 1.8V gives an OVP of 3.6V due to the equal resistors on the voltage divider network at the voltage output terminal.
  5. In the submodule selection, select CMP1 since this is compatible with the auto-shutdown source of the COG2 used by the PWM Controller Block 2 in the ModulatorBlockVMC.
  6. Select DAC3 since this is compatible with CMP1 positive input. Click Upload All.
    Figure 7-23. FaultBlock Settings in VMC
  7. On the pin manager, set RA0 as the FAULT pin. Click Generate Code.
  8. To enable fault protection, add on main.c the line of code Fault_EnableProtection();.
  9. The board has now overvoltage protection in VMC mode.
Figure 7-24. Added OVP Detection in VMC