no-OS
Loading...
Searching...
No Matches
ltm4700.h File Reference

Header file of the LTM4700 driver. More...

#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "no_os_util.h"
#include "no_os_i2c.h"
#include "no_os_gpio.h"
Include dependency graph for ltm4700.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ltm4700_dev
 
struct  ltm4700_init_param
 
struct  ltm4700_status
 

Macros

#define LTM4700_PAGE   0x00
 
#define LTM4700_OPERATION   0x01
 
#define LTM4700_ON_OFF_CONFIG   0x02
 
#define LTM4700_CLEAR_FAULTS   0x03
 
#define LTM4700_PAGE_PLUS_WRITE   0x05
 
#define LTM4700_PAGE_PLUS_READ   0x06
 
#define LTM4700_WRITE_PROTECT   0x10
 
#define LTM4700_STORE_USER_ALL   0x15
 
#define LTM4700_RESTORE_USER_ALL   0x16
 
#define LTM4700_CAPABILITY   0x19
 
#define LTM4700_SMBALERT_MASK   0x1B
 
#define LTM4700_VOUT_MODE   0x20
 
#define LTM4700_VOUT_COMMAND   0x21
 
#define LTM4700_VOUT_MAX   0x24
 
#define LTM4700_VOUT_MARGIN_HIGH   0x25
 
#define LTM4700_VOUT_MARGIN_LOW   0x26
 
#define LTM4700_VOUT_OV_FAULT_LIMIT   0x40
 
#define LTM4700_VOUT_OV_FAULT_RESPONSE   0x41
 
#define LTM4700_VOUT_OV_WARN_LIMIT   0x42
 
#define LTM4700_VOUT_UV_WARN_LIMIT   0x43
 
#define LTM4700_VOUT_UV_FAULT_LIMIT   0x44
 
#define LTM4700_VOUT_UV_FAULT_RESPONSE   0x45
 
#define LTM4700_IOUT_OC_FAULT_LIMIT   0x46
 
#define LTM4700_IOUT_OC_FAULT_RESPONSE   0x47
 
#define LTM4700_IOUT_OC_WARN_LIMIT   0x4A
 
#define LTM4700_TON_DELAY   0x60
 
#define LTM4700_TOFF_DELAY   0x64
 
#define LTM4700_STATUS_BYTE   0x78
 
#define LTM4700_STATUS_WORD   0x79
 
#define LTM4700_STATUS_VOUT   0x7A
 
#define LTM4700_STATUS_IOUT   0x7B
 
#define LTM4700_STATUS_INPUT   0x7C
 
#define LTM4700_STATUS_TEMPERATURE   0x7D
 
#define LTM4700_STATUS_CML   0x7E
 
#define LTM4700_STATUS_MFR_SPECIFIC   0x80
 
#define LTM4700_READ_VIN   0x88
 
#define LTM4700_READ_IIN   0x89
 
#define LTM4700_READ_VOUT   0x8B
 
#define LTM4700_READ_IOUT   0x8C
 
#define LTM4700_READ_TEMPERATURE_1   0x8D
 
#define LTM4700_READ_TEMPERATURE_2   0x8E
 
#define LTM4700_READ_FREQUENCY   0x95
 
#define LTM4700_READ_POUT   0x96
 
#define LTM4700_READ_PIN   0x97
 
#define LTM4700_MFR_ID   0x99
 
#define LTM4700_MFR_MODEL   0x9A
 
#define LTM4700_MFR_VOUT_MAX   0xA5
 
#define LTM4700_MFR_PIN_ACCURACY   0xAC
 
#define LTM4700_MFR_EE_UNLOCK   0xBD
 
#define LTM4700_MFR_EE_ERASE   0xBE
 
#define LTM4700_MFR_EE_DATA   0xBF
 
#define LTM4700_MFR_CHAN_CONFIG   0xD0
 
#define LTM4700_MFR_CONFIG_ALL   0xD1
 
#define LTM4700_MFR_FAULT_PROPAGATE   0xD2
 
#define LTM4700_MFR_PWM_COMP   0xD3
 
#define LTM4700_MFR_PWM_MODE   0xD4
 
#define LTM4700_MFR_FAULT_RESPONSE   0xD5
 
#define LTM4700_MFR_OT_FAULT_RESPONSE   0xD6
 
#define LTM4700_MFR_IOUT_PEAK   0xD7
 
#define LTM4700_MFR_ADC_CONTROL   0xD8
 
#define LTM4700_MFR_RETRY_DELAY   0xDB
 
#define LTM4700_MFR_RESTART_DELAY   0xDC
 
#define LTM4700_MFR_VOUT_PEAK   0xDD
 
#define LTM4700_MFR_VIN_PEAK   0xDE
 
#define LTM4700_MFR_TEMPERATURE_1_PEAK   0xDF
 
#define LTM4700_MFR_READ_IIN_PEAK   0xE1
 
#define LTM4700_MFR_CLEAR_PEAKS   0xE3
 
#define LTM4700_MFR_READ_ICHIP   0xE4
 
