MCUXpresso SDK API Reference Manual  Rev 2.15.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DCDC: DCDC Converter

Overview

The MCUXpresso SDK provides a peripheral driver for the DCDC Converter (DCDC) module of MCUXpresso SDK devices.

The DCDC converter module is a synchronous buck mode DCDC converter. It can produce single outputs for SoC peripherals and external devices with high conversion efficiency. The converter can be operated in continuous or pulsed mode.

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 registers, 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, the DCDC driver would help. The DCDC's register cannot be accessed by software before its initialization (open the clock gate). The user can configure the hardware according to the application guide from reference manual.

Function groups

Initialization and deinitialization

This function group is to enable/disable the operations to DCDC module through the driver.

Status

Provides functions to get the DCDC status.

Misc control

Provides functions to set the DCDC's miscellaneous control.

Set point mode control

Provides functions to initialize/de-initialize DCDC module in set point mode.

Application guideline

Continous conduction mode

Discontinous conduction mode

/*!

Data Structures

struct  _dcdc_detection_config
 Configuration for DCDC detection. More...
 
struct  _dcdc_loop_control_config
 Configuration for the loop control. More...
 
struct  _dcdc_low_power_config
 Configuration for DCDC low power. More...
 
struct  _dcdc_internal_regulator_config
 Configuration for DCDC internal regulator. More...
 
struct  _dcdc_min_power_config
 Configuration for min power setting. More...
 

Macros

#define FSL_DCDC_DRIVER_VERSION   (MAKE_VERSION(2, 3, 0))
 DCDC driver version. More...
 

Typedefs

typedef enum
_dcdc_comparator_current_bias 
dcdc_comparator_current_bias_t
 The current bias of low power comparator.
 
typedef enum
_dcdc_over_current_threshold 
dcdc_over_current_threshold_t
 The threshold of over current detection.
 
typedef enum
_dcdc_peak_current_threshold 
dcdc_peak_current_threshold_t
 The threshold if peak current detection.
 
typedef enum
_dcdc_count_charging_time_period 
dcdc_count_charging_time_period_t
 The period of counting the charging times in power save mode.
 
typedef enum
_dcdc_count_charging_time_threshold 
dcdc_count_charging_time_threshold_t
 The threshold of the counting number of charging times.
 
typedef enum _dcdc_clock_source dcdc_clock_source_t
 Oscillator clock option.
 
typedef struct
_dcdc_detection_config 
dcdc_detection_config_t
 Configuration for DCDC detection.
 
typedef struct
_dcdc_loop_control_config 
dcdc_loop_control_config_t
 Configuration for the loop control.
 
typedef struct
_dcdc_low_power_config 
dcdc_low_power_config_t
 Configuration for DCDC low power.
 
typedef struct
_dcdc_internal_regulator_config 
dcdc_internal_regulator_config_t
 Configuration for DCDC internal regulator.
 
typedef struct
_dcdc_min_power_config 
dcdc_min_power_config_t
 Configuration for min power setting.
 

Enumerations

enum  _dcdc_status_flags_t { kDCDC_LockedOKStatus = (1U << 0U) }
 DCDC status flags. More...
 
enum  _dcdc_comparator_current_bias {
  kDCDC_ComparatorCurrentBias50nA = 0U,
  kDCDC_ComparatorCurrentBias100nA = 1U,
  kDCDC_ComparatorCurrentBias200nA = 2U,
  kDCDC_ComparatorCurrentBias400nA = 3U
}
 The current bias of low power comparator. More...
 
enum  _dcdc_over_current_threshold {
  kDCDC_OverCurrentThresholdAlt0 = 0U,
  kDCDC_OverCurrentThresholdAlt1 = 1U,
  kDCDC_OverCurrentThresholdAlt2 = 2U,
  kDCDC_OverCurrentThresholdAlt3 = 3U
}
 The threshold of over current detection. More...
 
enum  _dcdc_peak_current_threshold {
  kDCDC_PeakCurrentThresholdAlt0 = 0U,
  kDCDC_PeakCurrentThresholdAlt1 = 1U,
  kDCDC_PeakCurrentThresholdAlt2 = 2U,
  kDCDC_PeakCurrentThresholdAlt3 = 3U,
  kDCDC_PeakCurrentThresholdAlt4 = 4U,
  kDCDC_PeakCurrentThresholdAlt5 = 5U
}
 The threshold if peak current detection. More...
 
enum  _dcdc_count_charging_time_period {
  kDCDC_CountChargingTimePeriod8Cycle = 0U,
  kDCDC_CountChargingTimePeriod16Cycle = 1U
}
 The period of counting the charging times in power save mode. More...
 
enum  _dcdc_count_charging_time_threshold {
  kDCDC_CountChargingTimeThreshold32 = 0U,
  kDCDC_CountChargingTimeThreshold64 = 1U,
  kDCDC_CountChargingTimeThreshold16 = 2U,
  kDCDC_CountChargingTimeThreshold8 = 3U
}
 The threshold of the counting number of charging times. More...
 
enum  _dcdc_clock_source {
  kDCDC_ClockAutoSwitch = 0U,
  kDCDC_ClockInternalOsc = 1U,
  kDCDC_ClockExternalOsc = 2U
}
 Oscillator clock option. More...
 

Initialization and deinitialization

void DCDC_Init (DCDC_Type *base)
 Enable the access to DCDC registers. More...
 
void DCDC_Deinit (DCDC_Type *base)
 Disable the access to DCDC registers. More...
 

Status

uint32_t DCDC_GetstatusFlags (DCDC_Type *base)
 Get DCDC status flags. More...
 

Misc control

static void DCDC_EnableOutputRangeComparator (DCDC_Type *base, bool enable)
 Enable the output range comparator. More...
 
void DCDC_SetClockSource (DCDC_Type *base, dcdc_clock_source_t clockSource)
 Configure the DCDC clock source. More...
 
void DCDC_GetDefaultDetectionConfig (dcdc_detection_config_t *config)
 Get the default setting for detection configuration. More...
 
void DCDC_SetDetectionConfig (DCDC_Type *base, const dcdc_detection_config_t *config)
 Configure the DCDC detection. More...
 
void DCDC_GetDefaultLowPowerConfig (dcdc_low_power_config_t *config)
 Get the default setting for low power configuration. More...
 
void DCDC_SetLowPowerConfig (DCDC_Type *base, const dcdc_low_power_config_t *config)
 Configure the DCDC low power. More...
 
void DCDC_ResetCurrentAlertSignal (DCDC_Type *base, bool enable)
 Reset current alert signal. More...
 
static void DCDC_SetBandgapVoltageTrimValue (DCDC_Type *base, uint32_t trimValue)
 Set the bangap trim value to trim bandgap voltage. More...
 
void DCDC_GetDefaultLoopControlConfig (dcdc_loop_control_config_t *config)
 Get the default setting for loop control configuration. More...
 
void DCDC_SetLoopControlConfig (DCDC_Type *base, const dcdc_loop_control_config_t *config)
 Configure the DCDC loop control. More...
 
void DCDC_SetMinPowerConfig (DCDC_Type *base, const dcdc_min_power_config_t *config)
 Configure for the min power. More...
 
static void DCDC_SetLPComparatorBiasValue (DCDC_Type *base, dcdc_comparator_current_bias_t biasVaule)
 Set the current bias of low power comparator. More...
 
static void DCDC_LockTargetVoltage (DCDC_Type *base)
 Lock target voltage. More...
 
void DCDC_AdjustTargetVoltage (DCDC_Type *base, uint32_t VDDRun, uint32_t VDDStandby)
 Adjust the target voltage of VDD_SOC in run mode and low power mode. More...
 
void DCDC_AdjustRunTargetVoltage (DCDC_Type *base, uint32_t VDDRun)
 Adjust the target voltage of VDD_SOC in run mode. More...
 
void DCDC_AdjustLowPowerTargetVoltage (DCDC_Type *base, uint32_t VDDStandby)
 Adjust the target voltage of VDD_SOC in low power mode. More...
 
void DCDC_SetInternalRegulatorConfig (DCDC_Type *base, const dcdc_internal_regulator_config_t *config)
 Configure the DCDC internal regulator. More...
 
static void DCDC_EnableImproveTransition (DCDC_Type *base, bool enable)
 Enable/Disable to improve the transition from heavy load to light load. More...
 

Application guideline

void DCDC_BootIntoDCM (DCDC_Type *base)
 Boot DCDC into DCM(discontinous conduction mode). More...
 
void DCDC_BootIntoCCM (DCDC_Type *base)
 Boot DCDC into CCM(continous conduction mode). More...
 

Data Structure Documentation

struct _dcdc_detection_config

Data Fields

bool enableXtalokDetection
 Enable xtalok detection circuit. More...
 
bool powerDownOverVoltageDetection
 Power down over-voltage detection comparator. More...
 
bool powerDownLowVlotageDetection
 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_over_current_threshold_t OverCurrentThreshold
 The threshold of over current detection. More...
 
dcdc_peak_current_threshold_t PeakCurrentThreshold
 The threshold of peak current detection. More...
 

Field Documentation

bool _dcdc_detection_config::enableXtalokDetection
bool _dcdc_detection_config::powerDownOverVoltageDetection
bool _dcdc_detection_config::powerDownLowVlotageDetection
bool _dcdc_detection_config::powerDownOverCurrentDetection
bool _dcdc_detection_config::powerDownPeakCurrentDetection
bool _dcdc_detection_config::powerDownZeroCrossDetection
dcdc_over_current_threshold_t _dcdc_detection_config::OverCurrentThreshold
dcdc_peak_current_threshold_t _dcdc_detection_config::PeakCurrentThreshold
struct _dcdc_loop_control_config

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 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...
 

Field Documentation

bool _dcdc_loop_control_config::enableCommonHysteresis

This feature will improve transient supply ripple and efficiency.

bool _dcdc_loop_control_config::enableCommonThresholdDetection
bool _dcdc_loop_control_config::enableInvertHysteresisSign
bool _dcdc_loop_control_config::enableRCThresholdDetection
uint32_t _dcdc_loop_control_config::enableRCScaleCircuit

Enable analog circuit of DC-DC converter to respond faster under transient load conditions.

uint32_t _dcdc_loop_control_config::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.

struct _dcdc_low_power_config

Data Fields

bool enableOverloadDetection
 Enable the overload detection in power save mode, if current is larger than the overloading threshold (typical value is 50 mA), DCDC will switch to the run mode automatically. More...
 
bool enableAdjustHystereticValue
 Adjust hysteretic value in low power from 12.5mV to 25mV. More...
 
dcdc_count_charging_time_period_t countChargingTimePeriod
 The period of counting the charging times in power save mode. More...
 
dcdc_count_charging_time_threshold_t countChargingTimeThreshold
 the threshold of the counting number of charging times during the period that lp_overload_freq_sel sets in power save mode. More...
 

Field Documentation

bool _dcdc_low_power_config::enableOverloadDetection
bool _dcdc_low_power_config::enableAdjustHystereticValue
dcdc_count_charging_time_period_t _dcdc_low_power_config::countChargingTimePeriod
dcdc_count_charging_time_threshold_t _dcdc_low_power_config::countChargingTimeThreshold
struct _dcdc_internal_regulator_config

Data Fields

bool enableLoadResistor
 control the load resistor of the internal regulator of DCDC, the load resistor is connected as default "true", and need set to "false" to disconnect the load resistor. More...
 
uint32_t feedbackPoint
 Available range is 0~3. More...
 

Field Documentation

bool _dcdc_internal_regulator_config::enableLoadResistor
uint32_t _dcdc_internal_regulator_config::feedbackPoint

Select the feedback point of the internal regulator.

struct _dcdc_min_power_config

Data Fields

bool enableUseHalfFreqForContinuous
 Set DCDC clock to half frequency for the continuous mode. More...
 

Field Documentation

bool _dcdc_min_power_config::enableUseHalfFreqForContinuous

Macro Definition Documentation

#define FSL_DCDC_DRIVER_VERSION   (MAKE_VERSION(2, 3, 0))

Version 2.3.0.

Enumeration Type Documentation

Enumerator
kDCDC_LockedOKStatus 

Indicate DCDC status.

1'b1: DCDC already settled 1'b0: DCDC is settling.

Enumerator
kDCDC_ComparatorCurrentBias50nA 

The current bias of low power comparator is 50nA.

kDCDC_ComparatorCurrentBias100nA 

The current bias of low power comparator is 100nA.

kDCDC_ComparatorCurrentBias200nA 

The current bias of low power comparator is 200nA.

kDCDC_ComparatorCurrentBias400nA 

The current bias of low power comparator is 400nA.

Enumerator
kDCDC_OverCurrentThresholdAlt0 

1A in the run mode, 0.25A in the power save mode.

kDCDC_OverCurrentThresholdAlt1 

2A in the run mode, 0.25A in the power save mode.

kDCDC_OverCurrentThresholdAlt2 

1A in the run mode, 0.2A in the power save mode.

kDCDC_OverCurrentThresholdAlt3 

2A in the run mode, 0.2A in the power save mode.

Enumerator
kDCDC_PeakCurrentThresholdAlt0 

150mA peak current threshold.

kDCDC_PeakCurrentThresholdAlt1 

250mA peak current threshold.

kDCDC_PeakCurrentThresholdAlt2 

350mA peak current threshold.

kDCDC_PeakCurrentThresholdAlt3 

450mA peak current threshold.

kDCDC_PeakCurrentThresholdAlt4 

550mA peak current threshold.

kDCDC_PeakCurrentThresholdAlt5 

650mA peak current threshold.

Enumerator
kDCDC_CountChargingTimePeriod8Cycle 

Eight 32k cycle.

kDCDC_CountChargingTimePeriod16Cycle 

Sixteen 32k cycle.

Enumerator
kDCDC_CountChargingTimeThreshold32 

0x0: 32.

kDCDC_CountChargingTimeThreshold64 

0x1: 64.

kDCDC_CountChargingTimeThreshold16 

0x2: 16.

kDCDC_CountChargingTimeThreshold8 

0x3: 8.

Enumerator
kDCDC_ClockAutoSwitch 

Automatic clock switch from internal oscillator to external clock.

kDCDC_ClockInternalOsc 

Use internal oscillator.

kDCDC_ClockExternalOsc 

Use external 24M crystal oscillator.

Function Documentation

void DCDC_Init ( DCDC_Type *  base)
Parameters
baseDCDC peripheral base address.
void DCDC_Deinit ( DCDC_Type *  base)
Parameters
baseDCDC peripheral base address.
uint32_t DCDC_GetstatusFlags ( DCDC_Type *  base)
Parameters
baseperipheral base address.
Returns
Mask of asserted status flags. See to "_dcdc_status_flags_t".
static void DCDC_EnableOutputRangeComparator ( DCDC_Type *  base,
bool  enable 
)
inlinestatic

The output range comparator is disabled by default.

Parameters
baseDCDC peripheral base address.
enableEnable the feature or not.
void DCDC_SetClockSource ( DCDC_Type *  base,
dcdc_clock_source_t  clockSource 
)
Parameters
baseDCDC peripheral base address.
clockSourceClock source for DCDC. See to "dcdc_clock_source_t".
void DCDC_GetDefaultDetectionConfig ( dcdc_detection_config_t config)

The default configuration are set according to responding registers' setting when powered on. They are:

* config->enableXtalokDetection = false;
* config->powerDownOverVoltageDetection = true;
* config->powerDownLowVlotageDetection = false;
* config->powerDownOverCurrentDetection = true;
* config->powerDownPeakCurrentDetection = true;
* config->powerDownZeroCrossDetection = true;
* config->OverCurrentThreshold = kDCDC_OverCurrentThresholdAlt0;
* config->PeakCurrentThreshold = kDCDC_PeakCurrentThresholdAlt0;
*
Parameters
configPointer to configuration structure. See to "dcdc_detection_config_t"
void DCDC_SetDetectionConfig ( DCDC_Type *  base,
const dcdc_detection_config_t config 
)
Parameters
baseDCDC peripheral base address.
configPointer to configuration structure. See to "dcdc_detection_config_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->enableOverloadDetection = true;
* config->enableAdjustHystereticValue = false;
* config->countChargingTimePeriod = kDCDC_CountChargingTimePeriod8Cycle;
* config->countChargingTimeThreshold = kDCDC_CountChargingTimeThreshold32;
*
Parameters
configPointer to configuration structure. See to "dcdc_low_power_config_t"
void DCDC_SetLowPowerConfig ( DCDC_Type *  base,
const dcdc_low_power_config_t config 
)
Parameters
baseDCDC peripheral base address.
configPointer to configuration structure. See to "dcdc_low_power_config_t".
void DCDC_ResetCurrentAlertSignal ( DCDC_Type *  base,
bool  enable 
)

Alert signal is generate by peak current detection.

Parameters
baseDCDC peripheral base address.
enableSwitcher to reset signal. True means reset signal. False means don't reset signal.
static void DCDC_SetBandgapVoltageTrimValue ( DCDC_Type *  base,
uint32_t  trimValue 
)
inlinestatic
Parameters
baseDCDC peripheral base address.
trimValueThe 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->enableCommonHysteresis = false;
* config->enableCommonThresholdDetection = false;
* config->enableInvertHysteresisSign = false;
* config->enableRCThresholdDetection = false;
* config->enableRCScaleCircuit = 0U;
* config->complementFeedForwardStep = 0U;
*
Parameters
configPointer to configuration structure. See to "dcdc_loop_control_config_t"
void DCDC_SetLoopControlConfig ( DCDC_Type *  base,
const dcdc_loop_control_config_t config 
)
Parameters
baseDCDC peripheral base address.
configPointer to configuration structure. See to "dcdc_loop_control_config_t".
void DCDC_SetMinPowerConfig ( DCDC_Type *  base,
const dcdc_min_power_config_t config 
)
Parameters
baseDCDC peripheral base address.
configPointer to configuration structure. See to "dcdc_min_power_config_t".
static void DCDC_SetLPComparatorBiasValue ( DCDC_Type *  base,
dcdc_comparator_current_bias_t  biasVaule 
)
inlinestatic
Parameters
baseDCDC peripheral base address.
biasVauleThe current bias of low power comparator. Refer to "dcdc_comparator_current_bias_t".
static void DCDC_LockTargetVoltage ( DCDC_Type *  base)
inlinestatic
Parameters
baseDCDC peripheral base address.
void DCDC_AdjustTargetVoltage ( DCDC_Type *  base,
uint32_t  VDDRun,
uint32_t  VDDStandby 
)
Deprecated:
Do not use this function. It has been superceded by DCDC_AdjustRunTargetVoltage and DCDC_AdjustLowPowerTargetVoltage

This function is to adjust the target voltage of DCDC output. Change them and finally wait until the output is stabled. Set the target value of run mode the same as low power mode before entering power save mode, because DCDC will switch back to run mode if it detects the current loading is larger than about 50 mA(typical value).

Parameters
baseDCDC peripheral base address.
VDDRunTarget value in run mode. 25 mV each step from 0x00 to 0x1F. 00 is for 0.8V, 0x1F is for 1.575V.
VDDStandbyTarget value in low power mode. 25 mV each step from 0x00 to 0x4. 00 is for 0.9V, 0x4 is for 1.0V.
void DCDC_AdjustRunTargetVoltage ( DCDC_Type *  base,
uint32_t  VDDRun 
)

This function is to adjust the target voltage of DCDC output. Change them and finally wait until the output is stabled. Set the target value of run mode the same as low power mode before entering power save mode, because DCDC will switch back to run mode if it detects the current loading is larger than about 50 mA(typical value).

Parameters
baseDCDC peripheral base address.
VDDRunTarget value in run mode. 25 mV each step from 0x00 to 0x1F. 00 is for 0.8V, 0x1F is for 1.575V.
void DCDC_AdjustLowPowerTargetVoltage ( DCDC_Type *  base,
uint32_t  VDDStandby 
)

This function is to adjust the target voltage of DCDC output. Change them and finally wait until the output is stabled. Set the target value of run mode the same as low power mode before entering power save mode, because DCDC will switch back to run mode if it detects the current loading is larger than about 50 mA(typical value).

Parameters
baseDCDC peripheral base address.
VDDStandbyTarget value in low power mode. 25 mV each step from 0x00 to 0x4. 00 is for 0.9V, 0x4 is for 1.0V.
void DCDC_SetInternalRegulatorConfig ( DCDC_Type *  base,
const dcdc_internal_regulator_config_t config 
)
Parameters
baseDCDC peripheral base address.
configPointer to configuration structure. See to "dcdc_internal_regulator_config_t".
static void DCDC_EnableImproveTransition ( DCDC_Type *  base,
bool  enable 
)
inlinestatic

It is valid while zero cross detection is enabled. If ouput exceeds the threshold, DCDC would return CCM from DCM.

Parameters
baseDCDC peripheral base address.
enableEnable the feature or not.
void DCDC_BootIntoDCM ( DCDC_Type *  base)

pwd_zcd=0x0; pwd_cmp_offset=0x0; dcdc_loopctrl_en_rcscale= 0x5; DCM_set_ctrl=1'b1;

Parameters
baseDCDC peripheral base address.
void DCDC_BootIntoCCM ( DCDC_Type *  base)

pwd_zcd=0x1; pwd_cmp_offset=0x0; dcdc_loopctrl_en_rcscale=0x3;

Parameters
baseDCDC peripheral base address.