npmx  1.0.0
 
Loading...
Searching...
No Matches

Buck converter (DC/DC step-down converter) peripheral driver. More...

Data Structures

struct  npmx_buck_t
 Data structure of the buck converter (BUCK) driver instance. More...
 
struct  npmx_buck_gpio_config_t
 Configuration structure for GPIO used as input signal for buck. More...
 
struct  npmx_buck_status_t
 Buck status structure. More...
 

Enumerations

enum  npmx_buck_task_t {
  NPMX_BUCK_TASK_ENABLE ,
  NPMX_BUCK_TASK_DISABLE ,
  NPMX_BUCK_TASK_ENABLE_PWM ,
  NPMX_BUCK_TASK_DISABLE_PWM ,
  NPMX_BUCK_TASK_COUNT
}
 Buck tasks. More...
 
enum  npmx_buck_mode_t {
  NPMX_BUCK_MODE_AUTO = BUCK_BUCKSTATUS_BUCK1MODE_AUTOMODE ,
  NPMX_BUCK_MODE_PFM = BUCK_BUCKSTATUS_BUCK1MODE_PFMMODE ,
  NPMX_BUCK_MODE_PWM = BUCK_BUCKSTATUS_BUCK1MODE_PWMMODE ,
  NPMX_BUCK_MODE_COUNT ,
  NPMX_BUCK_MODE_INVALID = NPMX_INVALID_ENUM_VALUE
}
 Possible converter modes of each buck. More...
 
enum  npmx_buck_vout_select_t {
  NPMX_BUCK_VOUT_SELECT_VSET_PIN = BUCK_BUCKSWCTRLSEL_BUCK1SWCTRLSEL_VSETANDSWCTRL ,
  NPMX_BUCK_VOUT_SELECT_SOFTWARE = BUCK_BUCKSWCTRLSEL_BUCK1SWCTRLSEL_SWCTRL ,
  NPMX_BUCK_VOUT_SELECT_COUNT ,
  NPMX_BUCK_VOUT_SELECT_INVALID = NPMX_INVALID_ENUM_VALUE
}
 The source of VOUT voltage reference. Output voltage can be controlled by external VSETx feedback pin or by software register value. More...
 
enum  npmx_buck_voltage_t {
  NPMX_BUCK_VOLTAGE_1V0 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V ,
  NPMX_BUCK_VOLTAGE_1V1 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V1 ,
  NPMX_BUCK_VOLTAGE_1V2 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V2 ,
  NPMX_BUCK_VOLTAGE_1V3 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V3 ,
  NPMX_BUCK_VOLTAGE_1V4 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V4 ,
  NPMX_BUCK_VOLTAGE_1V5 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V5 ,
  NPMX_BUCK_VOLTAGE_1V6 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V6 ,
  NPMX_BUCK_VOLTAGE_1V7 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V7 ,
  NPMX_BUCK_VOLTAGE_1V8 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V8 ,
  NPMX_BUCK_VOLTAGE_1V9 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_1V9 ,
  NPMX_BUCK_VOLTAGE_2V0 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V0 ,
  NPMX_BUCK_VOLTAGE_2V1 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V1 ,
  NPMX_BUCK_VOLTAGE_2V2 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V2 ,
  NPMX_BUCK_VOLTAGE_2V3 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V3 ,
  NPMX_BUCK_VOLTAGE_2V4 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V4 ,
  NPMX_BUCK_VOLTAGE_2V5 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V5 ,
  NPMX_BUCK_VOLTAGE_2V6 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V6 ,
  NPMX_BUCK_VOLTAGE_2V7 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V7 ,
  NPMX_BUCK_VOLTAGE_2V8 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V8 ,
  NPMX_BUCK_VOLTAGE_2V9 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_2V9 ,
  NPMX_BUCK_VOLTAGE_3V0 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_3V0 ,
  NPMX_BUCK_VOLTAGE_3V1 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_3V1 ,
  NPMX_BUCK_VOLTAGE_3V2 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_3V2 ,
  NPMX_BUCK_VOLTAGE_3V3 = BUCK_BUCK1NORMVOUT_BUCK1NORMVOUT_3V3 ,
  NPMX_BUCK_VOLTAGE_COUNT ,
  NPMX_BUCK_VOLTAGE_MAX = NPMX_BUCK_VOLTAGE_3V3 ,
  NPMX_BUCK_VOLTAGE_INVALID = NPMX_INVALID_ENUM_VALUE
}
 Possible buck output voltages to be set. More...
 
