MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides APIs for MCUXpresso SDK devices' dcdc operation.
The DCDC Converter(DCDC) is used for generating the power supply for the chip's core logic. It can provide two outputs for SoC peripherals and external devices with high conversion efficiency. As a module to provide the power for hardware system, the DCDC starts working when the system is powered up before the software takes over the SoC. Some important configuration is done by the board settings. Before the software can access the DCDC's register, the DCDC is already working normally with the default settings. However, if the application needs to improve the DCDC's performance or change the default settings, this DCDC driver would be helpful. The DCDC's register cannot be accessed by software before its initialization (open the clock gate).
The DCDC module supports two control modes: Static control mode and Set point control mode. When the module controlled by GPC set points, that is set point control mode, the DCDC_SetPointInit() function can be used to enable DCDC module, set outputs' target voltage in the specific set point. When the control mode is set as static control mode, to change the target voltage value of DCDC's outputs, the APIs in "Outputs' Target Voltage Related Interfaces" function group can be used. To set DCDC module's power mode, the APIs in "Power Mode Related Interfaces" function group can be used.
Data Structures | |
struct | dcdc_config_t |
Configuration for DCDC. More... | |
struct | dcdc_min_power_config_t |
Configuration for min power setting. More... | |
struct | dcdc_detection_config_t |
Configuration for DCDC detection. More... | |
struct | dcdc_loop_control_config_t |
Configuration for the loop control. More... | |
struct | dcdc_internal_regulator_config_t |
Configuration for DCDC internal regulator. More... | |
struct | dcdc_low_power_config_t |
Configuration for DCDC low power. More... | |
struct | dcdc_setpoint_config_t |
DCDC configuration in set point mode. More... | |
Macros | |
#define | FSL_DCDC_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
DCDC driver version. More... | |
#define | STANDBY_MODE_VDD1P0_TARGET_VOLTAGE |
The array of VDD1P0 target voltage in standby mode. More... | |
#define | STANDBY_MODE_VDD1P8_TARGET_VOLTAGE |
The array of VDD1P8 target voltage in standby mode. More... | |
#define | BUCK_MODE_VDD1P0_TARGET_VOLTAGE |
The array of VDD1P0 target voltage in buck mode. More... | |
#define | BUCK_MODE_VDD1P8_TARGET_VOLTAGE |
The array of VDD1P8 target voltage in buck mode. More... | |
Initialization and De-initialization Interfaces | |
void | DCDC_Init (DCDC_Type *base, const dcdc_config_t *config) |
Initializes the basic resource of DCDC module, such as control mode, etc. More... | |
void | DCDC_Deinit (DCDC_Type *base) |
De-initializes the DCDC module. More... | |
void | DCDC_GetDefaultConfig (dcdc_config_t *config) |
Gets the default setting for DCDC, such as control mode, etc. More... | |
Power Mode Related Interfaces | |
static void | DCDC_EnterLowPowerModeViaStandbyRequest (DCDC_Type *base, bool enable) |
Makes the DCDC enter into low power mode for GPC standby request or not. More... | |
static void | DCDC_EnterLowPowerMode (DCDC_Type *base, bool enable) |
Makes DCDC enter into low power mode or not, before entering low power mode must disable stepping for VDD1P8 and VDD1P0. More... | |
static void | DCDC_EnterStandbyMode (DCDC_Type *base, bool enable) |
Makes DCDC enter into standby mode or not. More... | |
Outputs' Target Voltage Related Interfaces | |
static void | DCDC_SetVDD1P0StandbyModeTargetVoltage (DCDC_Type *base, dcdc_standby_mode_1P0_target_vol_t targetVoltage) |
Sets the target value(ranges from 0.625V to 1.4V) of VDD1P0 in standby mode, 25mV each step. More... | |
static uint16_t | DCDC_GetVDD1P0StandbyModeTargetVoltage (DCDC_Type *base) |
Gets the target value of VDD1P0 in standby mode, the result takes "mV" as the unit. More... | |
static void | DCDC_SetVDD1P8StandbyModeTargetVoltage (DCDC_Type *base, dcdc_standby_mode_1P8_target_vol_t targetVoltage) |
Sets the target value(ranges from 1.525V to 2.3V) of VDD1P8 in standby mode, 25mV each step. More... | |
static uint16_t | DCDC_GetVDD1P8StandbyModeTargetVoltage (DCDC_Type *base) |
Gets the target value of VDD1P8 in standby mode, the result takes "mV" as the unit. More... | |
static void | DCDC_SetVDD1P0BuckModeTargetVoltage (DCDC_Type *base, dcdc_buck_mode_1P0_target_vol_t targetVoltage) |
Sets the target value(ranges from 0.6V to 1.375V) of VDD1P0 in buck mode, 25mV each step. More... | |
static uint16_t | DCDC_GetVDD1P0BuckModeTargetVoltage (DCDC_Type *base) |
Gets the target value of VDD1P0 in buck mode, the result takes "mV" as the unit. More... | |
static void | DCDC_SetVDD1P8BuckModeTargetVoltage (DCDC_Type *base, dcdc_buck_mode_1P8_target_vol_t targetVoltage) |
Sets the target value(ranges from 1.5V to 2.275V) of VDD1P8 in buck mode, 25mV each step. More... | |
static uint16_t | DCDC_GetVDD1P8BuckModeTargetVoltage (DCDC_Type *base) |
Gets the target value of VDD1P8 in buck mode, the result takes "mV" as the unit. More... | |
static void | DCDC_EnableVDD1P0TargetVoltageStepping (DCDC_Type *base, bool enable) |
Enables/Disables stepping for VDD1P0, before entering low power modes the stepping for VDD1P0 must be disabled. More... | |
static void | DCDC_EnableVDD1P8TargetVoltageStepping (DCDC_Type *base, bool enable) |
Enables/Disables stepping for VDD1P8, before entering low power modes the stepping for VDD1P8 must be disabled. More... | |
Detection Related Inferfaces | |
void | DCDC_GetDefaultDetectionConfig (dcdc_detection_config_t *config) |
Gets the default setting for detection configuration. More... | |
void | DCDC_SetDetectionConfig (DCDC_Type *base, const dcdc_detection_config_t *config) |
Configures the DCDC detection. More... | |
DCDC Miscellaneous Inferfaces | |
static void | DCDC_EnableOutputRangeComparator (DCDC_Type *base, bool enable) |
Enables/Disables the output range comparator. More... | |
void | DCDC_SetClockSource (DCDC_Type *base, dcdc_clock_source_t clockSource) |
Configures the DCDC clock source. More... | |
void | DCDC_GetDefaultLowPowerConfig (dcdc_low_power_config_t *config) |
Gets the default setting for low power configuration. More... | |
void | DCDC_SetLowPowerConfig (DCDC_Type *base, const dcdc_low_power_config_t *config) |
Configures the DCDC low power. More... | |
static void | DCDC_SetBandgapVoltageTrimValue (DCDC_Type *base, uint32_t trimValue) |
Sets the bangap trim value(0~31) to trim bandgap voltage. More... | |
void | DCDC_GetDefaultLoopControlConfig (dcdc_loop_control_config_t *config) |
Gets the default setting for loop control configuration. More... | |
void | DCDC_SetLoopControlConfig (DCDC_Type *base, const dcdc_loop_control_config_t *config) |
Configures the DCDC loop control. More... | |
void | DCDC_SetMinPowerConfig (DCDC_Type *base, const dcdc_min_power_config_t *config) |
Configures for the min power. More... | |
static void | DCDC_SetLPComparatorBiasValue (DCDC_Type *base, dcdc_comparator_current_bias_t biasValue) |
Sets the current bias of low power comparator. More... | |
void | DCDC_SetInternalRegulatorConfig (DCDC_Type *base, const dcdc_internal_regulator_config_t *config) |
Configures the DCDC internal regulator. More... | |
static void | DCDC_EnableAdjustDelay (DCDC_Type *base, bool enable) |
Adjusts delay to reduce ground noise. More... | |
static void | DCDC_EnableImproveTransition (DCDC_Type *base, bool enable) |
Enables/Disables to improve the transition from heavy load to light load. More... | |
Setpoint Control Related Interfaces | |
void | DCDC_SetPointInit (DCDC_Type *base, const dcdc_setpoint_config_t *config) |
Initializes DCDC module when the control mode selected as setpoint mode. More... | |
static void | DCDC_SetPointDeinit (DCDC_Type *base, uint32_t setpointMap) |
Disable DCDC module when the control mode selected as setpoint mode. More... | |
DCDC Status Related Interfaces | |
static uint32_t | DCDC_GetStatusFlags (DCDC_Type *base) |
Get DCDC status flags. More... | |
Application Guideline Interfaces | |
void | DCDC_BootIntoDCM (DCDC_Type *base) |
Boots DCDC into DCM(discontinous conduction mode). More... | |
void | DCDC_BootIntoCCM (DCDC_Type *base) |
Boots DCDC into CCM(continous conduction mode). More... | |
struct dcdc_config_t |
Data Fields | |
dcdc_control_mode_t | controlMode |
DCDC control mode. More... | |
dcdc_trim_input_mode_t | trimInputMode |
Hold trim input. More... | |
bool | enableDcdcTimeout |
Enable internal count for DCDC_OK timeout. More... | |
bool | enableSwitchingConverterOutput |
Enable the VDDIO switching converter output. More... | |
dcdc_control_mode_t dcdc_config_t::controlMode |
dcdc_trim_input_mode_t dcdc_config_t::trimInputMode |
bool dcdc_config_t::enableDcdcTimeout |
bool dcdc_config_t::enableSwitchingConverterOutput |
struct dcdc_min_power_config_t |
Data Fields | |
bool | enableUseHalfFreqForContinuous |
Set DCDC clock to half frequency for the continuous mode. More... | |
bool dcdc_min_power_config_t::enableUseHalfFreqForContinuous |
struct dcdc_detection_config_t |
Data Fields | |
bool | enableXtalokDetection |
Enable xtalok detection circuit. More... | |
bool | powerDownOverVoltageVdd1P8Detection |
Power down over-voltage detection comparator for VDD1P8. More... | |
bool | powerDownOverVoltageVdd1P0Detection |
Power down over-voltage detection comparator for VDD1P0. More... | |
bool | powerDownLowVoltageDetection |
Power down low-voltage detection comparator. More... | |
bool | powerDownOverCurrentDetection |
Power down over-current detection. More... | |
bool | powerDownPeakCurrentDetection |
Power down peak-current detection. More... | |
bool | powerDownZeroCrossDetection |
Power down the zero cross detection function for discontinuous conductor mode. More... | |
dcdc_peak_current_threshold_t | PeakCurrentThreshold |
The threshold of peak current detection. More... | |
bool dcdc_detection_config_t::enableXtalokDetection |
bool dcdc_detection_config_t::powerDownOverVoltageVdd1P8Detection |
bool dcdc_detection_config_t::powerDownOverVoltageVdd1P0Detection |
bool dcdc_detection_config_t::powerDownLowVoltageDetection |
bool dcdc_detection_config_t::powerDownOverCurrentDetection |
bool dcdc_detection_config_t::powerDownPeakCurrentDetection |
bool dcdc_detection_config_t::powerDownZeroCrossDetection |
dcdc_peak_current_threshold_t dcdc_detection_config_t::PeakCurrentThreshold |
struct dcdc_loop_control_config_t |
Data Fields | |
bool | enableCommonHysteresis |
Enable hysteresis in switching converter common mode analog comparators. More... | |
bool | enableCommonThresholdDetection |
Increase the threshold detection for common mode analog comparator. More... | |
bool | enableDifferentialHysteresis |
Enable hysteresis in switching converter differential mode analog comparators. More... | |
bool | enableDifferentialThresholdDetection |
Increase the threshold detection for differential mode analog comparators. More... | |
bool | enableInvertHysteresisSign |
Invert the sign of the hysteresis in DC-DC analog comparators. More... | |
bool | enableRCThresholdDetection |
Increase the threshold detection for RC scale circuit. More... | |
uint32_t | enableRCScaleCircuit |
Available range is 0~7. More... | |
uint32_t | complementFeedForwardStep |
Available range is 0~7. More... | |
uint32_t | controlParameterMagnitude |
Available range is 0~15. More... | |
uint32_t | integralProportionalRatio |
Available range is 0~3.Ratio of integral control parameter to proportional control parameter in the switching DC-DC converter, and can be used to optimize efficiency and loop response. More... | |
bool dcdc_loop_control_config_t::enableCommonHysteresis |
This feature will improve transient supply ripple and efficiency.
bool dcdc_loop_control_config_t::enableCommonThresholdDetection |
bool dcdc_loop_control_config_t::enableDifferentialHysteresis |
This feature will improve transient supply ripple and efficiency.
bool dcdc_loop_control_config_t::enableDifferentialThresholdDetection |
bool dcdc_loop_control_config_t::enableInvertHysteresisSign |
bool dcdc_loop_control_config_t::enableRCThresholdDetection |
uint32_t dcdc_loop_control_config_t::enableRCScaleCircuit |
Enable analog circuit of DC-DC converter to respond faster under transient load conditions.
uint32_t dcdc_loop_control_config_t::complementFeedForwardStep |
Two's complement feed forward step in duty cycle in the switching DC-DC converter. Each time this field makes a transition from 0x0, the loop filter of the DC-DC converter is stepped once by a value proportional to the change. This can be used to force a certain control loop behavior, such as improving response under known heavy load transients.
uint32_t dcdc_loop_control_config_t::controlParameterMagnitude |
Magnitude of proportional control parameter in the switching DC-DC converter control loop.
uint32_t dcdc_loop_control_config_t::integralProportionalRatio |
struct dcdc_internal_regulator_config_t |
Data Fields | |
uint32_t | feedbackPoint |
Available range is 0~3. More... | |
uint32_t dcdc_internal_regulator_config_t::feedbackPoint |
Select the feedback point of the internal regulator.
struct dcdc_low_power_config_t |
Data Fields | |
bool | enableAdjustHystereticValue |
Adjust hysteretic value in low power from 12.5mV to 25mV. More... | |
bool dcdc_low_power_config_t::enableAdjustHystereticValue |
struct dcdc_setpoint_config_t |
Data Fields | |
uint32_t | enableDCDCMap |
The setpoint map that enable the DCDC module. More... | |
uint32_t | enableDigLogicMap |
The setpoint map that enable the DCDC dig logic. More... | |
uint32_t | lowpowerMap |
The setpoint map that enable the DCDC Low powermode. More... | |
uint32_t | standbyMap |
The setpoint map that enable the DCDC standby mode. More... | |
uint32_t | standbyLowpowerMap |
The setpoint map that enable the DCDC low power mode, when the related setpoint is in standby mode. More... | |
dcdc_buck_mode_1P8_target_vol_t * | buckVDD1P8TargetVoltage |
Point to the array that store the target voltage level of VDD1P8 in buck mode, please refer to dcdc_buck_mode_1P8_target_vol_t. More... | |
dcdc_buck_mode_1P0_target_vol_t * | buckVDD1P0TargetVoltage |
Point to the array that store the target voltage level of VDD1P0 in buck mode, please refer to dcdc_buck_mode_1P0_target_vol_t. More... | |
dcdc_standby_mode_1P8_target_vol_t * | standbyVDD1P8TargetVoltage |
Point to the array that store the target voltage level of VDD1P8 in standby mode, please refer to dcdc_standby_mode_1P8_target_vol_t. More... | |
dcdc_standby_mode_1P0_target_vol_t * | standbyVDD1P0TargetVoltage |
Point to the array that store the target voltage level of VDD1P0 in standby mode, please refer to dcdc_standby_mode_1P0_target_vol_t. More... | |
uint32_t dcdc_setpoint_config_t::enableDCDCMap |
Should be the OR'ed value of _dcdc_setpoint_map.
uint32_t dcdc_setpoint_config_t::enableDigLogicMap |
Should be the OR'ed value of _dcdc_setpoint_map.
uint32_t dcdc_setpoint_config_t::lowpowerMap |
Should be the OR'ed value of _dcdc_setpoint_map.
uint32_t dcdc_setpoint_config_t::standbyMap |
Should be the OR'ed value of _dcdc_setpoint_map.
uint32_t dcdc_setpoint_config_t::standbyLowpowerMap |
Please refer to _dcdc_setpoint_map.
dcdc_buck_mode_1P8_target_vol_t* dcdc_setpoint_config_t::buckVDD1P8TargetVoltage |
Note that the pointed array must have 16 elements.
dcdc_buck_mode_1P0_target_vol_t* dcdc_setpoint_config_t::buckVDD1P0TargetVoltage |
Note that the pointed array must have 16 elements.
dcdc_standby_mode_1P8_target_vol_t* dcdc_setpoint_config_t::standbyVDD1P8TargetVoltage |
Note that the pointed array must have 16 elements.
dcdc_standby_mode_1P0_target_vol_t* dcdc_setpoint_config_t::standbyVDD1P0TargetVoltage |
Note that the pointed array must have 16 elements.
#define FSL_DCDC_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
Version 2.1.0.
#define STANDBY_MODE_VDD1P0_TARGET_VOLTAGE |
#define STANDBY_MODE_VDD1P8_TARGET_VOLTAGE |
#define BUCK_MODE_VDD1P0_TARGET_VOLTAGE |
#define BUCK_MODE_VDD1P8_TARGET_VOLTAGE |
enum _dcdc_status_flags |
enum _dcdc_setpoint_map |
enum dcdc_control_mode_t |
enum dcdc_clock_source_t |
void DCDC_Init | ( | DCDC_Type * | base, |
const dcdc_config_t * | config | ||
) |
base | DCDC peripheral base address. |
config | Pointer to the dcdc_config_t structure. |
void DCDC_Deinit | ( | DCDC_Type * | base | ) |
base | DCDC peripheral base address. |
void DCDC_GetDefaultConfig | ( | dcdc_config_t * | config | ) |
This function initializes the user configuration structure to a default value. The default values are:
config | Pointer to configuration structure. See to dcdc_config_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
enable | Used to control the behavior.
|
|
inlinestatic |
base | DCDC peripheral base address. |
enable | Used to control the behavior.
|
|
inlinestatic |
base | DCDC peripheral base address. |
enable | Used to control the behavior.
|
|
inlinestatic |
base | DCDC peripheral base address. |
targetVoltage | The target value of VDD1P0 in standby mode, see dcdc_standby_mode_1P0_target_vol_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
|
inlinestatic |
base | DCDC peripheral base address. |
targetVoltage | The target value of VDD1P8 in standby mode, see dcdc_standby_mode_1P8_target_vol_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
|
inlinestatic |
base | DCDC peripheral base address. |
targetVoltage | The target value of VDD1P0 in buck mode, see dcdc_buck_mode_1P0_target_vol_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
|
inlinestatic |
base | DCDC peripheral base address. |
targetVoltage | The target value of VDD1P8 in buck mode, see dcdc_buck_mode_1P8_target_vol_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
|
inlinestatic |
base | DCDC peripheral base address. |
enable | Used to control the behavior.
|
|
inlinestatic |
base | DCDC peripheral base address. |
enable | Used to control the behavior.
|
void DCDC_GetDefaultDetectionConfig | ( | dcdc_detection_config_t * | config | ) |
The default configuration are set according to responding registers' setting when powered on. They are:
config | Pointer to configuration structure. See to dcdc_detection_config_t. |
void DCDC_SetDetectionConfig | ( | DCDC_Type * | base, |
const dcdc_detection_config_t * | config | ||
) |
base | DCDC peripheral base address. |
config | Pointer to configuration structure. See to dcdc_detection_config_t. |
|
inlinestatic |
The output range comparator is disabled by default.
base | DCDC peripheral base address. |
enable | Enable the feature or not.
|
void DCDC_SetClockSource | ( | DCDC_Type * | base, |
dcdc_clock_source_t | clockSource | ||
) |
base | DCDC peripheral base address. |
clockSource | Clock source for DCDC. See to dcdc_clock_source_t. |
void DCDC_GetDefaultLowPowerConfig | ( | dcdc_low_power_config_t * | config | ) |
The default configuration are set according to responding registers' setting when powered on. They are:
config | Pointer to configuration structure. See to dcdc_low_power_config_t. |
void DCDC_SetLowPowerConfig | ( | DCDC_Type * | base, |
const dcdc_low_power_config_t * | config | ||
) |
base | DCDC peripheral base address. |
config | Pointer to configuration structure. See to dcdc_low_power_config_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
trimValue | The bangap trim value. Available range is 0U-31U. |
void DCDC_GetDefaultLoopControlConfig | ( | dcdc_loop_control_config_t * | config | ) |
The default configuration are set according to responding registers' setting when powered on. They are:
config | Pointer to configuration structure. See to dcdc_loop_control_config_t. |
void DCDC_SetLoopControlConfig | ( | DCDC_Type * | base, |
const dcdc_loop_control_config_t * | config | ||
) |
base | DCDC peripheral base address. |
config | Pointer to configuration structure. See to dcdc_loop_control_config_t. |
void DCDC_SetMinPowerConfig | ( | DCDC_Type * | base, |
const dcdc_min_power_config_t * | config | ||
) |
base | DCDC peripheral base address. |
config | Pointer to configuration structure. See to dcdc_min_power_config_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
biasValue | The current bias of low power comparator. Refer to dcdc_comparator_current_bias_t. |
void DCDC_SetInternalRegulatorConfig | ( | DCDC_Type * | base, |
const dcdc_internal_regulator_config_t * | config | ||
) |
base | DCDC peripheral base address. |
config | Pointer to configuration structure. See to dcdc_internal_regulator_config_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
enable | Enable the feature or not. |
|
inlinestatic |
base | DCDC peripheral base address. |
enable | Enable the feature or not. |
void DCDC_SetPointInit | ( | DCDC_Type * | base, |
const dcdc_setpoint_config_t * | config | ||
) |
base | DCDC peripheral base address. |
config | The pointer to the structure dcdc_setpoint_config_t. |
|
inlinestatic |
base | DCDC peripheral base address. |
setpointMap. | The map of the setpoint to disable the DCDC module. Should be the OR'ed value of _dcdc_setpoint_map. |
|
inlinestatic |
base | peripheral base address. |
void DCDC_BootIntoDCM | ( | DCDC_Type * | base | ) |
base | DCDC peripheral base address. |
void DCDC_BootIntoCCM | ( | DCDC_Type * | base | ) |
base | DCDC peripheral base address. |