#define LTM4700_MFR_PADS   0xE5
 
#define LTM4700_MFR_ADDRESS   0xE6
 
#define LTM4700_MFR_SPECIAL_ID   0xE7
 
#define LTM4700_MFR_IIN_CAL_GAIN   0xE8
 
#define LTM4700_MFR_FAULT_LOG_STORE   0xEA
 
#define LTM4700_MFR_FAULT_LOG_CLEAR   0xEC
 
#define LTM4700_MFR_FAULT_LOG   0xEE
 
#define LTM4700_MFR_COMMON   0xEF
 
#define LTM4700_MFR_COMPARE_USER_ALL   0xF0
 
#define LTM4700_MFR_TEMPERATURE_2_PEAK   0xF4
 
#define LTM4700_MFR_PWM_CONFIG   0xF5
 
#define LTM4700_MFR_IOUT_CAL_GAIN_TC   0xF6
 
#define LTM4700_MFR_RVIN   0xF7
 
#define LTM4700_MFR_TEMP_1_GAIN   0xF8
 
#define LTM4700_MFR_TEMP_1_OFFSET   0xF9
 
#define LTM4700_MFR_RAIL_ADDRESS   0xFA
 
#define LTM4700_MFR_REAL_TIME   0xFB
 
#define LTM4700_MFR_RESET   0xFD
 
#define LTM4700_CRC_POLYNOMIAL   0x7
 
#define LTM4700_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)
 
#define LTM4700_LIN11_MANTISSA_MAX   1023L
 
#define LTM4700_LIN11_MANTISSA_MIN   (-1024L)
 
#define LTM4700_LIN11_EXPONENT_MAX   15
 
#define LTM4700_LIN11_EXPONENT_MIN   (-15)
 
#define LTM4700_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)
 
#define LTM4700_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)
 
#define LTM4700_LIN11_EXPONENT(x)
 
#define LTM4700_LIN11_MANTISSA(x)
 
#define LTM4700_LIN16_EXPONENT   (-12)
 
#define LTM4700_CHAN_0   0x0
 
#define LTM4700_CHAN_1   0x1
 
#define LTM4700_CHAN_ALL   0xFF
 
#define LTM4700_STATUS_BYTE_TYPE_MSK   NO_OS_BIT(0)
 
#define LTM4700_STATUS_VOUT_TYPE_MSK   NO_OS_BIT(1)
 
#define LTM4700_STATUS_IOUT_TYPE_MSK   NO_OS_BIT(2)
 
#define LTM4700_STATUS_INPUT_TYPE_MSK   NO_OS_BIT(3)
 
#define LTM4700_STATUS_TEMP_TYPE_MSK   NO_OS_BIT(4)
 
#define LTM4700_STATUS_CML_TYPE_MSK   NO_OS_BIT(5)
 
#define LTM4700_STATUS_MFR_SPECIFIC_TYPE_MSK   NO_OS_BIT(6)
 
#define LTM4700_STATUS_WORD_TYPE_MSK   NO_OS_BIT(7)
 
#define LTM4700_STATUS_ALL_TYPE_MSK   0xFF
 
#define LTM4700_ID_MSK   0xFFF0
 
#define LTM4700_SPECIAL_ID_VALUE   0x4130
 
#define LTM4700_MFR_ID_VALUE   "ADI"
 
#define LTM4700_MFR_ID_SIZE   3
 
#define LTM4700_MFR_MODEL_VALUE   "LTM4700"
 
#define LTM4700_MFR_MODEL_SIZE   7
 

Enumerations

enum  ltm4700_operation_type {
  LTM4700_OPERATION_OFF = 0x00 ,
  LTM4700_OPERATION_ON = 0x80 ,
  LTM4700_OPERATION_MARGIN_LOW = 0x98 ,
  LTM4700_OPERATION_MARGIN_HIGH = 0xA8 ,
  LTM4700_OPERATION_SEQ_OFF = 0x40
}
 
enum  ltm4700_value_type {
  LTM4700_VIN = LTM4700_READ_VIN ,
  LTM4700_IIN = LTM4700_READ_IIN ,
  LTM4700_VOUT = LTM4700_READ_VOUT ,
  LTM4700_IOUT = LTM4700_READ_IOUT ,
  LTM4700_TEMP_EXT = LTM4700_READ_TEMPERATURE_1 ,
  LTM4700_TEMP_IC = LTM4700_READ_TEMPERATURE_2 ,
  LTM4700_FREQ = LTM4700_READ_FREQUENCY ,
  LTM4700_POUT = LTM4700_READ_POUT ,
  LTM4700_PIN = LTM4700_READ_PIN ,
  LTM4700_IOUT_PEAK = LTM4700_MFR_IOUT_PEAK ,
  LTM4700_VOUT_PEAK = LTM4700_MFR_VOUT_PEAK ,
  LTM4700_VIN_PEAK = LTM4700_MFR_VIN_PEAK ,
  LTM4700_TEMP_PEAK = LTM4700_MFR_TEMPERATURE_1_PEAK
}
 
