smartbuck2 2.1.0.0
Smart Buck 2 Click Driver

API for configuring and manipulating Smart Buck 2 Click driver. More...

Topics

 Smart Buck 2 Registers List
 List of registers of Smart Buck 2 Click driver.
 
 Smart Buck 2 Registers Settings
 Settings for registers of Smart Buck 2 Click driver.
 
 Smart Buck 2 MikroBUS Map
 MikroBUS pin mapping of Smart Buck 2 Click driver.
 

Functions

void smartbuck2_cfg_setup (smartbuck2_cfg_t *cfg)
 Smart Buck 2 configuration object setup function.
 
err_t smartbuck2_init (smartbuck2_t *ctx, smartbuck2_cfg_t *cfg)
 Smart Buck 2 initialization function.
 
err_t smartbuck2_default_cfg (smartbuck2_t *ctx)
 Smart Buck 2 default configuration function.
 
err_t smartbuck2_generic_write (smartbuck2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Smart Buck 2 I2C writing function.
 
err_t smartbuck2_generic_read (smartbuck2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Smart Buck 2 I2C reading function.
 
err_t smartbuck2_set_voltage (smartbuck2_t *ctx, uint16_t vout_mv)
 Smart Buck 2 set voltage function.
 
err_t smartbuck2_get_voltage (smartbuck2_t *ctx, uint16_t *vout_mv)
 Smart Buck 2 get voltage function.
 
err_t smartbuck2_set_op_mode (smartbuck2_t *ctx, uint8_t op_mode)
 Smart Buck 2 set operation mode function.
 
err_t smartbuck2_get_op_mode (smartbuck2_t *ctx, uint8_t *op_mode)
 Smart Buck 2 get operation mode function.
 
err_t smartbuck2_set_ctrl (smartbuck2_t *ctx, uint8_t ctrl)
 Smart Buck 2 set control function.
 
err_t smartbuck2_set_temp_shd (smartbuck2_t *ctx, uint8_t temp_enable)
 Smart Buck 2 set temperature shutdown function.
 
uint8_t smartbuck2_check_temp_warning (smartbuck2_t *ctx)
 Smart Buck 2 check temperature warning function.
 
err_t smartbuck2_set_vtg_ramp_timing (smartbuck2_t *ctx, uint8_t slope)
 Smart Buck 2 set voltage ramp timing function.
 
err_t smartbuck2_get_device_id (smartbuck2_t *ctx, uint8_t *ven_id, uint8_t *part_num_id, uint8_t *chip_id)
 Smart Buck 2 get device ID function.
 

Detailed Description

API for configuring and manipulating Smart Buck 2 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

◆ smartbuck2_cfg_setup()

void smartbuck2_cfg_setup ( smartbuck2_cfg_t * cfg)

Smart Buck 2 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ smartbuck2_check_temp_warning()

uint8_t smartbuck2_check_temp_warning ( smartbuck2_t * ctx)

Smart Buck 2 check temperature warning function.

This function checks temperature warnings of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck2_t object definition for detailed explanation.
Returns
  • SMARTBUCK2_TEMP_LT_120_C - The temperature is less than 120 degrees Celsius,
  • SMARTBUCK2_TEMP_GT_120_C - The temperature is greater than 120 degrees Celsius.
Note
None.

◆ smartbuck2_default_cfg()

err_t smartbuck2_default_cfg ( smartbuck2_t * ctx)

Smart Buck 2 default configuration function.

This function executes a default configuration of Smart Buck 2 click board.

Parameters
[in]ctx: Click context object. See smartbuck2_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.

◆ smartbuck2_generic_read()

err_t smartbuck2_generic_read ( smartbuck2_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Smart Buck 2 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 smartbuck2_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.

◆ smartbuck2_generic_write()

err_t smartbuck2_generic_write ( smartbuck2_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Smart Buck 2 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 smartbuck2_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.

◆ smartbuck2_get_device_id()

err_t smartbuck2_get_device_id ( smartbuck2_t * ctx,
uint8_t * ven_id,
uint8_t * part_num_id,
uint8_t * chip_id )

Smart Buck 2 get device ID function.

This function reads Chip ID register (vendor ID, part number ID and chip revision ID) of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck2_t object definition for detailed explanation.
[out]ven_id: Vendor ID.
[out]part_num_id: Part number ID.
[out]chip_id: Chip revision ID.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ smartbuck2_get_op_mode()

err_t smartbuck2_get_op_mode ( smartbuck2_t * ctx,
uint8_t * op_mode )

Smart Buck 2 get operation mode function.

This function reads the desired operation mode of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

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

◆ smartbuck2_get_voltage()

err_t smartbuck2_get_voltage ( smartbuck2_t * ctx,
uint16_t * vout_mv )

Smart Buck 2 get voltage function.

This function reads the output voltage of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck2_t object definition for detailed explanation.
[out]vout_mv: Voltage output in millivolts [500-1770mV].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ smartbuck2_init()

err_t smartbuck2_init ( smartbuck2_t * ctx,
smartbuck2_cfg_t * cfg )

Smart Buck 2 initialization function.

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

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

◆ smartbuck2_set_ctrl()

err_t smartbuck2_set_ctrl ( smartbuck2_t * ctx,
uint8_t ctrl )

Smart Buck 2 set control function.

This function sets desired configuration of the control register of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

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

◆ smartbuck2_set_op_mode()

err_t smartbuck2_set_op_mode ( smartbuck2_t * ctx,
uint8_t op_mode )

Smart Buck 2 set operation mode function.

This function sets the desired operation mode of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck2_t object definition for detailed explanation.
[in]op_mode:
  • SMARTBUCK2_OP_MODE_PFM - PFM/PWM mode operation,
  • SMARTBUCK2_OP_MODE_FORCED_PWM - Forced PWM mode operation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ smartbuck2_set_temp_shd()

err_t smartbuck2_set_temp_shd ( smartbuck2_t * ctx,
uint8_t temp_enable )

Smart Buck 2 set temperature shutdown function.

This function sets temperature shutdown feature of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck2_t object definition for detailed explanation.
[in]temp_enable:
  • SMARTBUCK2_TEMP_TS_ENABLE - Temperature shutdown enabled,
  • SMARTBUCK2_TEMP_TS_DISABLE - Temperature shutdown disabled (not recommended).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ smartbuck2_set_voltage()

err_t smartbuck2_set_voltage ( smartbuck2_t * ctx,
uint16_t vout_mv )

Smart Buck 2 set voltage function.

This function sets the output voltage of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck2_t object definition for detailed explanation.
[in]vout_mv: Voltage output in millivolts [500-1770mV].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ smartbuck2_set_vtg_ramp_timing()

err_t smartbuck2_set_vtg_ramp_timing ( smartbuck2_t * ctx,
uint8_t slope )

Smart Buck 2 set voltage ramp timing function.

This function sets output voltage ramp timing of the TPS62363YZHT, 3A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 2 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck2_t object definition for detailed explanation.
[in]slope:
  • SMARTBUCK2_RMP_VTG_T_32MVNS - 32 mV/µs,
  • SMARTBUCK2_RMP_VTG_T_16MVNS - 16 mV/µs,
  • SMARTBUCK2_RMP_VTG_T_8MVNS - 8 mV/µs,
  • SMARTBUCK2_RMP_VTG_T_4MVNS - 4 mV/µs,
  • SMARTBUCK2_RMP_VTG_T_2MVNS - 2 mV/µs,
  • SMARTBUCK2_RMP_VTG_T_1MVNS - 1 mV/µs,
  • SMARTBUCK2_RMP_VTG_T_0_5MVNS - 0.5 mV/µs,
  • SMARTBUCK2_RMP_VTG_T_0_25MVNS - 0.25 mV/µs.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.