enum  npmx_buck_gpio_t {
  NPMX_BUCK_GPIO_NC = BUCK_BUCKENCTRL_BUCK1ENGPISEL_NOTUSED ,
  NPMX_BUCK_GPIO_0 = BUCK_BUCKENCTRL_BUCK1ENGPISEL_GPIO0 ,
  NPMX_BUCK_GPIO_1 = BUCK_BUCKENCTRL_BUCK1ENGPISEL_GPIO1 ,
  NPMX_BUCK_GPIO_2 = BUCK_BUCKENCTRL_BUCK1ENGPISEL_GPIO2 ,
  NPMX_BUCK_GPIO_3 = BUCK_BUCKENCTRL_BUCK1ENGPISEL_GPIO3 ,
  NPMX_BUCK_GPIO_4 = BUCK_BUCKENCTRL_BUCK1ENGPISEL_GPIO4 ,
  NPMX_BUCK_GPIO_NC1 = BUCK_BUCKENCTRL_BUCK1ENGPISEL_NOTUSED1 ,
  NPMX_BUCK_GPIO_COUNT ,
  NPMX_BUCK_GPIO_INVALID = NPMX_INVALID_ENUM_VALUE
}
 Possible GPIO to be selected with buck configurations. More...
 

Functions

npmx_buck_tnpmx_buck_get (npmx_instance_t *p_pmic, uint8_t idx)
 Function for returning buck instance based on index.
 
npmx_buck_voltage_t npmx_buck_voltage_convert (uint32_t millivolts)
 Function for converting millivolts to npmx_buck_voltage_t enumeration.
 
bool npmx_buck_voltage_convert_to_mv (npmx_buck_voltage_t enum_value, uint32_t *p_val)
 Function for converting npmx_buck_voltage_t enumeration to millivolts.
 
npmx_error_t npmx_buck_task_trigger (npmx_buck_t const *p_instance, npmx_buck_task_t task)
 Function for activating the specified buck task.
 
npmx_error_t npmx_buck_converter_mode_set (npmx_buck_t const *p_instance, npmx_buck_mode_t mode)
 Function for setting the buck converter mode to either PWM, hysteretic (PFM) or AUTO (PWM & PFM).
 
npmx_error_t npmx_buck_pfm_enable_get (npmx_buck_t const *p_instance, bool *p_enable)
 Function for checking whether the hysteretic (PFM) mode of the buck converter is enabled.
 
npmx_error_t npmx_buck_normal_voltage_set (npmx_buck_t const *p_instance, npmx_buck_voltage_t voltage)
 Function for setting the normal voltage of the specified buck instance.
 
npmx_error_t npmx_buck_normal_voltage_get (npmx_buck_t const *p_instance, npmx_buck_voltage_t *p_voltage)
 Function for reading the normal voltage of the specified buck instance.
 
npmx_error_t npmx_buck_retention_voltage_set (npmx_buck_t const *p_instance, npmx_buck_voltage_t voltage)
 Function for setting the buck retention voltage for the specified buck instance.
 
npmx_error_t npmx_buck_retention_voltage_get (npmx_buck_t const *p_instance, npmx_buck_voltage_t *p_voltage)
 Function for reading the buck retention voltage for the specified buck instance.
 
npmx_error_t npmx_buck_enable_gpio_config_set (npmx_buck_t const *p_instance, npmx_buck_gpio_config_t const *p_config)
 Function for configuring the GPIO pin which will be used for enabling and disabling the specified buck instance converter.
 
