10 #include "drivers/v_loop.h"
11 #include "devices/dev_buck_typedef.h"
12 #include "devices/dev_buck_converter.h"
13 #include "config/hal.h"
15 #include "fault_handler/app_fault_monitor.h"
41 #define ISNS_AVG_BITMASK (uint16_t)0x0007
42 volatile uint16_t _isns_sample_count = 0;
43 volatile uint16_t isns_samples;
68 volatile uint16_t retval=1;
83 #if (PLANT_MEASUREMENT == false)
123 volatile uint16_t retval=1;
154 volatile uint16_t retval=1;
182 volatile uint16_t retval=1;
202 volatile uint16_t retval=1;
223 volatile uint16_t retval=0;
265 volatile uint16_t retval=0;
277 if(!(++_isns_sample_count & ISNS_AVG_BITMASK))
279 isns_samples = (isns_samples >> 3);
281 if((int16_t)isns_samples < 0) isns_samples = 0;
#define BUCK_VIN_OFFSET
Input voltage feedback offset.
#define BUCK_VIN_ADCBUF
ADC input buffer of this ADC channel.
#define BUCK_ISNS_ADCBUF
ADC input buffer of this ADC channel.
#define TEMP_ADCBUF
GPIO analog function mode enable bit.
#define _BUCK_VLOOP_ISR_IE
Interupt vector enable bit register bit.
#define BUCK_VOUT_ISR_PRIORITY
Voltage loop interrupt vector priority (valid settings between 0...6 with 6 being the highest priorit...
#define _BUCK_VLOOP_ISR_IF
Interupt vector flag bit register bit.
#define _BUCK_VLOOP_ISR_IP
Interupt vector priority register.
volatile struct FAULT_OBJECT_s fltobj_BuckOCP
Over Current Protection Fault Object.
volatile struct FAULT_OBJECT_s fltobj_BuckRegErr
Regulation Error Fault Object.
volatile uint16_t appPowerSupply_Execute(void)
This is the top-level function call triggering the most recent state machine of all associated power ...
volatile uint16_t appPowerSupply_Resume(void)
This function resumes the power supply operation.
volatile uint16_t appPowerSupply_Initialize(void)
Calls the application layer power controller initialization.
volatile uint16_t appPowerSupply_Start(void)
This function calls the buck converter device driver function starting the power supply.
volatile uint16_t appPowerSupply_Stop(void)
This function calls the buck converter device driver function stopping the power supply.
volatile uint16_t appPowerSupply_Suspend(void)
This function stops the power supply operation.
volatile struct BUCK_CONVERTER_s buck
Global data object for a BUCK CONVERTER.
volatile uint16_t appPowerSupply_DataCapture(void)
Captures runtime data not captured automatically by other firmware modules.
volatile uint16_t appPowerSupply_PeripheralsInitialize(void)
This function is used to load peripheral configuration templates from the power controller device dri...
volatile uint16_t appPowerSupply_ControllerInitialize(void)
This function initializes the control system feedback loop objects.
volatile uint16_t appPowerSupply_ConverterObjectInitialize(void)
This function initializes the buck converter device driver instance.
volatile uint16_t drv_BuckConverter_Suspend(volatile struct BUCK_CONVERTER_s *buckInstance)
This function suspends the operation of the buck converter.
volatile uint16_t drv_BuckConverter_Stop(volatile struct BUCK_CONVERTER_s *buckInstance)
This function stop the buck converter opration.
volatile uint16_t drv_BuckConverter_Start(volatile struct BUCK_CONVERTER_s *buckInstance)
This function starts the buck converter.
volatile uint16_t drv_BuckConverter_Resume(volatile struct BUCK_CONVERTER_s *buckInstance)
This function resume the operation of the buck converter.
volatile uint16_t drv_BuckConverter_Execute(volatile struct BUCK_CONVERTER_s *buckInstance)
This function is the main buck converter state machine executing the most recent state.
struct FLT_OBJECT_STATUS_s::@111::@113 bits
volatile uint16_t * ptrObject
Pointer to register or variable which should be monitored.
volatile struct FLT_OBJECT_STATUS_s Status
Status word of this fault object.
volatile struct FLT_COMPARE_OBJECT_s ReferenceObject
Reference object the source should be compared with.
struct BUCK_STATE_ID_s::@129::@131 bits
volatile uint16_t i_out
BUCK common output current.
volatile uint16_t temp
BUCK board temperature.
volatile uint16_t control_output
BUCK most recent control output value.
volatile uint16_t i_sns[BUCK_NO_OF_PHASES]
BUCK output current.
volatile uint16_t v_in
BUCK input voltage.
volatile uint16_t feedback_offset
Feedback offset value for calibration or bi-direction feedback signals.
volatile struct NPNZ16b_s * controller
pointer to control loop object data structure
BUCK control & monitoring data structure.
volatile struct BUCK_LOOP_SETTINGS_s i_loop[BUCK_NO_OF_PHASES]
BUCK Current control loop objects.
volatile struct BUCK_STATE_ID_s state_id
BUCK state machine operating state ID.
volatile struct BUCK_LOOP_SETTINGS_s v_loop
BUCK voltage control loop object.
volatile struct BUCK_CONVERTER_DATA_s data
BUCK runtime data.
struct NPNZ_STATUS_s::@132::@134 bits
Controller status bit-field for direct bit access.
volatile uint16_t * ptrControlReference
Pointer to global variable of input register holding the controller reference value (e....
volatile struct NPNZ_STATUS_s status
Control Loop Status and Control flags.
volatile struct NPNZ_PORTS_s Ports
Controller input and output ports.