16#include "system/pins.h"
18#include "config/macros.h"
20#include "pwrctrl/pwrctrl.h"
24#include "../driver/mcc_extension/drv_mcc_extension_pwm.h"
100#if defined (FAULT_SHORT_CCT) && (FAULT_SHORT_CCT == true)
118 uint16_t faultCheck = 0;
120 #if defined(FAULT_ISEC_OC) && (FAULT_ISEC_OC == true)
125 #if defined(FAULT_VSEC_OV) && (FAULT_VSEC_OV == true)
130 #if defined (FAULT_IPRI_OC) && (FAULT_IPRI_OC == true)
135 #if defined(FAULT_VPRI_OV) && (FAULT_VPRI_OV == true)
140 #if defined(FAULT_VPRI_UV) && (FAULT_VPRI_UV == true)
145 #if defined(FAULT_VRAIL_5V) && (FAULT_VRAIL_5V == true)
201 #if defined (LOAD_DISCONNECT) && (LOAD_DISCONNECT == true)
313 #if defined (FAULT_PS_OTP) && (FAULT_PS_OTP == true)
This is the generated driver header file for the CMP1 driver.
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.
#define VPRI_OV_T_BLANK_TRIG
#define VPRIM_LOAD_STEP_CLAMP
#define VPRI_OV_THRES_TRIG
#define VPRI_OV_T_BLANK_CLEAR
#define VPRI_OV_THRES_CLEAR
#define VSEC_OV_THRES_TRIG
#define VSEC_OV_T_BLANK_TRIG
#define VSEC_OV_THRES_CLEAR
#define VSEC_LOAD_STEP_CLAMP
#define VSEC_OV_T_BLANK_CLEAR
#define IPRI_OC_THRES_CLEAR
#define IPRI_SC_THRES_TRIG
#define IPRI_OC_T_BLANK_CLEAR
#define IPRI_OC_THRES_TRIG
#define IPRI_OC_T_BLANK_TRIG
#define ISEC_OC_THRES_CLEAR
#define ISEC_SC_THRES_TRIG
#define ISEC_OC_T_BLANK_CLEAR
#define ISEC_LOAD_STEP_CLAMP
#define ISEC_OC_THRES_TRIG
#define ISEC_OC_T_BLANK_TRIG
#define VRAIL_5V_UV_T_BLANK_CLEAR
#define VRAIL_5V_UV_T_BLANK_TRIG
#define VRAIL_5V_UV_THRES_TRIG
#define VRAIL_5V_UV_THRES_CLEAR
#define FAULT_PERSISTENCE_COUNT_TEMP
#define OTP_THRES_TRIG_CELCIUS
Degrees Celcius.
#define OTP_THRES_CLEAR_CELCIUS
Degrees Celcius.
TEMP_SETTINGS_t devTempData
Data Object of temperature settings.
int8_t Dev_Temp_Get_Temperature_Celcius(void)
This converts the raw values to temperature celcius as per device lookup table.
#define FAULT_ACTIVE
Checks if there is any fault PCI occurred.
POWER_CONTROL_t dab
Global data object for a DAB Converter.
AVERAGING_t iSecAveraging
Data Object of secondary current averaging.
AVERAGING_t vPrimAveraging
Data Object of primary voltage averaging.
AVERAGING_t vSecAveraging
Data Object of secondary voltage averaging.
void PwrCtrl_PWM_Disable(void)
Disable the PWM output.
@ PWRCTRL_STATE_ONLINE
power converter control state #4: output is in regulation and power is OK (normal continuous operatio...
@ PWR_CTRL_CHARGING
power converter is in charging mode
@ PWR_CTRL_DISCHARGING
power converter is in discharging mode
void Fault_Execute_100ms(void)
Fault evaluation for Temperature and other slow fault detection executed every 100ms.
void Fault_Reset(void)
Clears the fault object flag bits.
static void Fault_EnableShortCircuitProtection(void)
Enable Short circuit hardware protection.
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...
bool CMP3_StatusGet(void)
Returns the comparator output status.
#define CMP_IPRI_SC_DACDataWrite
This macro defines the Custom Name for CMP3_DACDataWrite API.
bool CMP1_StatusGet(void)
Returns the comparator output status.
#define CMP_IPRI_SC_DACEnable
This macro defines the Custom Name for CMP3_DACEnable API.
#define CMP_ISEC_SC_DACDataWrite
This macro defines the Custom Name for CMP1_DACDataWrite API.
#define CMP_ISEC_SC_DACEnable
This macro defines the Custom Name for CMP1_DACEnable API.
#define FAULT_SetLow()
Sets the RD9 GPIO Pin which has a custom name of FAULT to Low.
#define FAULT_SetHigh()
Sets the RD9 GPIO Pin which has a custom name of FAULT to High.
uint8_t OverTemperatureFlag
Over temperature flag.
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 VPriVoltage
Data value for input voltage.
uint16_t ISensePrimary
Data value for primary current as measured with CT.
uint16_t VSecVoltage
Data value for output voltage.
uint16_t ISenseSecondary
Data value for secondary current as measured with CT.
uint16_t VRail_5V
Data value for 5V auxiliary rail.
unsigned Running
Bit 0: Power converter is running.
unsigned FaultActive
Bit 1: Power converter fault is active.
int16_t Reference
actual reference
uint16_t PwrReference
User power reference setting used to control the converter controller.
int16_t IReference
User current reference setting used to control the converter controller.
PWR_CTRL_PROPERTIES_t Properties
Power Control properties
CONTROLLER_t VLoop
structure for voltage controller data
PWR_CTRL_STATE_t State
Power Control SM State ID.
FEEDBACK_SETTINGS_t Data
Feedback channel settings.
PWR_CTRL_CHARGE_STATE_t PowerDirection
defines if the power converter is in charging or discharging mode
STATUS_FLAGS_t Status
Power Supply status flags, running or fault.
FAULT_SETTINGS_t Fault
Fault flags and settings.