16#include "system/pins.h"
20#include "pwrctrl/pwrctrl.h"
89 ISEC_OC_THRES_CLEAR, ISEC_OC_T_BLANK_TRIG, ISEC_OC_T_BLANK_CLEAR);
93 VPRI_OV_THRES_CLEAR, VPRI_OV_T_BLANK_TRIG, VPRI_OV_T_BLANK_CLEAR);
97 VPRI_UV_THRES_CLEAR, VPRI_UV_T_BLANK_TRIG, VPRI_UV_T_BLANK_CLEAR);
101 VSEC_OV_THRES_CLEAR, VSEC_OV_T_BLANK_TRIG, VSEC_OV_T_BLANK_CLEAR);
105 VSEC_UV_THRES_CLEAR, VSEC_UV_T_BLANK_TRIG, VSEC_UV_T_BLANK_CLEAR);
113 OTP_THRES_CLEAR, FAULT_PERSISTENCE_COUNT_TEMP, FAULT_PERSISTENCE_COUNT_TEMP);
115#if defined (FAULT_SHORT_CCT) && (FAULT_SHORT_CCT == true)
117 Fault_EnableShortCircuitProtection();
120 DAC3DATH = IPRI_SC_THRES_TRIG;
136 uint16_t faultCheck = 0;
138 #if defined(FAULT_ISEC_OC) && (FAULT_ISEC_OC == true)
153 #if defined(FAULT_VPRI_OV) && (FAULT_VPRI_OV == true)
158 #if defined(FAULT_VPRI_UV) && (FAULT_VPRI_UV == true)
164 #if defined(FAULT_VSEC_OV) && (FAULT_VSEC_OV == true)
169 #if defined(FAULT_VSEC_UV) && (FAULT_VSEC_UV == true)
176 #if defined(FAULT_PS_OTP) && (FAULT_PS_OTP == true)
This is the generated driver header file for the CMP3 driver.
This is the generated driver header file for the PWM driver.
Contains h files that are part of device layer.
Contains public fault functions.
Contains fault generic public functions.
uint16_t Fault_GetFlags(void)
Contains API functions for fault protection.
POWER_CONTROL_t * psfb_ptr
Contains public functions for PWM.
void PwrCtrl_PWM_Stop_Switching(void)
Disable the PWM output.
@ PWRCTRL_STATE_FAULT_DETECTION
power converter control state #6: checks if a fault occurs
static void Fault_PrimaryOverCurrent_EventHandler(void)
callback for primary OC
void Fault_Reset(void)
Clears the fault object flag bits.
void Fault_Initialize(void)
Initialize the fault objects.
void Fault_Execute(void)
Executes the fault handlers.
void Fault_Handler(void)
Handles the fault trip by turning off the power control switching.
bool FAULT_CheckMax(FAULT_OBJ_T *faultInput, int16_t faultSource, FAULT_CALLBACK callback)
This function compares the fault source value with the threshold limits and sets (or) resets the faul...
bool FAULT_CheckMin(FAULT_OBJ_T *faultInput, int16_t faultSource, FAULT_CALLBACK callback)
This function compares the fault source value with the threshold limits and sets (or) resets the faul...
void FAULT_Init(FAULT_OBJ_T *faultInput, int16_t threshold, int16_t hysLimit, uint16_t thresholdCnt, uint32_t hysCnt)
This function initializes the fault object data structure with the values that required to detect a f...
void CMP3_EventCallbackRegister(void(*handler)(void))
This function can be used to override default callback and to define custom callback for CMP3 Event e...
#define GPIO_debug_SetLow()
Sets the RD14 GPIO Pin which has a custom name of GPIO_debug to Low.
#define GPIO_debug_SetHigh()
Sets the RD14 GPIO Pin which has a custom name of GPIO_debug to High.
uint8_t FaultActive
Set/Cleared inside flt check loop
uint8_t FaultLatch
Flag indicating if FAULT has been tripped.
FAULT_OBJ_T VRail_5V
Fault object for 5V rail.
FAULT_OBJ_T VSecondaryUVP
Fault object for Secondary under voltage protection.
FAULT_OBJ_T PowerSupplyOTP
Fault object for Power Supply Temperature.
FAULT_OBJ_T VSecondaryOVP
Fault object for Secondary over voltage protection.
FAULT_OBJ_T ISecondaryOCP
Fault object for Secondary over current protection.
FAULT_OBJ_T VPrimaryOVP
Fault object for Primary over voltage protection.
FAULT_OBJ_T VPrimaryUVP
Fault object for Primary under voltage protection.
FAULT_OBJ_T IPrimaryOCP
Fault object for Primary over current protection.
FAULT_OBJ_T ISenseSCP
Fault object for Short circuit protection.
uint16_t FaultDetected
Fault indication for fault occurrence.
FAULT_t Object
Fault Objects.
uint16_t VCapVoltage
Data value for capacitor.
uint16_t VInVoltage
Data value for input voltage.
uint16_t ISenseSecondary
Data value for secondary current as measured with shunt.
uint16_t Temperature
Data value for temperature.
unsigned Running
Bit 0: Power converter is running.
unsigned FaultActive
Bit 1: Power converter fault is active.
PWR_CTRL_STATE_t State
Power Control State ID.
FEEDBACK_SETTINGS_t Data
Feedback channel settings.
STATUS_FLAGS_t Status
Power Supply status flags.
FAULT_SETTINGS_t Fault
Fault flags and settings.