enum  ltm4700_status_type {
  LTM4700_STATUS_ALL_TYPE = LTM4700_STATUS_ALL_TYPE_MSK ,
  LTM4700_STATUS_BYTE_TYPE = LTM4700_STATUS_BYTE_TYPE_MSK ,
  LTM4700_STATUS_VOUT_TYPE = LTM4700_STATUS_VOUT_TYPE_MSK ,
  LTM4700_STATUS_IOUT_TYPE = LTM4700_STATUS_IOUT_TYPE_MSK ,
  LTM4700_STATUS_INPUT_TYPE = LTM4700_STATUS_INPUT_TYPE_MSK ,
  LTM4700_STATUS_TEMP_TYPE = LTM4700_STATUS_TEMP_TYPE_MSK ,
  LTM4700_STATUS_CML_TYPE = LTM4700_STATUS_CML_TYPE_MSK ,
  LTM4700_STATUS_MFR_SPECIFIC_TYPE = LTM4700_STATUS_MFR_SPECIFIC_TYPE_MSK ,
  LTM4700_STATUS_WORD_TYPE = LTM4700_STATUS_WORD_TYPE_MSK
}
 
enum  ltm4700_timing_type {
  LTM4700_TON_DELAY_TYPE = LTM4700_TON_DELAY ,
  LTM4700_TOFF_DELAY_TYPE = LTM4700_TOFF_DELAY ,
  LTM4700_RETRY_DELAY = LTM4700_MFR_RETRY_DELAY ,
  LTM4700_RESTART_DELAY = LTM4700_MFR_RESTART_DELAY
}
 
enum  ltm4700_nvm_cmd_type {
  LTM4700_STORE_USER = LTM4700_STORE_USER_ALL ,
  LTM4700_RESTORE_USER = LTM4700_RESTORE_USER_ALL ,
  LTM4700_COMPARE_USER = LTM4700_MFR_COMPARE_USER_ALL
}
 

Functions

int ltm4700_init (struct ltm4700_dev **device, struct ltm4700_init_param *init_param)
 Initialize the LTM4700 device structure.
 
int ltm4700_remove (struct ltm4700_dev *dev)
 Free or remove device instance.
 
int ltm4700_set_page (struct ltm4700_dev *dev, int page)
 Set PMBus page and phase.
 
int ltm4700_send_byte (struct ltm4700_dev *dev, int page, uint8_t cmd)
 Send a PMBus command to the device.
 
int ltm4700_read_byte (struct ltm4700_dev *dev, int page, uint8_t cmd, uint8_t *data)
 Perform a PMBus read_byte operation.
 
int ltm4700_write_byte (struct ltm4700_dev *dev, int page, uint8_t cmd, uint8_t value)
 Perform a PMBus write_byte operation.
 
int ltm4700_read_word (struct ltm4700_dev *dev, int page, uint8_t cmd, uint16_t *word)
 Perform a PMBus read_word operation.
 
int ltm4700_write_word (struct ltm4700_dev *dev, int page, uint8_t cmd, uint16_t word)
 Perform a PMBus write_word operation.
 
int ltm4700_read_word_data (struct ltm4700_dev *dev, int page, uint8_t cmd, int *data)
 Perform a PMBus read_word operation then perform conversion.
 
int ltm4700_write_word_data (struct ltm4700_dev *dev, int page, uint8_t cmd, int data)
 Perform conversion then perform a PMBus write_word operation.
 
int ltm4700_read_block_data (struct ltm4700_dev *dev, int page, uint8_t cmd, uint8_t *data, size_t nbytes)
 Read a block of bytes from device.
 
int ltm4700_read_value (struct ltm4700_dev *dev, uint8_t channel, enum ltm4700_value_type value_type, int *value)
 Read specific value type (voltage, current, power, temperature)
 
int ltm4700_read_status (struct ltm4700_dev *dev, uint8_t channel, enum ltm4700_status_type status_type, struct ltm4700_status *status)
 Read status information from device.
 
int ltm4700_vout_value (struct ltm4700_dev *dev, uint8_t channel, int vout_command, int vout_max)
 Set VOUT parameters: VOUT_COMMAND and VOUT_MAX.
 
int ltm4700_vout_margin (struct ltm4700_dev *dev, uint8_t channel, int margin_low, int margin_high)
 Set VOUT margins for overvoltage/undervoltage protection.
 
int ltm4700_set_timing (struct ltm4700_dev *dev, uint8_t channel, enum ltm4700_timing_type timing_type, int time)
 Set timing values in microseconds.
 
int ltm4700_set_operation (struct ltm4700_dev *dev, uint8_t channel, enum ltm4700_operation_type operation)
 Set operation mode for specified channel.
 
int ltm4700_nvm_cmd (struct ltm4700_dev *dev, enum ltm4700_nvm_cmd_type cmd)
 Execute NVM/EEPROM user commands.
 
int ltm4700_software_reset (struct ltm4700_dev *dev)
 Perform software reset of the device.
 
int ltm4700_clear_peaks (struct ltm4700_dev *dev)
 Clear all peak value tracking registers.
 
