smartbuck3 2.1.0.0
Smart Buck 3 Click Driver

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

Topics

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

Functions

void smartbuck3_cfg_setup (smartbuck3_cfg_t *cfg)
 Smart Buck 3 configuration object setup function.
 
err_t smartbuck3_init (smartbuck3_t *ctx, smartbuck3_cfg_t *cfg)
 Smart Buck 3 initialization function.
 
err_t smartbuck3_default_cfg (smartbuck3_t *ctx)
 Smart Buck 3 default configuration function.
 
err_t smartbuck3_generic_write (smartbuck3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Smart Buck 3 I2C writing function.
 
err_t smartbuck3_generic_read (smartbuck3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Smart Buck 3 I2C reading function.
 
err_t smartbuck3_set_voltage (smartbuck3_t *ctx, uint16_t vout_mv)
 Smart Buck 3 set voltage function.
 
err_t smartbuck3_get_voltage (smartbuck3_t *ctx, uint16_t *vout_mv)
 Smart Buck 3 get voltage function.
 
err_t smartbuck3_set_operation_mode (smartbuck3_t *ctx, uint8_t op_mode)
 Smart Buck 3 set operation mode function.
 
err_t smartbuck3_get_operation_mode (smartbuck3_t *ctx, uint8_t *op_mode)
 Smart Buck 3 get operation mode function.
 
err_t smartbuck3_set_temperature_shutdown (smartbuck3_t *ctx, uint8_t temp_enable)
 Smart Buck 3 set temperature shutdown function.
 
uint8_t smartbuck3_check_temperature_warning (smartbuck3_t *ctx)
 Smart Buck 3 check temperature warning function.
 
err_t smartbuck3_set_voltage_ramp_timing (smartbuck3_t *ctx, uint8_t slope)
 Smart Buck 3 set voltage ramp timing function.
 
err_t smartbuck3_get_device_id (smartbuck3_t *ctx, uint8_t *device_id)
 Smart Buck 3 get device ID function.
 

Detailed Description

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

◆ smartbuck3_cfg_setup()

void smartbuck3_cfg_setup ( smartbuck3_cfg_t * cfg)

Smart Buck 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ smartbuck3_check_temperature_warning()

uint8_t smartbuck3_check_temperature_warning ( smartbuck3_t * ctx)

Smart Buck 3 check temperature warning function.

This function checks temperature warnings by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

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

◆ smartbuck3_default_cfg()

err_t smartbuck3_default_cfg ( smartbuck3_t * ctx)

Smart Buck 3 default configuration function.

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

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

◆ smartbuck3_generic_read()

err_t smartbuck3_generic_read ( smartbuck3_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Smart Buck 3 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 smartbuck3_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.

◆ smartbuck3_generic_write()

err_t smartbuck3_generic_write ( smartbuck3_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Smart Buck 3 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 smartbuck3_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.

◆ smartbuck3_get_device_id()

err_t smartbuck3_get_device_id ( smartbuck3_t * ctx,
uint8_t * device_id )

Smart Buck 3 get device ID function.

This function read device ID by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck3_t object definition for detailed explanation.
[out]device_id: Chip ID ( [D7:D4] - Vendor ID [D3:D2] - Part number ID [D1:D0] - Chip revision ID ).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ smartbuck3_get_operation_mode()

err_t smartbuck3_get_operation_mode ( smartbuck3_t * ctx,
uint8_t * op_mode )

Smart Buck 3 get operation mode function.

This function read operation mode by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

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

◆ smartbuck3_get_voltage()

err_t smartbuck3_get_voltage ( smartbuck3_t * ctx,
uint16_t * vout_mv )

Smart Buck 3 get voltage function.

This function read the output voltage by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

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

◆ smartbuck3_init()

err_t smartbuck3_init ( smartbuck3_t * ctx,
smartbuck3_cfg_t * cfg )

Smart Buck 3 initialization function.

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

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

◆ smartbuck3_set_operation_mode()

err_t smartbuck3_set_operation_mode ( smartbuck3_t * ctx,
uint8_t op_mode )

Smart Buck 3 set operation mode function.

This function set operation mode by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

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

◆ smartbuck3_set_temperature_shutdown()

err_t smartbuck3_set_temperature_shutdown ( smartbuck3_t * ctx,
uint8_t temp_enable )

Smart Buck 3 set temperature shutdown function.

This function set emperature shutdown feature by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

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

◆ smartbuck3_set_voltage()

err_t smartbuck3_set_voltage ( smartbuck3_t * ctx,
uint16_t vout_mv )

Smart Buck 3 set voltage function.

This function sets the output voltage by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

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

◆ smartbuck3_set_voltage_ramp_timing()

err_t smartbuck3_set_voltage_ramp_timing ( smartbuck3_t * ctx,
uint8_t slope )

Smart Buck 3 set voltage ramp timing function.

This function set output voltage ramp timing by using I2C serial interface of the TPS62366A, 4A Processor Supply with I2C Compatible Interface and Remote Sense on the Smart Buck 3 Click board™.

Parameters
[in]ctx: Click context object. See smartbuck3_t object definition for detailed explanation.
[in]slope:
  • SMARTBUCK3_VTG_RAMP_T_32mVns - 32 mV/µs,
  • SMARTBUCK3_VTG_RAMP_T_16mVns - 16 mV/µs,
  • SMARTBUCK3_VTG_RAMP_T_8mVns - 8 mV/µs,
  • SMARTBUCK3_VTG_RAMP_T_4mVns - 4 mV/µs,
  • SMARTBUCK3_VTG_RAMP_T_2mVns - 2 mV/µs,
  • SMARTBUCK3_VTG_RAMP_T_1mVns - 1 mV/µs,
  • SMARTBUCK3_VTG_RAMP_T_0_5mVns - 0.5 mV/µs,
  • SMARTBUCK3_VTG_RAMP_T_0_25mVns - 0.25 mV/µs.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.