Digital Power Starter Kit 3 Firmware
dsPIC33C Buck Converter Voltage Mode Control Example

Public functions of the second library layer. More...

+ Collaboration diagram for Functions:

Functions

volatile uint16_t drv_BuckConverter_SpecialFunctionExecute (volatile struct BUCK_CONVERTER_s *buckInstance, volatile enum BUCK_SPECIAL_FUNCTIONS_e specialFunction)
 This is the public function call access point to call dedicated special sub-functions. More...
 
volatile uint16_t CurrentSenseOffsetCalibration (volatile struct BUCK_CONVERTER_s *buckInstance)
 Performs an offset calibration of the current sense feedback signal(s) More...
 

Detailed Description

Public functions of the second library layer.

This is the detailed description of public functions of the special function module of the buck converter device driver library.

Function Documentation

◆ CurrentSenseOffsetCalibration()

volatile uint16_t CurrentSenseOffsetCalibration ( volatile struct BUCK_CONVERTER_s buckInstance)

Performs an offset calibration of the current sense feedback signal(s)

Parameters
buckInstancePointer to a Buck Converter data object of type struct BUCK_CONVERTER_s
Returns
unsigned integer (0=failure, 1=success)

This function performs a current sense feedback channel zero-offset calibration. The calibration is executed when the reference voltage is applied to the current sense shunt amplifiers but the power supply is still turned off. The offset value is determined by a 4x oversampling of each of the feedback signals to eliminate high-frequency noise. Once the calibration is complete, the 'cs_calib_complete' status bit in the buck converter power controller object status word is set, allowing the state machine to run.

Definition at line 178 of file dev_buck_special_functions.c.

◆ drv_BuckConverter_SpecialFunctionExecute()

volatile uint16_t drv_BuckConverter_SpecialFunctionExecute ( volatile struct BUCK_CONVERTER_s buckInstance,
volatile enum BUCK_SPECIAL_FUNCTIONS_e  specialFunction 
)

This is the public function call access point to call dedicated special sub-functions.

Parameters
buckInstancePointer to a Buck Converter data object of type struct BUCK_CONVERTER_s
specialFunctionSpecial function selection list of type enum BUCK_SPECIAL_FUNCTIONS_e
Returns
0 = BUCK_OPSRET_ERROR
1 = BUCK_OPSRET_COMPLETE
2 = BUCK_OPSRET_REPEAT

This function call is the public API function call to execute one of the special functions supported by this power converter device driver extension.

Example:

The following example initiates the automatic feedback sense offset calibration. Special Functions behave like all other state machine states and sub-states by returning the results ERROR, COMPLETE or REPEAT.

  • BUCK_OPSRET_ERROR An unexpected error occurred during execution of the Special Function routine, which prevents the state machine from continuing. If a ERROR is returned, it is recommended to reset the state machine and start all over.
  • BUCK_OPSRET_COMPLETE If the COMPLETE flag is returned, the Special Function has successfully completed and the state machine may move on.
  • BUCK_OPSRET_REPEAT If the REPEAT flag is returned, the function has to be called again until it returns the COMPLETE flag.
retval = drv_BuckConverter_SpecialFunctionExecute(&buckConverter, CS_OFSET_CALIBRATION);

Definition at line 133 of file dev_buck_special_functions.c.

+ Here is the caller graph for this function:
drv_BuckConverter_SpecialFunctionExecute
volatile uint16_t drv_BuckConverter_SpecialFunctionExecute(volatile struct BUCK_CONVERTER_s *buckInstance, volatile enum BUCK_SPECIAL_FUNCTIONS_e specialFunction)
This is the public function call access point to call dedicated special sub-functions.
Definition: dev_buck_special_functions.c:133