npmx_error_t npmx_buck_enable_gpio_config_get (npmx_buck_t const *p_instance, npmx_buck_gpio_config_t *p_config)
 Function for reading configuration of the GPIO pin used for enabling and disabling the specified buck instance converter.
 
npmx_error_t npmx_buck_retention_gpio_config_set (npmx_buck_t const *p_instance, npmx_buck_gpio_config_t const *p_config)
 Function for configuring the GPIO pin which will be used for controlling the specified buck's retention mode.
 
npmx_error_t npmx_buck_retention_gpio_config_get (npmx_buck_t const *p_instance, npmx_buck_gpio_config_t *p_config)
 Function for reading configuration of the GPIO pin used for controlling the specified buck's retention mode.
 
npmx_error_t npmx_buck_forced_pwm_gpio_config_set (npmx_buck_t const *p_instance, npmx_buck_gpio_config_t const *p_config)
 Function for configuring the GPIO pin to use forced PWM mode in the specified buck instance converter.
 
npmx_error_t npmx_buck_forced_pwm_gpio_config_get (npmx_buck_t const *p_instance, npmx_buck_gpio_config_t *p_config)
 Function for reading the GPIO pin configuration used to force PWM mode.
 
npmx_error_t npmx_buck_vout_select_set (npmx_buck_t const *p_instance, npmx_buck_vout_select_t selection)
 Function for selecting the output voltage reference of the specified buck instance converter.
 
npmx_error_t npmx_buck_vout_select_get (npmx_buck_t const *p_instance, npmx_buck_vout_select_t *p_selection)
 Function for reading selected output voltage reference of the specified buck instance converter.
 
npmx_error_t npmx_buck_status_voltage_get (npmx_buck_t const *p_instance, npmx_buck_voltage_t *p_voltage)
 Function for reading the voltage status register of the specified buck instance.
 
npmx_error_t npmx_buck_active_discharge_enable_set (npmx_buck_t const *p_instance, bool enable)
 Function for setting active output capacitor discharge state of the specified buck converter. When selected, discharge is ON when converter is disabled.
 
npmx_error_t npmx_buck_active_discharge_enable_get (npmx_buck_t const *p_instance, bool *p_enable)
 Function for reading active output capacitor discharge state of the specified buck converter. When selected, discharge is ON when converter is disabled.
 
npmx_error_t npmx_buck_status_get (npmx_buck_t const *p_instance, npmx_buck_status_t *p_status)
 Function for getting status of the specified buck converter.
 

Detailed Description

Buck converter (DC/DC step-down converter) peripheral driver.

Enumeration Type Documentation

◆ npmx_buck_gpio_t

Possible GPIO to be selected with buck configurations.

Enumerator
NPMX_BUCK_GPIO_NC 

Not used.

NPMX_BUCK_GPIO_0 

GPI_0 selected.

NPMX_BUCK_GPIO_1 

GPI_1 selected.

NPMX_BUCK_GPIO_2 

GPI_2 selected.

NPMX_BUCK_GPIO_3 

GPI_3 selected.

NPMX_BUCK_GPIO_4 

GPI_4 selected.

NPMX_BUCK_GPIO_NC1 

No GPI selected.

NPMX_BUCK_GPIO_COUNT 

GPIO configs count.

NPMX_BUCK_GPIO_INVALID 

Invalid BUCK GPIO.

◆ npmx_buck_mode_t

Possible converter modes of each buck.

Enumerator
NPMX_BUCK_MODE_AUTO 

AUTO converter mode, PWM or hysteretic (PFM).

NPMX_BUCK_MODE_PFM 

Force hysteretic (PFM) converter mode.

NPMX_BUCK_MODE_PWM 

Force PWM converter mode.

NPMX_BUCK_MODE_COUNT 

Buck modes count.

NPMX_BUCK_MODE_INVALID 

