7.8.1 Adding Output Overvoltage Protection (OVP) in PCMC

  1. Open the PCMC 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. Set the Voltage Reference Level of the DAC to 5V.
  5. 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.
  6. In the submodule selection, select CMP5 since this is compatible with the auto-shutdown source of the COG3 used in the PWM Controller Block 3 in ModulatorBlockPCMC.
  7. Select DAC7 since this is compatible with the CMP5 positive input. Click Upload All.
    Figure 7-20. FaultBlock Settings in PCMC
  8. On the pin manager, set RA0 as the FAULT pin. Click Generate Code.
    Figure 7-21. Pin Assignment of Fault Signal
  9. To enable fault protection, add on main.c the line of code Fault_EnableProtection();.
  10. The board has now overvoltage protection in PCMC mode.
    Figure 7-22. Added OVP Detection in PCMC