7.8.1 Adding Output Overvoltage Protection (OVP) in
PCMC
Open the PCMC Configuration created
from the MCC SMPS Library.
From the Device Resources, go to CIP
Blocks, and click FaultBlock to add it to the Project Resources area.
Click FaultBlock on the
Project Resources to open the settings.
Set the Voltage Reference Level of the DAC to 5V.
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.
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.
Select DAC7 since this is compatible
with the CMP5 positive input. Click Upload All.
On the pin manager, set RA0 as the
FAULT pin. Click Generate Code.
To enable fault protection, add on
main.c the line of code
Fault_EnableProtection();.
The board has now overvoltage
protection in PCMC mode.
The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.