Invalid buck mode.

◆ npmx_buck_task_t

Buck tasks.

Enumerator
NPMX_BUCK_TASK_ENABLE 

Enable buck.

NPMX_BUCK_TASK_DISABLE 

Disable buck.

NPMX_BUCK_TASK_ENABLE_PWM 

Enable PWM mode for buck.

NPMX_BUCK_TASK_DISABLE_PWM 

Disable PWM mode for buck.

NPMX_BUCK_TASK_COUNT 

Buck tasks count.

◆ npmx_buck_voltage_t

Possible buck output voltages to be set.

Enumerator
NPMX_BUCK_VOLTAGE_1V0 

1.0 V

NPMX_BUCK_VOLTAGE_1V1 

1.1 V

NPMX_BUCK_VOLTAGE_1V2 

1.2 V

NPMX_BUCK_VOLTAGE_1V3 

1.3 V

NPMX_BUCK_VOLTAGE_1V4 

1.4 V

NPMX_BUCK_VOLTAGE_1V5 

1.5 V

NPMX_BUCK_VOLTAGE_1V6 

1.6 V

NPMX_BUCK_VOLTAGE_1V7 

1.7 V

NPMX_BUCK_VOLTAGE_1V8 

1.8 V

NPMX_BUCK_VOLTAGE_1V9 

1.9 V

NPMX_BUCK_VOLTAGE_2V0 

2.0 V

NPMX_BUCK_VOLTAGE_2V1 

2.1 V

NPMX_BUCK_VOLTAGE_2V2 

2.2 V

NPMX_BUCK_VOLTAGE_2V3 

2.3 V

NPMX_BUCK_VOLTAGE_2V4 

2.4 V

NPMX_BUCK_VOLTAGE_2V5 

2.5 V

NPMX_BUCK_VOLTAGE_2V6 

2.6 V

NPMX_BUCK_VOLTAGE_2V7 

2.7 V

NPMX_BUCK_VOLTAGE_2V8 

2.8 V

NPMX_BUCK_VOLTAGE_2V9 

2.9 V

NPMX_BUCK_VOLTAGE_3V0 

3.0 V

NPMX_BUCK_VOLTAGE_3V1 

3.1 V

NPMX_BUCK_VOLTAGE_3V2 

3.2 V

NPMX_BUCK_VOLTAGE_3V3 

3.3 V

NPMX_BUCK_VOLTAGE_COUNT 

Possible voltages count.

NPMX_BUCK_VOLTAGE_MAX 

Maximum voltage.

NPMX_BUCK_VOLTAGE_INVALID 

Invalid voltage.

◆ npmx_buck_vout_select_t

The source of VOUT voltage reference. Output voltage can be controlled by external VSETx feedback pin or by software register value.

Enumerator
NPMX_BUCK_VOUT_SELECT_VSET_PIN 

Allow VSET pins to set VOUT.

NPMX_BUCK_VOUT_SELECT_SOFTWARE 

Allow software to override VSET pin.

NPMX_BUCK_VOUT_SELECT_COUNT 

VOUT source configs count.

NPMX_BUCK_VOUT_SELECT_INVALID 

Invalid VOUT source config.

Function Documentation

◆ npmx_buck_active_discharge_enable_get()

npmx_error_t npmx_buck_active_discharge_enable_get ( npmx_buck_t const * p_instance,
bool * p_enable )

Function for reading active output capacitor discharge state of the specified buck converter. When selected, discharge is ON when converter is disabled.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_enablePointer to the enable active discharge variable.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_active_discharge_enable_set()

npmx_error_t npmx_buck_active_discharge_enable_set ( npmx_buck_t const * p_instance,
bool enable )

Function for setting active output capacitor discharge state of the specified buck converter. When selected, discharge is ON when converter is disabled.

Note
Discharge of the capacitor is forced automatically by nPM device in case of a power cycle reset.
Parameters
[in]p_instancePointer to the buck instance.
[in]enableTrue to enable active discharge, false to disable active discharge.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_converter_mode_set()

npmx_error_t npmx_buck_converter_mode_set ( npmx_buck_t const * p_instance,
npmx_buck_mode_t mode )

Function for setting the buck converter mode to either PWM, hysteretic (PFM) or AUTO (PWM & PFM).

Parameters
[in]p_instancePointer to the buck instance.
[in]modePWM, hysteretic (PFM) or AUTO mode.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_enable_gpio_config_get()

npmx_error_t npmx_buck_enable_gpio_config_get ( npmx_buck_t const * p_instance,
npmx_buck_gpio_config_t * p_config )

Function for reading configuration of the GPIO pin used for enabling and disabling the specified buck instance converter.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_configPointer to the configuration of GPIO.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_enable_gpio_config_set()

npmx_error_t npmx_buck_enable_gpio_config_set ( npmx_buck_t const * p_instance,
npmx_buck_gpio_config_t const * p_config )

Function for configuring the GPIO pin which will be used for enabling and disabling the specified buck instance converter.

Note
Selected GPIO should be configured as input using GPIO driver.
Parameters
[in]p_instancePointer to the buck instance.
[in]p_configPointer to the configuration of GPIO to be applied.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_forced_pwm_gpio_config_get()

npmx_error_t npmx_buck_forced_pwm_gpio_config_get ( npmx_buck_t const * p_instance,
npmx_buck_gpio_config_t * p_config )

Function for reading the GPIO pin configuration used to force PWM mode.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_configPointer to the configuration structure.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_forced_pwm_gpio_config_set()

npmx_error_t npmx_buck_forced_pwm_gpio_config_set ( npmx_buck_t const * p_instance,
npmx_buck_gpio_config_t const * p_config )

Function for configuring the GPIO pin to use forced PWM mode in the specified buck instance converter.

Note
Selected GPIO should be configured as input using GPIO driver. When GPIO has been configured for this purpose, it overrides the register setting for either one or both converters.
Parameters
[in]p_instancePointer to the buck instance.
[in]p_configPointer to the configuration of GPIO to be applied.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_get()

npmx_buck_t * npmx_buck_get ( npmx_instance_t * p_pmic,
uint8_t idx )

Function for returning buck instance based on index.

Parameters
[in]p_pmicPointer to the PMIC instance.
[in]idxIndex of the buck instance.
Returns
Pointer to the buck instance.

◆ npmx_buck_normal_voltage_get()

npmx_error_t npmx_buck_normal_voltage_get ( npmx_buck_t const * p_instance,
npmx_buck_voltage_t * p_voltage )

Function for reading the normal voltage of the specified buck instance.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_voltagePointer to buck voltage variable.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_normal_voltage_set()

npmx_error_t npmx_buck_normal_voltage_set ( npmx_buck_t const * p_instance,
npmx_buck_voltage_t voltage )

Function for setting the normal voltage of the specified buck instance.

Note
To apply the voltage in nPM device, call npmx_buck_vout_select_set() function with NPMX_BUCK_VOUT_SELECT_SOFTWARE value.
Parameters
[in]p_instancePointer to the buck instance.
[in]voltageVoltage to be set at buck's output.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_pfm_enable_get()

npmx_error_t npmx_buck_pfm_enable_get ( npmx_buck_t const * p_instance,
bool * p_enable )

Function for checking whether the hysteretic (PFM) mode of the buck converter is enabled.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_enablePointer to variable to be filled with hysteretic (PFM) mode. True if mode is enabled, false otherwise.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_retention_gpio_config_get()

npmx_error_t npmx_buck_retention_gpio_config_get ( npmx_buck_t const * p_instance,
npmx_buck_gpio_config_t * p_config )

Function for reading configuration of the GPIO pin used for controlling the specified buck's retention mode.

Note
Selected GPIO should be configured as input using GPIO driver.
Parameters
[in]p_instancePointer to the buck instance.
[out]p_configPointer to the configuration of GPIO.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_retention_gpio_config_set()

npmx_error_t npmx_buck_retention_gpio_config_set ( npmx_buck_t const * p_instance,
npmx_buck_gpio_config_t const * p_config )

Function for configuring the GPIO pin which will be used for controlling the specified buck's retention mode.

Note
Selected GPIO should be configured as input using GPIO driver.
Parameters
[in]p_instancePointer to the buck instance.
[in]p_configPointer to the configuration of GPIO to be applied.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_retention_voltage_get()

npmx_error_t npmx_buck_retention_voltage_get ( npmx_buck_t const * p_instance,
npmx_buck_voltage_t * p_voltage )

Function for reading the buck retention voltage for the specified buck instance.

Note
Entering retention mode is done by toggling the selected GPIO npmx_buck_retention_gpio_config_set(). Returning to normal mode is done by toggling GPIO again.
Parameters
[in]p_instancePointer to the buck instance.
[out]p_voltagePointer to buck voltage variable.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_retention_voltage_set()

npmx_error_t npmx_buck_retention_voltage_set ( npmx_buck_t const * p_instance,
npmx_buck_voltage_t voltage )

Function for setting the buck retention voltage for the specified buck instance.

Note
Entering retention mode is done by toggling the selected GPIO npmx_buck_retention_gpio_config_set(). Returning to normal mode is done by toggling GPIO again.
Parameters
[in]p_instancePointer to the buck instance.
[in]voltageVoltage to be set at buck's output.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_status_get()

npmx_error_t npmx_buck_status_get ( npmx_buck_t const * p_instance,
npmx_buck_status_t * p_status )

Function for getting status of the specified buck converter.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_statusPointer to the buck status structure.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_status_voltage_get()

npmx_error_t npmx_buck_status_voltage_get ( npmx_buck_t const * p_instance,
npmx_buck_voltage_t * p_voltage )

Function for reading the voltage status register of the specified buck instance.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_voltagePointer to the voltage variable of the buck.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_task_trigger()

npmx_error_t npmx_buck_task_trigger ( npmx_buck_t const * p_instance,
npmx_buck_task_t task )

Function for activating the specified buck task.

Parameters
[in]p_instancePointer to the buck instance.
[in]taskTask to be activated.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_voltage_convert()

npmx_buck_voltage_t npmx_buck_voltage_convert ( uint32_t millivolts)

Function for converting millivolts to npmx_buck_voltage_t enumeration.

Parameters
[in]millivoltsVoltage in millivolts to be converted into npmx_buck_voltage_t enumeration.
Returns
Result of conversion. NPMX_BUCK_VOLTAGE_INVALID if given voltage is not represented in enumeration.

◆ npmx_buck_voltage_convert_to_mv()

bool npmx_buck_voltage_convert_to_mv ( npmx_buck_voltage_t enum_value,
uint32_t * p_val )

Function for converting npmx_buck_voltage_t enumeration to millivolts.

Parameters
[in]enum_valueVoltage defined as npmx_buck_voltage_t enumeration to be converted into millivolts.
[out]p_valPointer to the variable that stores the conversion result.
Return values
trueConversion is valid.
falseConversion is invalid - an invalid argument was passed to the function.

◆ npmx_buck_vout_select_get()

npmx_error_t npmx_buck_vout_select_get ( npmx_buck_t const * p_instance,
npmx_buck_vout_select_t * p_selection )

Function for reading selected output voltage reference of the specified buck instance converter.

Parameters
[in]p_instancePointer to the buck instance.
[out]p_selectionPointer to selection of the output voltage reference.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_buck_vout_select_set()

npmx_error_t npmx_buck_vout_select_set ( npmx_buck_t const * p_instance,
npmx_buck_vout_select_t selection )

Function for selecting the output voltage reference of the specified buck instance converter.

Parameters
[in]p_instancePointer to the buck instance.
[in]selectionSelection of the output voltage reference.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.