buckboost4 2.1.0.0
Buck-Boost 4 Click Driver

API for configuring and manipulating Buck-Boost 4 Click driver. More...

Topics

 Buck-Boost 4 Registers List
 List of registers of Buck-Boost 4 Click driver.
 
 Buck-Boost 4 Registers Settings
 Settings for registers of Buck-Boost 4 Click driver.
 
 Buck-Boost 4 MikroBUS Map
 MikroBUS pin mapping of Buck-Boost 4 Click driver.
 

Functions

void buckboost4_cfg_setup (buckboost4_cfg_t *cfg)
 Buck-Boost 4 configuration object setup function.
 
err_t buckboost4_init (buckboost4_t *ctx, buckboost4_cfg_t *cfg)
 Buck-Boost 4 initialization function.
 
err_t buckboost4_default_cfg (buckboost4_t *ctx)
 Buck-Boost 4 default configuration function.
 
err_t buckboost4_generic_write (buckboost4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Buck-Boost 4 I2C writing function.
 
err_t buckboost4_generic_read (buckboost4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Buck-Boost 4 I2C reading function.
 
void buckboost4_enable_device (buckboost4_t *ctx)
 Buck-Boost 4 enable the device function.
 
void buckboost4_disable_device (buckboost4_t *ctx)
 Buck-Boost 4 disable the device function.
 
err_t buckboost4_set_vref (buckboost4_t *ctx, float vref_mv)
 Buck-Boost 4 set internal reference voltage function.
 
err_t buckboost4_current_limit_cfg (buckboost4_t *ctx, uint8_t cl_en, float cltv_mv)
 Buck-Boost 4 current limit config function.
 
err_t buckboost4_set_ocp_delay (buckboost4_t *ctx, uint8_t ocp_delay)
 Buck-Boost 4 sets the output overcurrent response time function.
 
err_t buckboost4_set_slew_rate (buckboost4_t *ctx, uint8_t slew_rate)
 Buck-Boost 4 sets the slew rate for output voltage change function.
 
err_t buckboost4_en_ext_output_vtg (buckboost4_t *ctx)
 Buck-Boost 4 enable external output voltage feedback function.
 
err_t buckboost4_set_int_fb_ratio (buckboost4_t *ctx, uint8_t int_fb_ratio)
 Buck-Boost 4 set the internal feedback ratio function.
 
err_t buckboost4_output_enable (buckboost4_t *ctx)
 Buck-Boost 4 enable output voltage function.
 
err_t buckboost4_output_disable (buckboost4_t *ctx)
 Buck-Boost 4 disable output voltage function.
 
err_t buckboost4_set_mode (buckboost4_t *ctx, uint8_t fswdbl, uint8_t hiccup, uint8_t dischg, uint8_t fpwm)
 Buck-Boost 4 set mode function.
 
err_t buckboost4_get_status (buckboost4_t *ctx, uint8_t *status)
 Buck-Boost 4 get status function.
 
err_t buckboost4_set_vout (buckboost4_t *ctx, float vout_v)
 Buck-Boost 4 set the output voltage function.
 
uint8_t buckboost4_fault_indicator (buckboost4_t *ctx)
 Buck-Boost 4 check fault indicator function.
 

Detailed Description

API for configuring and manipulating Buck-Boost 4 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ buckboost4_cfg_setup()

void buckboost4_cfg_setup ( buckboost4_cfg_t * cfg)

Buck-Boost 4 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See buckboost4_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ buckboost4_current_limit_cfg()

err_t buckboost4_current_limit_cfg ( buckboost4_t * ctx,
uint8_t cl_en,
float cltv_mv )

Buck-Boost 4 current limit config function.

This function configures the current limit of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]cl_en: Disable or enable current limit [0-1].
[in]cltv_mv: Current limit target voltage between the ISP and ISN [0mV- 63.5mV].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_default_cfg()

err_t buckboost4_default_cfg ( buckboost4_t * ctx)

Buck-Boost 4 default configuration function.

This function executes a default configuration of Buck-Boost 4 click board.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ buckboost4_disable_device()

void buckboost4_disable_device ( buckboost4_t * ctx)

Buck-Boost 4 disable the device function.

This function is used to disable the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
Returns
Nothing.

◆ buckboost4_en_ext_output_vtg()

err_t buckboost4_en_ext_output_vtg ( buckboost4_t * ctx)

Buck-Boost 4 enable external output voltage feedback function.

This function is used to enable external output voltage feedback of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_enable_device()

void buckboost4_enable_device ( buckboost4_t * ctx)

Buck-Boost 4 enable the device function.

This function is used to enable the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
Returns
Nothing.

◆ buckboost4_fault_indicator()

uint8_t buckboost4_fault_indicator ( buckboost4_t * ctx)

Buck-Boost 4 check fault indicator function.

This function gets the status of the fault indicator of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
Returns
  • 0 - Internal fault happening,
  • 1 - No fault.
Note
When the device is set to use internal feedback, this pin is a fault indicator output.

◆ buckboost4_generic_read()

err_t buckboost4_generic_read ( buckboost4_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Buck-Boost 4 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_generic_write()

err_t buckboost4_generic_write ( buckboost4_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Buck-Boost 4 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_get_status()

err_t buckboost4_get_status ( buckboost4_t * ctx,
uint8_t * status )

Buck-Boost 4 get status function.

This function reads the status data of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[out]status: Status data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_init()

err_t buckboost4_init ( buckboost4_t * ctx,
buckboost4_cfg_t * cfg )

Buck-Boost 4 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See buckboost4_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_output_disable()

err_t buckboost4_output_disable ( buckboost4_t * ctx)

Buck-Boost 4 disable output voltage function.

This function disables the output voltage of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_output_enable()

err_t buckboost4_output_enable ( buckboost4_t * ctx)

Buck-Boost 4 enable output voltage function.

This function enables the output voltage of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_set_int_fb_ratio()

err_t buckboost4_set_int_fb_ratio ( buckboost4_t * ctx,
uint8_t int_fb_ratio )

Buck-Boost 4 set the internal feedback ratio function.

This function sets the internal feedback ratio of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]int_fb_ratio: Internal feedback ratio [0-3].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_set_mode()

err_t buckboost4_set_mode ( buckboost4_t * ctx,
uint8_t fswdbl,
uint8_t hiccup,
uint8_t dischg,
uint8_t fpwm )

Buck-Boost 4 set mode function.

This function configures the mode of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]fswdbl: Switching frequency doubling in buck-boost mode [0-1].
[in]hiccup: Hiccup mode [0-1].
[in]dischg: Output discharge [0-1].
[in]fpwm: Select operating mode at light load condition [0-1].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_set_ocp_delay()

err_t buckboost4_set_ocp_delay ( buckboost4_t * ctx,
uint8_t ocp_delay )

Buck-Boost 4 sets the output overcurrent response time function.

This function sets the response time of the device when the output overcurrent limit is reached of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]ocp_delay: Output overcurrent limit delay [0-3].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_set_slew_rate()

err_t buckboost4_set_slew_rate ( buckboost4_t * ctx,
uint8_t slew_rate )

Buck-Boost 4 sets the slew rate for output voltage change function.

This function sets the slew rate for output voltage change of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]ocp_delay: Slew rate for output voltage change [0-3].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_set_vout()

err_t buckboost4_set_vout ( buckboost4_t * ctx,
float vout_v )

Buck-Boost 4 set the output voltage function.

This function sets the output voltage of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]vout_v: Output voltage [0.8V-21.286V].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ buckboost4_set_vref()

err_t buckboost4_set_vref ( buckboost4_t * ctx,
float vref_mv )

Buck-Boost 4 set internal reference voltage function.

This function sets the internal reference voltage of the TPS55289, 30-V, 8-A Buck-Boost Converter with I2C Interface on the Buck-Boost 4 Click board™.

Parameters
[in]ctx: Click context object. See buckboost4_t object definition for detailed explanation.
[in]vref_mv: Internal reference voltage [45mV-1200mV].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.