45 #define PMB_OPERATION 0x01
46 #define PMB_ON_OFF_CONFIG 0x02
47 #define PMB_CLEAR_FAULTS 0x03
48 #define PMB_PHASE 0x04
49 #define PMB_PAGE_PLUS_WRITE 0x05
50 #define PMB_ZONE_ACTIVE 0x08
51 #define PMB_WRITE_PROTECT 0x10
52 #define PMB_STORE_DEFAULT_ALL 0x11
53 #define PMB_RESTORE_DEFAULT_ALL 0x12
54 #define PMB_STORE_DEFAULT_CODE 0x13
55 #define PMB_RESTORE_DEFAULT_CODE 0x14
56 #define PMB_STORE_USER_ALL 0x15
57 #define PMB_RESTORE_USER_ALL 0x16
58 #define PMB_STORE_USER_CODE 0x17
59 #define PMB_RESTORE_USER_CODE 0x18
60 #define PMB_CAPABILITY 0x19
61 #define PMB_VOUT_MODE 0x20
62 #define PMB_VOUT_COMMAND 0x21
63 #define PMB_VOUT_TRIM 0x22
64 #define PMB_VOUT_CAL_OFFSET 0x23
65 #define PMB_VOUT_MAX 0x24
66 #define PMB_VOUT_MARGIN_HIGH 0x25
67 #define PMB_VOUT_MARGIN_LOW 0x26
68 #define PMB_VOUT_TRANSITION_RATE 0x27
69 #define PMB_VOUT_DROOP 0x28
70 #define PMB_VOUT_SCALE_LOOP 0x29
71 #define PMB_VOUT_SCALE_MONITOR 0x2A
72 #define PMB_VOUT_MIN 0x2B
73 #define PMB_POUT_MAX 0x31
74 #define PMB_MAX_DUTY 0x32
75 #define PMB_FREQUENCY_SWITCH 0x33
76 #define PMB_POWER_MODE 0x34
77 #define PMB_VIN_ON 0x35
78 #define PMB_VIN_OFF 0x36
79 #define PMB_INTERLEAVE 0x37
80 #define PMB_IOUT_CAL_GAIN 0x38
81 #define PMB_IOUT_CAL_OFFSET 0x39
82 #define PMB_FAN_CONFIG_1_2 0x3A
83 #define PMB_FAN_COMMAND_1 0x3B
84 #define PMB_FAN_COMMAND_2 0x3C
85 #define PMB_FAN_CONFIG_3_4 0x3D
86 #define PMB_FAN_COMMAND_3 0x3E
87 #define PMB_FAN_COMMAND_4 0x3F
88 #define PMB_VOUT_OV_FAULT_LIMIT 0x40
89 #define PMB_VOUT_OV_FAULT_RESPONSE 0x41
90 #define PMB_VOUT_OV_WARN_LIMIT 0x42
91 #define PMB_VOUT_UV_WARN_LIMIT 0x43
92 #define PMB_VOUT_UV_FAULT_LIMIT 0x44
93 #define PMB_VOUT_UV_FAULT_RESPONSE 0x45
94 #define PMB_IOUT_OC_FAULT_LIMIT 0x46
95 #define PMB_IOUT_OC_FAULT_RESPONSE 0x47
96 #define PMB_IOUT_OC_LV_FAULT_LIMIT 0x48
97 #define PMB_IOUT_OC_LV_FAULT_RESPONSE 0x49
98 #define PMB_IOUT_OC_WARN_LIMIT 0x4A
99 #define PMB_IOUT_UC_FAULT_LIMIT 0x4B
100 #define PMB_IOUT_UC_FAULT_RESPONSE 0x4C
101 #define PMB_OT_FAULT_LIMIT 0x4F
102 #define PMB_OT_FAULT_RESPONSE 0x50
103 #define PMB_OT_WARN_LIMIT 0x51
104 #define PMB_UT_WARN_LIMIT 0x52
105 #define PMB_UT_FAULT_LIMIT 0x53
106 #define PMB_UT_FAULT_RESPONSE 0x54
107 #define PMB_VIN_OV_FAULT_LIMIT 0x55
108 #define PMB_VIN_OV_FAULT_RESPONSE 0x56
109 #define PMB_VIN_OV_WARN_LIMIT 0x57
110 #define PMB_VIN_UV_WARN_LIMIT 0x58
111 #define PMB_VIN_UV_FAULT_LIMIT 0x59
112 #define PMB_VIN_UV_FAULT_RESPONSE 0x5A
113 #define PMB_IIN_OC_FAULT_LIMIT 0x5B
114 #define PMB_IIN_OC_FAULT_RESPONSE 0x5C
115 #define PMB_IIN_OC_WARN_LIMIT 0x5D
116 #define PMB_POWER_GOOD_ON 0x5E
117 #define PMB_POWER_GOOD_OFF 0x5F
118 #define PMB_TON_DELAY 0x60
119 #define PMB_TON_RISE 0x61
120 #define PMB_TON_MAX_FAULT_LIMIT 0x62
121 #define PMB_TON_MAX_FAULT_RESPONSE 0x63
122 #define PMB_TOFF_DELAY 0x64
123 #define PMB_TOFF_FALL 0x65
124 #define PMB_TOFF_MAX_WARN_LIMIT 0x66
125 #define PMB_POUT_OP_FAULT_LIMIT 0x68
126 #define PMB_POUT_OP_FAULT_RESPONSE 0x69
127 #define PMB_POUT_OP_WARN_LIMIT 0x6A
128 #define PMB_PIN_OP_WARN_LIMIT 0x6B
129 #define PMB_STATUS_BYTE 0x78
130 #define PMB_STATUS_WORD 0x79
131 #define PMB_STATUS_VOUT 0x7A
132 #define PMB_STATUS_IOUT 0x7B
133 #define PMB_STATUS_INPUT 0x7C
134 #define PMB_STATUS_TEMPERATURE 0x7D
135 #define PMB_STATUS_CML 0x7E
136 #define PMB_STATUS_OTHER 0x7F
137 #define PMB_STATUS_MFR_SPECIFIC 0x80
138 #define PMB_STATUS_FANS_1_2 0x81
139 #define PMB_STATUS_FANS_3_4 0x82
140 #define PMB_READ_KWH_CONFIG 0x85
141 #define PMB_READ_EIN 0x86
142 #define PMB_READ_EOUT 0x87
143 #define PMB_READ_VIN 0x88
144 #define PMB_READ_IIN 0x89
145 #define PMB_READ_VCAP 0x8A
146 #define PMB_READ_VOUT 0x8B
147 #define PMB_READ_IOUT 0x8C
148 #define PMB_READ_TEMPERATURE_1 0x8D
149 #define PMB_READ_TEMPERATURE_2 0x8E
150 #define PMB_READ_TEMPERATURE_3 0x8F
151 #define PMB_READ_FAN_SPEED_1 0x90
152 #define PMB_READ_FAN_SPEED_2 0x91
153 #define PMB_READ_FAN_SPEED_3 0x92
154 #define PMB_READ_FAN_SPEED_4 0x93
155 #define PMB_READ_DUTY_CYCLE 0x94
156 #define PMB_READ_FREQUENCY 0x95
157 #define PMB_READ_POUT 0x96
158 #define PMB_READ_PIN 0x97
159 #define PMB_PMBUS_REVISION 0x98
160 #define PMB_MFR_ID 0x99
161 #define PMB_MFR_MODEL 0x9A
162 #define PMB_MFR_REVISION 0x9B
163 #define PMB_MFR_LOCATION 0x9C
164 #define PMB_MFR_DATE 0x9D
165 #define PMB_MFR_SERIAL 0x9E
166 #define PMB_APP_PROFILE_SUPPORT 0x9F
167 #define PMB_MFR_VIN_MIN 0xA0
168 #define PMB_MFR_VIN_MAX 0xA1
169 #define PMB_MFR_IIN_MAX 0xA2
170 #define PMB_MFR_PIN_MAX 0xA3
171 #define PMB_MFR_VOUT_MIN 0xA4
172 #define PMB_MFR_VOUT_MAX 0xA5
173 #define PMB_MFR_IOUT_MAX 0xA6
174 #define PMB_MFR_POUT_MAX 0xA7
175 #define PMB_MFR_TAMBIENT_MAX 0xA8
176 #define PMB_MFR_TAMBIENT_MIN 0xA9
177 #define PMB_MFR_EFFICIENCY_LL 0xAA
178 #define PMB_MFR_EFFICIENCY_HL 0xAB
179 #define PMB_MFR_PIN_ACCURACY 0xAC
180 #define PMB_IC_DEVICE_ID 0xAD
181 #define PMB_IC_DEVICE_REV 0xAE
182 #define PMB_USER_DATA_00 0xB0
183 #define PMB_USER_DATA_01 0xB1
184 #define PMB_USER_DATA_02 0xB2
185 #define PMB_USER_DATA_03 0xB3
186 #define PMB_USER_DATA_04 0xB4
187 #define PMB_USER_DATA_05 0xB5
188 #define PMB_USER_DATA_06 0xB6
189 #define PMB_USER_DATA_07 0xB7
190 #define PMB_USER_DATA_08 0xB8
191 #define PMB_USER_DATA_09 0xB9
192 #define PMB_USER_DATA_10 0xBA
193 #define PMB_USER_DATA_11 0xBB
194 #define PMB_USER_DATA_12 0xBC
195 #define PMB_USER_DATA_13 0xBD
196 #define PMB_USER_DATA_14 0xBE
197 #define PMB_USER_DATA_15 0xBF
198 #define PMB_MFR_MAX_TEMP_1 0xC0
199 #define PMB_MFR_MAX_TEMP_2 0xC1
200 #define PMB_MFR_MAX_TEMP_3 0xC2
207 #define PMBUS_RET_OK (1)
214 #define PMBUS_RET_ERROR (-1)
221 #define PMB_MAX_PACKET_SIZE SMB_MAX_PACKET_SIZE
228 #define PMBUS_ARA (0x0C)
256 #ifdef __MSP430_HAS_USCI__
267 extern void PMBus_processTimeoutInt();
270 #if (SMB_PEC_SUPPORTED == 1)
278 extern void PMBus_enablePEC();
287 extern void PMBus_disablePEC();
int8_t PMBus_cmdWriteWord(uint8_t slaveAddress, uint8_t commandId, uint8_t *txData, uint32_t timeout)
Writes a word to the PMBus slave.
Definition: pmbus.c:414
void PMBus_processInt()
I2C Interrupt Service routine.
Definition: pmbus.c:234
int8_t PMBus_cmdRead(uint8_t slaveAddress, uint8_t commandId, uint8_t *rxData, uint8_t *rxSize, uint32_t timeout)
Perform a PMBus read for the given PMBus command id.
Definition: pmbus.c:261
int8_t PMBus_cmdReceiveByte(uint8_t slaveAddress, uint8_t *rxData, uint32_t timeout)
Receives a data byte from the PMBus slave.
Definition: pmbus.c:463
int8_t PMBus_cmdBlockWriteBlockReadProcessCall(uint8_t slaveAddress, uint8_t commandId, uint8_t *txData, uint8_t txSize, uint8_t *rxData, uint8_t *rxSize, uint32_t timeout)
Sends a Block-Write, Block-Read, Process Call to the PMBus slave.
Definition: pmbus.c:608
int8_t PMBus_cmdSendByte(uint8_t slaveAddress, uint8_t txData, uint32_t timeout)
Sends byte to the PMBus slave.
Definition: pmbus.c:369
int8_t PMBus_cmdWriteByte(uint8_t slaveAddress, uint8_t commandId, uint8_t *txData, uint32_t timeout)
Writes a data byte to the PMBus slave.
Definition: pmbus.c:390
int8_t PMBus_cmdReadByte(uint8_t slaveAddress, uint8_t commandId, uint8_t *rxData, uint32_t timeout)
Reads a data byte from the PMBus slave.
Definition: pmbus.c:490
int8_t PMBus_cmdBlockRead(uint8_t slaveAddress, uint8_t commandId, uint8_t *rxData, uint8_t *rxSize, uint32_t timeout)
Reads a block of data from the PMBus slave.
Definition: pmbus.c:550
void PMBus_init(uint16_t i2cAddr, uint32_t busClk)
Initialize the PMBus Interface.
Definition: pmbus.c:225
int8_t PMBus_cmdBlockWrite(uint8_t slaveAddress, uint8_t commandId, uint8_t *txData, uint8_t txSize, uint32_t timeout)
Writes a data block the PMBus slave.
Definition: pmbus.c:438
int8_t PMBus_cmdReadWord(uint8_t slaveAddress, uint8_t commandId, uint8_t *rxData, uint32_t timeout)
Reads a data word from the PMBus slave.
Definition: pmbus.c:520
int8_t PMBus_ReceiveByteARA(uint8_t *rxData, uint32_t timeout)
Sends a Receive Byte to Alert Response Address to request.
Definition: pmbus.c:639
int8_t PMBus_cmdWrite(uint8_t slaveAddress, uint8_t commandId, uint8_t *txData, uint8_t txSize, uint32_t timeout)
Perform a PMBus write for the given PMBus command id.
Definition: pmbus.c:307
int8_t PMBus_cmdProcessCall(uint8_t slaveAddress, uint8_t commandByte, uint8_t *txData, uint8_t *rxData, uint32_t timeout)
Sends a Process call command to the PMBus slave.
Definition: pmbus.c:577