int ltm4700_verify_manufacturer_id (struct ltm4700_dev *dev)
 Verify manufacturer ID.
 
int ltm4700_verify_manufacturer_model (struct ltm4700_dev *dev)
 Verify manufacturer model.
 

Detailed Description

Header file of the LTM4700 driver.

Author
Carlos Jones Jr (carlo.nosp@m.sjr..nosp@m.jones.nosp@m.@ana.nosp@m.log.c.nosp@m.om)

Copyright 2026(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ LTM4700_CAPABILITY

#define LTM4700_CAPABILITY   0x19

◆ LTM4700_CHAN_0

#define LTM4700_CHAN_0   0x0

◆ LTM4700_CHAN_1

#define LTM4700_CHAN_1   0x1

◆ LTM4700_CHAN_ALL

#define LTM4700_CHAN_ALL   0xFF

◆ LTM4700_CLEAR_FAULTS

#define LTM4700_CLEAR_FAULTS   0x03

◆ LTM4700_CRC_POLYNOMIAL

#define LTM4700_CRC_POLYNOMIAL   0x7

◆ LTM4700_ID_MSK

#define LTM4700_ID_MSK   0xFFF0

◆ LTM4700_IOUT_OC_FAULT_LIMIT

#define LTM4700_IOUT_OC_FAULT_LIMIT   0x46

◆ LTM4700_IOUT_OC_FAULT_RESPONSE

#define LTM4700_IOUT_OC_FAULT_RESPONSE   0x47

◆ LTM4700_IOUT_OC_WARN_LIMIT

#define LTM4700_IOUT_OC_WARN_LIMIT   0x4A

◆ LTM4700_LIN11_EXPONENT

#define LTM4700_LIN11_EXPONENT ( x)
Value:
((int16_t)(x) >> 11)

◆ LTM4700_LIN11_EXPONENT_MAX

#define LTM4700_LIN11_EXPONENT_MAX   15

◆ LTM4700_LIN11_EXPONENT_MIN

#define LTM4700_LIN11_EXPONENT_MIN   (-15)

◆ LTM4700_LIN11_EXPONENT_MSK

#define LTM4700_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)

◆ LTM4700_LIN11_MANTISSA

#define LTM4700_LIN11_MANTISSA ( x)
Value:
(((int16_t)((x & LTM4700_LIN11_MANTISSA_MSK) << 5)) >> 5)
#define LTM4700_LIN11_MANTISSA_MSK
Definition ltm4700.h:151

◆ LTM4700_LIN11_MANTISSA_MAX

#define LTM4700_LIN11_MANTISSA_MAX   1023L

◆ LTM4700_LIN11_MANTISSA_MIN

#define LTM4700_LIN11_MANTISSA_MIN   (-1024L)

◆ LTM4700_LIN11_MANTISSA_MSK

#define LTM4700_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)

◆ LTM4700_LIN16_EXPONENT

#define LTM4700_LIN16_EXPONENT   (-12)

◆ LTM4700_MFR_ADC_CONTROL

#define LTM4700_MFR_ADC_CONTROL   0xD8

◆ LTM4700_MFR_ADDRESS

#define LTM4700_MFR_ADDRESS   0xE6

◆ LTM4700_MFR_CHAN_CONFIG

#define LTM4700_MFR_CHAN_CONFIG   0xD0

◆ LTM4700_MFR_CLEAR_PEAKS

#define LTM4700_MFR_CLEAR_PEAKS   0xE3

◆ LTM4700_MFR_COMMON

#define LTM4700_MFR_COMMON   0xEF

◆ LTM4700_MFR_COMPARE_USER_ALL

#define LTM4700_MFR_COMPARE_USER_ALL   0xF0

◆ LTM4700_MFR_CONFIG_ALL

#define LTM4700_MFR_CONFIG_ALL   0xD1

◆ LTM4700_MFR_EE_DATA

#define LTM4700_MFR_EE_DATA   0xBF

◆ LTM4700_MFR_EE_ERASE

#define LTM4700_MFR_EE_ERASE   0xBE

◆ LTM4700_MFR_EE_UNLOCK

#define LTM4700_MFR_EE_UNLOCK   0xBD

◆ LTM4700_MFR_FAULT_LOG

#define LTM4700_MFR_FAULT_LOG   0xEE

◆ LTM4700_MFR_FAULT_LOG_CLEAR

#define LTM4700_MFR_FAULT_LOG_CLEAR   0xEC

◆ LTM4700_MFR_FAULT_LOG_STORE

#define LTM4700_MFR_FAULT_LOG_STORE   0xEA

◆ LTM4700_MFR_FAULT_PROPAGATE

#define LTM4700_MFR_FAULT_PROPAGATE   0xD2

◆ LTM4700_MFR_FAULT_RESPONSE

#define LTM4700_MFR_FAULT_RESPONSE   0xD5

◆ LTM4700_MFR_ID

#define LTM4700_MFR_ID   0x99

◆ LTM4700_MFR_ID_SIZE

#define LTM4700_MFR_ID_SIZE   3

◆ LTM4700_MFR_ID_VALUE

#define LTM4700_MFR_ID_VALUE   "ADI"

◆ LTM4700_MFR_IIN_CAL_GAIN

#define LTM4700_MFR_IIN_CAL_GAIN   0xE8

◆ LTM4700_MFR_IOUT_CAL_GAIN_TC

#define LTM4700_MFR_IOUT_CAL_GAIN_TC   0xF6

◆ LTM4700_MFR_IOUT_PEAK

#define LTM4700_MFR_IOUT_PEAK   0xD7

◆ LTM4700_MFR_MODEL

#define LTM4700_MFR_MODEL   0x9A

◆ LTM4700_MFR_MODEL_SIZE

#define LTM4700_MFR_MODEL_SIZE   7

◆ LTM4700_MFR_MODEL_VALUE

#define LTM4700_MFR_MODEL_VALUE   "LTM4700"

◆ LTM4700_MFR_OT_FAULT_RESPONSE

#define LTM4700_MFR_OT_FAULT_RESPONSE   0xD6

◆ LTM4700_MFR_PADS

#define LTM4700_MFR_PADS   0xE5

◆ LTM4700_MFR_PIN_ACCURACY

#define LTM4700_MFR_PIN_ACCURACY   0xAC

◆ LTM4700_MFR_PWM_COMP

#define LTM4700_MFR_PWM_COMP   0xD3

◆ LTM4700_MFR_PWM_CONFIG

#define LTM4700_MFR_PWM_CONFIG   0xF5

◆ LTM4700_MFR_PWM_MODE

#define LTM4700_MFR_PWM_MODE   0xD4

◆ LTM4700_MFR_RAIL_ADDRESS

#define LTM4700_MFR_RAIL_ADDRESS   0xFA

◆ LTM4700_MFR_READ_ICHIP

#define LTM4700_MFR_READ_ICHIP   0xE4

◆ LTM4700_MFR_READ_IIN_PEAK

#define LTM4700_MFR_READ_IIN_PEAK   0xE1

◆ LTM4700_MFR_REAL_TIME

#define LTM4700_MFR_REAL_TIME   0xFB

◆ LTM4700_MFR_RESET

#define LTM4700_MFR_RESET   0xFD

◆ LTM4700_MFR_RESTART_DELAY

#define LTM4700_MFR_RESTART_DELAY   0xDC

◆ LTM4700_MFR_RETRY_DELAY

#define LTM4700_MFR_RETRY_DELAY   0xDB

◆ LTM4700_MFR_RVIN

#define LTM4700_MFR_RVIN   0xF7

◆ LTM4700_MFR_SPECIAL_ID

#define LTM4700_MFR_SPECIAL_ID   0xE7

◆ LTM4700_MFR_TEMP_1_GAIN

#define LTM4700_MFR_TEMP_1_GAIN   0xF8

◆ LTM4700_MFR_TEMP_1_OFFSET

#define LTM4700_MFR_TEMP_1_OFFSET   0xF9

◆ LTM4700_MFR_TEMPERATURE_1_PEAK

#define LTM4700_MFR_TEMPERATURE_1_PEAK   0xDF

◆ LTM4700_MFR_TEMPERATURE_2_PEAK

#define LTM4700_MFR_TEMPERATURE_2_PEAK   0xF4

◆ LTM4700_MFR_VIN_PEAK

#define LTM4700_MFR_VIN_PEAK   0xDE

◆ LTM4700_MFR_VOUT_MAX

#define LTM4700_MFR_VOUT_MAX   0xA5

◆ LTM4700_MFR_VOUT_PEAK

#define LTM4700_MFR_VOUT_PEAK   0xDD

◆ LTM4700_ON_OFF_CONFIG

#define LTM4700_ON_OFF_CONFIG   0x02

◆ LTM4700_OPERATION

#define LTM4700_OPERATION   0x01

◆ LTM4700_PAGE

#define LTM4700_PAGE   0x00

◆ LTM4700_PAGE_PLUS_READ

#define LTM4700_PAGE_PLUS_READ   0x06

◆ LTM4700_PAGE_PLUS_WRITE

#define LTM4700_PAGE_PLUS_WRITE   0x05

◆ LTM4700_READ_FREQUENCY

#define LTM4700_READ_FREQUENCY   0x95

◆ LTM4700_READ_IIN

#define LTM4700_READ_IIN   0x89

◆ LTM4700_READ_IOUT

#define LTM4700_READ_IOUT   0x8C

◆ LTM4700_READ_PIN

#define LTM4700_READ_PIN   0x97

◆ LTM4700_READ_POUT

#define LTM4700_READ_POUT   0x96

◆ LTM4700_READ_TEMPERATURE_1

#define LTM4700_READ_TEMPERATURE_1   0x8D

◆ LTM4700_READ_TEMPERATURE_2

#define LTM4700_READ_TEMPERATURE_2   0x8E

◆ LTM4700_READ_VIN

#define LTM4700_READ_VIN   0x88

◆ LTM4700_READ_VOUT

#define LTM4700_READ_VOUT   0x8B

◆ LTM4700_RESTORE_USER_ALL

#define LTM4700_RESTORE_USER_ALL   0x16

◆ LTM4700_SMBALERT_MASK

#define LTM4700_SMBALERT_MASK   0x1B

◆ LTM4700_SPECIAL_ID_VALUE

#define LTM4700_SPECIAL_ID_VALUE   0x4130

◆ LTM4700_STATUS_ALL_TYPE_MSK

#define LTM4700_STATUS_ALL_TYPE_MSK   0xFF

◆ LTM4700_STATUS_BYTE

#define LTM4700_STATUS_BYTE   0x78

◆ LTM4700_STATUS_BYTE_TYPE_MSK

#define LTM4700_STATUS_BYTE_TYPE_MSK   NO_OS_BIT(0)

◆ LTM4700_STATUS_CML

#define LTM4700_STATUS_CML   0x7E

◆ LTM4700_STATUS_CML_TYPE_MSK

#define LTM4700_STATUS_CML_TYPE_MSK   NO_OS_BIT(5)

◆ LTM4700_STATUS_INPUT

#define LTM4700_STATUS_INPUT   0x7C

◆ LTM4700_STATUS_INPUT_TYPE_MSK

#define LTM4700_STATUS_INPUT_TYPE_MSK   NO_OS_BIT(3)

◆ LTM4700_STATUS_IOUT

#define LTM4700_STATUS_IOUT   0x7B

◆ LTM4700_STATUS_IOUT_TYPE_MSK

#define LTM4700_STATUS_IOUT_TYPE_MSK   NO_OS_BIT(2)

◆ LTM4700_STATUS_MFR_SPECIFIC

#define LTM4700_STATUS_MFR_SPECIFIC   0x80

◆ LTM4700_STATUS_MFR_SPECIFIC_TYPE_MSK

#define LTM4700_STATUS_MFR_SPECIFIC_TYPE_MSK   NO_OS_BIT(6)

◆ LTM4700_STATUS_TEMP_TYPE_MSK

#define LTM4700_STATUS_TEMP_TYPE_MSK   NO_OS_BIT(4)

◆ LTM4700_STATUS_TEMPERATURE

#define LTM4700_STATUS_TEMPERATURE   0x7D

◆ LTM4700_STATUS_VOUT

#define LTM4700_STATUS_VOUT   0x7A

◆ LTM4700_STATUS_VOUT_TYPE_MSK

#define LTM4700_STATUS_VOUT_TYPE_MSK   NO_OS_BIT(1)

◆ LTM4700_STATUS_WORD

#define LTM4700_STATUS_WORD   0x79

◆ LTM4700_STATUS_WORD_TYPE_MSK

#define LTM4700_STATUS_WORD_TYPE_MSK   NO_OS_BIT(7)

◆ LTM4700_STORE_USER_ALL

#define LTM4700_STORE_USER_ALL   0x15

◆ LTM4700_TOFF_DELAY

#define LTM4700_TOFF_DELAY   0x64

◆ LTM4700_TON_DELAY

#define LTM4700_TON_DELAY   0x60

◆ LTM4700_VOUT_COMMAND

#define LTM4700_VOUT_COMMAND   0x21

◆ LTM4700_VOUT_MARGIN_HIGH

#define LTM4700_VOUT_MARGIN_HIGH   0x25

◆ LTM4700_VOUT_MARGIN_LOW

#define LTM4700_VOUT_MARGIN_LOW   0x26

◆ LTM4700_VOUT_MAX

#define LTM4700_VOUT_MAX   0x24

◆ LTM4700_VOUT_MODE

#define LTM4700_VOUT_MODE   0x20

◆ LTM4700_VOUT_MODE_VAL_MSK

#define LTM4700_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)

◆ LTM4700_VOUT_OV_FAULT_LIMIT

#define LTM4700_VOUT_OV_FAULT_LIMIT   0x40

◆ LTM4700_VOUT_OV_FAULT_RESPONSE

#define LTM4700_VOUT_OV_FAULT_RESPONSE   0x41

◆ LTM4700_VOUT_OV_WARN_LIMIT

#define LTM4700_VOUT_OV_WARN_LIMIT   0x42

◆ LTM4700_VOUT_UV_FAULT_LIMIT

#define LTM4700_VOUT_UV_FAULT_LIMIT   0x44

◆ LTM4700_VOUT_UV_FAULT_RESPONSE

#define LTM4700_VOUT_UV_FAULT_RESPONSE   0x45

◆ LTM4700_VOUT_UV_WARN_LIMIT

#define LTM4700_VOUT_UV_WARN_LIMIT   0x43

◆ LTM4700_WRITE_PROTECT

#define LTM4700_WRITE_PROTECT   0x10

Enumeration Type Documentation

◆ ltm4700_nvm_cmd_type

Enumerator
LTM4700_STORE_USER 
LTM4700_RESTORE_USER 
LTM4700_COMPARE_USER 

◆ ltm4700_operation_type

Enumerator
LTM4700_OPERATION_OFF 
LTM4700_OPERATION_ON 
LTM4700_OPERATION_MARGIN_LOW 
LTM4700_OPERATION_MARGIN_HIGH 
LTM4700_OPERATION_SEQ_OFF 

◆ ltm4700_status_type

Enumerator
LTM4700_STATUS_ALL_TYPE 
LTM4700_STATUS_BYTE_TYPE 
LTM4700_STATUS_VOUT_TYPE 
LTM4700_STATUS_IOUT_TYPE 
LTM4700_STATUS_INPUT_TYPE 
LTM4700_STATUS_TEMP_TYPE 
LTM4700_STATUS_CML_TYPE 
LTM4700_STATUS_MFR_SPECIFIC_TYPE 
LTM4700_STATUS_WORD_TYPE 

◆ ltm4700_timing_type

Enumerator
LTM4700_TON_DELAY_TYPE 
LTM4700_TOFF_DELAY_TYPE 
LTM4700_RETRY_DELAY 
LTM4700_RESTART_DELAY 

◆ ltm4700_value_type

Enumerator
LTM4700_VIN 
LTM4700_IIN 
LTM4700_VOUT 
LTM4700_IOUT 
LTM4700_TEMP_EXT 
LTM4700_TEMP_IC 
LTM4700_FREQ 
LTM4700_POUT 
LTM4700_PIN 
LTM4700_IOUT_PEAK 
LTM4700_VOUT_PEAK 
LTM4700_VIN_PEAK 
LTM4700_TEMP_PEAK 

Function Documentation

◆ ltm4700_clear_peaks()

int ltm4700_clear_peaks ( struct ltm4700_dev * dev)

Clear all peak value tracking registers.

Parameters
dev- Device structure
Returns
0 in case of success, negative error code otherwise

Clear all peak value tracking registers.

Parameters
dev- The device structure
Returns
0 in case of success, negative error code otherwise

◆ ltm4700_init()

int ltm4700_init ( struct ltm4700_dev ** device,
struct ltm4700_init_param * init_param )

Initialize the LTM4700 device structure.

Parameters
device- Pointer to the device structure pointer
init_param- Initialization parameters
Returns
0 in case of success, negative error code otherwise

Initialize the LTM4700 device structure.

Parameters
device- The device structure
init_param- Initialization parameters
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_nvm_cmd()

int ltm4700_nvm_cmd ( struct ltm4700_dev * dev,
enum ltm4700_nvm_cmd_type cmd )

Execute NVM/EEPROM user commands.

Parameters
dev- Device structure
cmd- NVM command type to execute
Returns
0 in case of success, negative error code otherwise

Execute NVM/EEPROM user commands.

Parameters
dev- The device structure
cmd- NVM command type
Returns
0 in case of success, negative error code otherwise

◆ ltm4700_read_block_data()

int ltm4700_read_block_data ( struct ltm4700_dev * dev,
int page,
uint8_t cmd,
uint8_t * data,
size_t nbytes )

Read a block of bytes from device.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
data- Buffer to store read data
nbytes- Number of bytes to read
Returns
0 in case of success, negative error code otherwise

Read a block of bytes from device.

Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
data- Read data buffer
nbytes- Number of bytes to read
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_read_byte()

int ltm4700_read_byte ( struct ltm4700_dev * dev,
int page,
uint8_t cmd,
uint8_t * data )

Perform a PMBus read_byte operation.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
data- Pointer to store read data
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
data- Read data
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_read_status()

int ltm4700_read_status ( struct ltm4700_dev * dev,
uint8_t channel,
enum ltm4700_status_type status_type,
struct ltm4700_status * status )

Read status information from device.

Parameters
dev- Device structure
channel- Channel number (0 or 1)
status_type- Type of status to read
status- Pointer to store status information
Returns
0 in case of success, negative error code otherwise

Read status information from device.

Parameters
dev- The device structure
channel- Channel number
status_type- Type of status to read
status- Status structure to fill
Returns
0 in case of success, negative error code otherwise

◆ ltm4700_read_value()

int ltm4700_read_value ( struct ltm4700_dev * dev,
uint8_t channel,
enum ltm4700_value_type value_type,
int * value )

Read specific value type (voltage, current, power, temperature)

Parameters
dev- Device structure
channel- Channel number (0 or 1)
value_type- Type of value to read
value- Pointer to store read value
Returns
0 in case of success, negative error code otherwise

Read specific value type (voltage, current, power, temperature)

Parameters
dev- The device structure
channel- Channel number
value_type- Type of value to read
value- Read value in milli-units (mV, mA, mW, m°C, etc.)
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_read_word()

int ltm4700_read_word ( struct ltm4700_dev * dev,
int page,
uint8_t cmd,
uint16_t * word )

Perform a PMBus read_word operation.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
word- Pointer to store read word
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
word- Read word data
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_read_word_data()

int ltm4700_read_word_data ( struct ltm4700_dev * dev,
int page,
uint8_t cmd,
int * data )

Perform a PMBus read_word operation then perform conversion.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
data- Pointer to store converted data
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
data- Converted data in milli-units (mV, mA, mW, m°C, etc.)
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_remove()

int ltm4700_remove ( struct ltm4700_dev * dev)

Free or remove device instance.

Parameters
dev- Device structure
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_send_byte()

int ltm4700_send_byte ( struct ltm4700_dev * dev,
int page,
uint8_t cmd )

Send a PMBus command to the device.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_set_operation()

int ltm4700_set_operation ( struct ltm4700_dev * dev,
uint8_t channel,
enum ltm4700_operation_type operation )

Set operation mode for specified channel.

Parameters
dev- Device structure
channel- Channel number (0 or 1)
operation- Operation type to set
Returns
0 in case of success, negative error code otherwise

Set operation mode for specified channel.

Parameters
dev- The device structure
channel- Channel number (0, 1, or LTM4700_CHAN_ALL for broadcast)
operation- Operation type
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_set_page()

int ltm4700_set_page ( struct ltm4700_dev * dev,
int page )

Set PMBus page and phase.

Parameters
dev- Device structure
page- Page number (0 or 1)
Returns
0 in case of success, negative error code otherwise

Set PMBus page and phase.

Parameters
dev- The device structure
page- Page number (0 or 1 for dual channel device, or 0xFF for broadcast)
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_set_timing()

int ltm4700_set_timing ( struct ltm4700_dev * dev,
uint8_t channel,
enum ltm4700_timing_type timing_type,
int time )

Set timing values in microseconds.

Parameters
dev- Device structure
channel- Channel number (0 or 1)
timing_type- Type of timing parameter to set
time- Time value in microseconds
Returns
0 in case of success, negative error code otherwise

Set timing values in microseconds.

Parameters
dev- The device structure
channel- Channel number
timing_type- Type of timing to set
time- Time value in microseconds
Returns
0 in case of success, negative error code otherwise

◆ ltm4700_software_reset()

int ltm4700_software_reset ( struct ltm4700_dev * dev)

Perform software reset of the device.

Parameters
dev- Device structure
Returns
0 in case of success, negative error code otherwise

Perform software reset of the device.

Parameters
dev- The device structure
Returns
0 in case of success, negative error code otherwise

◆ ltm4700_verify_manufacturer_id()

int ltm4700_verify_manufacturer_id ( struct ltm4700_dev * dev)

Verify manufacturer ID.

Parameters
dev- Device structure
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_verify_manufacturer_model()

int ltm4700_verify_manufacturer_model ( struct ltm4700_dev * dev)

Verify manufacturer model.

Parameters
dev- Device structure
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_vout_margin()

int ltm4700_vout_margin ( struct ltm4700_dev * dev,
uint8_t channel,
int margin_low,
int margin_high )

Set VOUT margins for overvoltage/undervoltage protection.

Parameters
dev- Device structure
channel- Channel number (0 or 1)
margin_low- Low margin voltage in microvolts
margin_high- High margin voltage in microvolts
Returns
0 in case of success, negative error code otherwise

Set VOUT margins for overvoltage/undervoltage protection.

Parameters
dev- The device structure
channel- Channel number
margin_low- Low margin value in microvolts
margin_high- High margin value in microvolts
Returns
0 in case of success, negative error code otherwise

◆ ltm4700_vout_value()

int ltm4700_vout_value ( struct ltm4700_dev * dev,
uint8_t channel,
int vout_command,
int vout_max )

Set VOUT parameters: VOUT_COMMAND and VOUT_MAX.

Parameters
dev- Device structure
channel- Channel number (0 or 1)
vout_command- Output voltage command in microvolts
vout_max- Maximum output voltage in microvolts
Returns
0 in case of success, negative error code otherwise

Set VOUT parameters: VOUT_COMMAND and VOUT_MAX.

Parameters
dev- The device structure
channel- Channel number
vout_command- VOUT command value in microvolts
vout_max- VOUT max value in microvolts
Returns
0 in case of success, negative error code otherwise

◆ ltm4700_write_byte()

int ltm4700_write_byte ( struct ltm4700_dev * dev,
int page,
uint8_t cmd,
uint8_t value )

Perform a PMBus write_byte operation.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
value- Value to write
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
value- Data to write
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_write_word()

int ltm4700_write_word ( struct ltm4700_dev * dev,
int page,
uint8_t cmd,
uint16_t word )

Perform a PMBus write_word operation.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
word- Word value to write
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
word- Word data to write
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4700_write_word_data()

int ltm4700_write_word_data ( struct ltm4700_dev * dev,
int page,
uint8_t cmd,
int data )

Perform conversion then perform a PMBus write_word operation.

Parameters
dev- Device structure
page- Page number
cmd- Command byte
data- Data value to convert and write
Returns
0 in case of success, negative error code otherwise
Parameters
dev- The device structure
page- Page number for paged commands
cmd- PMBus command
data- Data in milli-units (mV, mA, mW, m°C, etc.) to convert and write
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function: