| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

LTC3589.cpp
Go to the documentation of this file.
1 /*!
2 LTC3589: 8-Output Regulator with Sequencing and I2C
3
4 @verbatim
5
6 The LTC3589 is a complete power management solution for ARM and ARM-based
7 processors and advanced portable microprocessor systems. The device contains
8 three step-down DC/DC converters for core, memory and SoC rails, a
9 buck-boost regulator for I/O at 1.8V to 5V and three 250mA LDO regulators
10 for low noise analog supplies. An I2C serial port is used to control enables,
11 output voltage levels, dynamic voltage scaling, operating modes and status
12 reporting.
13 Regulator start-up is sequenced by connecting outputs to enable pins in the
14 desired order or programmed via the I2C port. System power-on, power-off,
15 and reset functions are controlled by pushbutton interface, pin inputs, or
16 I2C interface.
17 The LTC3589 supports i.MX53/51, PXA and OMAP processors with eight
18 independent rails at appropriate power levels. Other features include
19 interface signals such as the VSTB pin that simultaneously toggle up to
20 four rails between programmed run and standby output voltages. The device
21 is available in a low profile 40-pin 6mm x 6mm exposed pad QFN package.
22
23 I2C DATA FORMAT (MSB FIRST)
24
25 @endverbatim
26
27 http://www.linear.com/product/LTC3589
28
29 http://www.linear.com/product/LTC3589#demoboards
30
31
32 Copyright 2018(c) Analog Devices, Inc.
33
34 All rights reserved.
35
36 Redistribution and use in source and binary forms, with or without
37 modification, are permitted provided that the following conditions are met:
38 - Redistributions of source code must retain the above copyright
39 notice, this list of conditions and the following disclaimer.
40 - Redistributions in binary form must reproduce the above copyright
41 notice, this list of conditions and the following disclaimer in
42 the documentation and/or other materials provided with the
43 distribution.
44 - Neither the name of Analog Devices, Inc. nor the names of its
45 contributors may be used to endorse or promote products derived
46 from this software without specific prior written permission.
47 - The use of this software may or may not infringe the patent rights
48 of one or more patent holders. This license does not release you
49 from the requirement that you obtain separate licenses from these
50 patent holders to use this software.
51 - Use of the software either in source or binary form, must be run
52 on or directly connected to an Analog Devices Inc. component.
53
54 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
55 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
56 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
57 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
58 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
59 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
60 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
61 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
62 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
63 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64 */
65
66 //! @ingroup Switching_Regulators
67 //! @{
68 //! @defgroup LTC3589 LTC3589: 8-Output Regulator with Sequencing and I2C
69 //! @}
70
71 /*! @file
72 @ingroup LTC3589
73 Library for LTC3589: 8-Output Regulator with Sequencing and I2C
74 */
75
76 #include <Arduino.h>
77 #include <stdint.h>
78 #include <math.h>
79 #include "Linduino.h"
80 #include "LT_I2C.h"
81 #include "LTC3589.h"
82
83 // Reads an 8-bit register from the LTC3589 using the standard repeated start format.
84 int8_t LTC3589_register_read(uint8_t i2c_address, uint8_t register_address, uint8_t *register_data)
85 {
86 int8_t ack = 0;
87 ack = i2c_read_byte_data(i2c_address, register_address, register_data);
88 return(ack);
89 }
90
91 // Writes to an 8-bit register inside the LTC3589 using the standard I2C repeated start format.
92 int8_t LTC3589_register_write(uint8_t i2c_address, uint8_t register_address, uint8_t register_data)
93 {
94 int8_t ack = 0;
95 ack = i2c_write_byte_data(i2c_address, register_address, register_data);
96 return(ack);
97 }
98
99 // Sets any bit inside the LTC3589 using the standard I2C repeated start format.
100 int8_t LTC3589_bit_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
101 {
102 uint8_t register_data;
103 uint8_t bit_mask;
104 int8_t ack = 0;
105 bit_mask = 0x01 << bit_number;
106 ack |= LTC3589_register_read(i2c_address, register_address, &register_data); //Read register
107 register_data = register_data | bit_mask; //Set the bit at bit_address
108 ack |= LTC3589_register_write(i2c_address, register_address, register_data); //Write new data to register
109 return(ack);
110 }
111
112 // Clears any bit inside the LTC3589 using the standard I2C repeated start format.
113 int8_t LTC3589_bit_clear(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
114 {
115 uint8_t register_data;
116 uint8_t bit_mask;
117 int8_t ack = 0;
118 bit_mask = 0x01 << bit_number;
119 ack |= LTC3589_register_read(i2c_address, register_address, &register_data); //Read register
120 register_data = register_data & (~bit_mask); //Clears the bit at bit_address
121 ack |= LTC3589_register_write(i2c_address, register_address, register_data); //Write new data to register
122 return(ack);
123 }
124
125 // Writes any bit inside the LTC3589 using the standard I2C repeated start format.
126 int8_t LTC3589_bit_write(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number, uint8_t bit_data)
127 {
128 uint8_t register_data;
129 uint8_t bit_mask;
130 int8_t ack = 0;
131 bit_mask = 0x01 << bit_number;
132 ack |= LTC3589_register_read(i2c_address, register_address, &register_data); //Read register
133 register_data = register_data & (~bit_mask); //Clears the bit at bit_address
134 register_data = register_data | ((bit_data & 0x01) << bit_number); //Writes the new bit
135 ack |= LTC3589_register_write(i2c_address, register_address, register_data); //Write new data to register
136 return(ack);
137 }
138
139 // Reads the value of any bit in any register or the LTC3589.
140 uint8_t LTC3589_bit_is_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
141 {
142 uint8_t register_data;
143 int8_t ack = 0;
144 ack |= LTC3589_register_read(i2c_address, register_address, &register_data);
145 register_data = register_data >> bit_number; //Clears everything but the bit of interest
146 return (register_data & 0x01);
147 }
148
149
150 // Sets the output voltage of LDO2.
151 float LTC3589_set_ldo2_output_voltage(uint8_t i2c_address, uint8_t register_address, float output_voltage)
152 {
153 uint8_t register_data;
154 float fb_ref = 0;
155 int8_t nack = 0;
156 if (register_address == 0x32 | register_address == 0x33)
157 {
158 fb_ref = output_voltage / (1 + LTC3589_RES_LDO2_RTOP/LTC3589_RES_LDO2_RBOT); //Generates desired FB reference input for given output voltage.
159 return (1 + LTC3589_RES_LDO2_RTOP/LTC3589_RES_LDO2_RBOT) * LTC3589_set_ldo2_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
160 }
161 }
162
163 // Sets the output voltage of any buck.
164 float LTC3589_set_buck_output_voltage(uint8_t i2c_address, uint8_t register_address, float output_voltage)
165 {
166 uint8_t register_data;
167 float fb_ref = 0;
168 int8_t nack = 0;
169 if (register_address == 0x23 | register_address == 0x24)
170 {
171 fb_ref = output_voltage / (1 + LTC3589_RES_BUCK1_RTOP/LTC3589_RES_BUCK1_RBOT); //Generates desired FB reference input for given output voltage.
172 return (1 + LTC3589_RES_BUCK1_RTOP/LTC3589_RES_BUCK1_RBOT) * LTC3589_set_buck_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
173 }
174 if (register_address == 0x26 | register_address == 0x27)
175 {
176 fb_ref = output_voltage / (1 + LTC3589_RES_BUCK2_RTOP/LTC3589_RES_BUCK2_RBOT); //Generates desired FB reference input for given output voltage.
177 return (1 + LTC3589_RES_BUCK2_RTOP/LTC3589_RES_BUCK2_RBOT) * LTC3589_set_buck_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
178 }
179 if (register_address == 0x29 | register_address == 0x2A)
180 {
181 fb_ref = output_voltage / (1 + LTC3589_RES_BUCK3_RTOP/LTC3589_RES_BUCK3_RBOT); //Generates desired FB reference input for given output voltage.
182 return (1 + LTC3589_RES_BUCK3_RTOP/LTC3589_RES_BUCK3_RBOT) * LTC3589_set_buck_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
183 }
184 }
185
186 // Writes the Feedback Reference Voltage of LDO2.
187 float LTC3589_set_ldo2_fb_ref(uint8_t i2c_address, uint8_t register_address, float fb_ref_voltage)
188 {
189 uint8_t register_data;
190 uint8_t fb_ref_data = 0;
191 int8_t nack = 0;
192 fb_ref_data = (uint8_t) ((fb_ref_voltage + 6.25 - 362.5) / 12.5); //Generates 5-bit code for closest allowable value to user's chosen reference voltage.
193 nack |= LTC3589_register_read(i2c_address, register_address, &register_data); //Read current register value
194 register_data = register_data & (~LTC3589_FB_REF_MASK); //Clears existing feedback reference bits
195 register_data = register_data | fb_ref_data;
196 nack |= LTC3589_register_write(i2c_address, register_address, register_data); //Writes new register value
197 nack |= LTC3589_set_go_bits(i2c_address);
198 return (362.5 + (fb_ref_data * 12.5));
199 }
200
201 // Writes the Feedback Reference Voltage of any buck.
202 float LTC3589_set_buck_fb_ref(uint8_t i2c_address, uint8_t register_address, float fb_ref_voltage)
203 {
204 uint8_t register_data;
205 uint8_t fb_ref_data = 0;
206 int8_t nack = 0;
207 fb_ref_data = (uint8_t) ((fb_ref_voltage + 6.25 - 362.5) / 12.5); //Generates 5-bit code for closest allowable value to user's chosen reference voltage.
208 nack |= LTC3589_register_read(i2c_address, register_address, &register_data); //Read current register value
209 register_data = register_data & (~LTC3589_FB_REF_MASK); //Clears existing feedback reference bits
210 register_data = register_data | fb_ref_data;
211 nack |= LTC3589_register_write(i2c_address, register_address, register_data); //Writes new register value
212 nack |= LTC3589_set_go_bits(i2c_address);
213 return (362.5 + (fb_ref_data * 12.5));
214 }
215
216 // Calculates the maximum output voltage of LDO2 in mV based on the feedback resistors.
217 float LTC3589_ldo2_vout_max()
218 {
219 return ((1 + (LTC3589_RES_LDO2_RTOP/LTC3589_RES_LDO2_RBOT)) * 750);
220 }
221
222 // Calculates the minimum output voltage of LDO2 mV based on the feedback resistors.
223 float LTC3589_ldo2_vout_min()
224 {
225 return ((1 + (LTC3589_RES_LDO2_RTOP/LTC3589_RES_LDO2_RBOT)) * 362.5);
226 }
227
228 // Calculates the maximum output voltage of any buck in mV based on the feedback resistors.
229 float LTC3589_buck_vout_max(uint8_t buck_number)
230 {
231 switch (buck_number)
232 {
233 case 1:
234 return ((1 + (LTC3589_RES_BUCK1_RTOP/LTC3589_RES_BUCK1_RBOT)) * 750);
235 break;
236 case 2:
237 return ((1 + (LTC3589_RES_BUCK2_RTOP/LTC3589_RES_BUCK2_RBOT)) * 750);
238 break;
239 case 3:
240 return ((1 + (LTC3589_RES_BUCK3_RTOP/LTC3589_RES_BUCK3_RBOT)) * 750);
241 break;
242 }
243 }
244
245 // Calculates the minimum output voltage of any buck in mV based on the feedback resistors.
246 float LTC3589_buck_vout_min(uint8_t buck_number)
247 {
248 switch (buck_number)
249 {
250 case 1:
251 return ((1 + LTC3589_RES_BUCK1_RTOP/LTC3589_RES_BUCK1_RBOT) * 362.5);
252 break;
253 case 2:
254 return ((1 + LTC3589_RES_BUCK2_RTOP/LTC3589_RES_BUCK2_RBOT) * 362.5);
255 break;
256 case 3:
257 return ((1 + LTC3589_RES_BUCK3_RTOP/LTC3589_RES_BUCK3_RBOT) * 362.5);
258 break;
259 }
260 }
261
262 // Selects the reference for LDO2.
263 int8_t LTC3589_select_ldo2_reference(uint8_t i2c_address, int8_t ref_char)
264 {
265 int8_t ack = 0;
266 if (ref_char == '1')
267 ack |= LTC3589_bit_clear(i2c_address, LTC3589_REG_VCCR, LTC3589_LDO2_REF_SELECT);
268 else if (ref_char == '2')
269 ack |= LTC3589_bit_set(i2c_address, LTC3589_REG_VCCR, LTC3589_LDO2_REF_SELECT);
270 ack |= LTC3589_set_go_bits(i2c_address);
271 return(ack);
272 }
273
274 // Selects the reference for the specified buck regulator(s).
275 int8_t LTC3589_select_buck_reference(uint8_t i2c_address, uint8_t buck_number, int8_t ref_char)
276 {
277 int8_t ack = 0;
278 if (buck_number == 0xFF)
279 {
280 ack |= LTC3589_select_buck_reference(i2c_address, 1, ref_char);
281 ack |= LTC3589_select_buck_reference(i2c_address, 2, ref_char);
282 ack |= LTC3589_select_buck_reference(i2c_address, 3, ref_char);
283 return(ack);
284 }
285 if (ref_char == '1')
286 ack |= LTC3589_bit_clear(i2c_address, LTC3589_REG_VCCR, (buck_number*2)-1);
287 else if (ref_char == '2')
288 ack |= LTC3589_bit_set(i2c_address, LTC3589_REG_VCCR, (buck_number*2)-1);
289 ack |= LTC3589_set_go_bits(i2c_address);
290 return(ack);
291 }
292
293 // Sets the switching mode for the specified buck regulator(s).
294 int8_t LTC3589_set_buck_mode(uint8_t i2c_address, uint8_t buck_number, uint8_t mode)
295 {
296 uint8_t register_data;
297 int8_t ack = 0;
298 if (buck_number == 0xFF)
299 {
300 ack |= LTC3589_set_buck_mode(i2c_address, 0x01, mode);
301 ack |= LTC3589_set_buck_mode(i2c_address, 0x02, mode);
302 ack |= LTC3589_set_buck_mode(i2c_address, 0x03, mode);
303 return(ack);
304 }
305 ack |= LTC3589_register_read(i2c_address, LTC3589_REG_SCR1, &register_data); //Read register
306 register_data = register_data & (~LTC3589_BUCK_MODE_MASK(buck_number)); //Clears the Mode bits in the Buck register
307 register_data = register_data | (mode << ((buck_number*2)-2));
308 ack |= LTC3589_register_write(i2c_address, LTC3589_REG_SCR1, register_data); //Writes new register value
309 return(ack);
310 }
311
312 // Sets the switching mode for the buck-boost regulator.
313 int8_t LTC3589_set_buckboost_mode(uint8_t i2c_address, uint8_t mode)
314 {
315 uint8_t register_data;
316 int8_t ack = 0;
317 ack |= LTC3589_bit_write(i2c_address, LTC3589_REG_SCR1, LTC3589_BUCKBOOST_MODE, mode); //Writes new mode-bit value
318 return(ack);
319 }
320
321 // Sets the start-up mode for all regulators.
322 int8_t LTC3589_set_startup_mode(uint8_t i2c_address, uint8_t startup_bit)
323 {
324 int8_t ack = 0;
325 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_SCR2, LTC3589_BUCK1_STARTUP, startup_bit);
326 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_SCR2, LTC3589_BUCK2_STARTUP, startup_bit);
327 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_SCR2, LTC3589_BUCK3_STARTUP, startup_bit);
328 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_SCR2, LTC3589_BB_STARTUP, startup_bit);
329 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_SCR2, LTC3589_LDO2_STARTUP, startup_bit);
330 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_SCR2, LTC3589_LDO3_STARTUP, startup_bit);
331 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_SCR2, LTC3589_LDO4_STARTUP, startup_bit);
332 return(ack);
333 }
334
335 // Sets the PGOOD mask bit for all bucks and LDO2.
336 int8_t LTC3589_set_pgood_mask(uint8_t i2c_address, uint8_t pgood_bit)
337 {
338 int8_t ack = 0;
339 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_B1DTV1, LTC3589_BUCK_PG_MASK, pgood_bit);
340 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_B2DTV1, LTC3589_BUCK_PG_MASK, pgood_bit);
341 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_B3DTV1, LTC3589_BUCK_PG_MASK, pgood_bit);
342 ack |= LTC3589_bit_write(LTC3589_I2C_ADDRESS, LTC3589_REG_L2DTV1, LTC3589_LDO2_PG_MASK, pgood_bit);
343 return(ack);
344 }
345
346 // Sets LDO4 output voltage on the LTC3589.
347 int8_t LTC3589_set_ldo4_voltage(uint8_t i2c_address, uint8_t ldo4_output_voltage_code)
348 {
349 int8_t ack = 0;
350 uint8_t register_data;
351 ack |= LTC3589_register_read(i2c_address, LTC3589_REG_L2DTV2, &register_data); //Read register
352 register_data = register_data & (~LTC3589_LDO4_VOLTAGE_MASK); //Clears the LDO4 Output Voltage bits in the L2DTV2 register
353 register_data = register_data | (ldo4_output_voltage_code << 5);
354 ack |= LTC3589_register_write(i2c_address, LTC3589_REG_L2DTV2, register_data); //Writes new register value
355 return(ack);
356 }
357
358 // Sets the dynamic reference slew rate for the regulator(s).
359 int8_t LTC3589_set_regulator_slew(uint8_t i2c_address, uint8_t regulator_mask, uint8_t slew_rate)
360 {
361 uint8_t register_data;
362 uint8_t bit_shift = log(regulator_mask/3) / log(2);
363 int8_t ack = 0;
364 if (regulator_mask == 0xFF)
365 {
366 ack |= LTC3589_set_regulator_slew(i2c_address, LTC3589_BUCK1_SLEW_MASK, slew_rate);
367 ack |= LTC3589_set_regulator_slew(i2c_address, LTC3589_BUCK2_SLEW_MASK, slew_rate);
368 ack |= LTC3589_set_regulator_slew(i2c_address, LTC3589_BUCK3_SLEW_MASK, slew_rate);
369 ack |= LTC3589_set_regulator_slew(i2c_address, LTC3589_LDO2_SLEW_MASK, slew_rate);
370 return(ack);
371 }
372 ack |= LTC3589_register_read(i2c_address, LTC3589_REG_VRRCR, &register_data); //Read register
373 register_data = register_data & (~regulator_mask); //Clears the Mode bits in the Buck register
374 register_data = register_data | (slew_rate << bit_shift);
375 ack |= LTC3589_register_write(i2c_address, LTC3589_REG_VRRCR, register_data); //Writes new register value
376 return(ack);
377 }
378
379 // Sets the switch DV/DT control for the buck regulators.
380 int8_t LTC3589_set_switch_dvdt_control(uint8_t i2c_address, uint8_t dvdt_control_bits)
381 {
382 uint8_t register_data;
383 int8_t ack = 0;
384 ack |= LTC3589_register_read(i2c_address, LTC3589_REG_B1DTV1, &register_data);
385 register_data = register_data & (~LTC3589_BUCK_DVDT_MASK);
386 register_data = register_data | (dvdt_control_bits << 6);
387 ack |= LTC3589_register_write(i2c_address, LTC3589_REG_B1DTV1, register_data);
388 return(ack);
389 }
390
391 // Sets all four GO bits in the VCCR register.
392 int8_t LTC3589_set_go_bits(uint8_t i2c_address)
393 {
394 int8_t ack = 0;
395 ack |= LTC3589_bit_set(i2c_address, LTC3589_REG_VCCR, LTC3589_BUCK1_GO);
396 ack |= LTC3589_bit_set(i2c_address, LTC3589_REG_VCCR, LTC3589_BUCK2_GO);
397 ack |= LTC3589_bit_set(i2c_address, LTC3589_REG_VCCR, LTC3589_BUCK3_GO);
398 ack |= LTC3589_bit_set(i2c_address, LTC3589_REG_VCCR, LTC3589_LDO2_GO);
399 return(ack);
400 }
LTC3589_BUCKBOOST_MODE
#define LTC3589_BUCKBOOST_MODE
Definition: LTC3589.h:119
LTC3589_set_ldo2_fb_ref
float LTC3589_set_ldo2_fb_ref(uint8_t i2c_address, uint8_t register_address, float fb_ref_voltage)
Writes the Feedback Reference Voltage of LDO2.
Definition: LTC3589.cpp:187
LTC3589_BUCK1_SLEW_MASK
#define LTC3589_BUCK1_SLEW_MASK
Definition: LTC3589.h:223
LTC3589_bit_write
int8_t LTC3589_bit_write(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number, uint8_t bit_data)
Writes any bit inside the LTC3589 using the standard I2C repeated start format.
Definition: LTC3589.cpp:126
i2c_address
uint8_t i2c_address
LTC3589_set_switch_dvdt_control
int8_t LTC3589_set_switch_dvdt_control(uint8_t i2c_address, uint8_t dvdt_control_bits)
Sets the switch DV/DT control for the buck regulators.
Definition: LTC3589.cpp:380
LTC3589_BUCK_MODE_MASK
#define LTC3589_BUCK_MODE_MASK(num)
Definition: LTC3589.h:214
LTC3589_REG_VCCR
#define LTC3589_REG_VCCR
Definition: LTC3589.h:101
LTC3589_LDO3_STARTUP
#define LTC3589_LDO3_STARTUP
Definition: LTC3589.h:140
LTC3589_LDO2_STARTUP
#define LTC3589_LDO2_STARTUP
Definition: LTC3589.h:141
LTC3589_BUCK1_STARTUP
#define LTC3589_BUCK1_STARTUP
Definition: LTC3589.h:145
LTC3589_LDO4_STARTUP
#define LTC3589_LDO4_STARTUP
Definition: LTC3589.h:139
LTC3589_RES_BUCK3_RBOT
#define LTC3589_RES_BUCK3_RBOT
Definition: LTC3589.h:90
LTC3589_LDO2_PG_MASK
#define LTC3589_LDO2_PG_MASK
Definition: LTC3589.h:179
i2c_read_byte_data
int8_t i2c_read_byte_data(uint8_t address, uint8_t command, uint8_t *value)
Read a byte of data at register specified by "command", store in "value".
Definition: LT_I2C.cpp:124
LTC3589_ldo2_vout_min
float LTC3589_ldo2_vout_min()
Calculates the minimum output voltage of LDO2 mV based on the feedback resistors. ...
Definition: LTC3589.cpp:223
LTC3589_REG_SCR2
#define LTC3589_REG_SCR2
Definition: LTC3589.h:100
LTC3589_select_ldo2_reference
int8_t LTC3589_select_ldo2_reference(uint8_t i2c_address, int8_t ref_char)
Selects the reference for LDO2.
Definition: LTC3589.cpp:263
LTC3589_REG_B2DTV1
#define LTC3589_REG_B2DTV1
Definition: LTC3589.h:106
Linduino.h
Header File for Linduino Libraries and Demo Code.
LTC3589.h
LTC3589: 8-Output Regulator with Sequencing and I2C.
LTC3589_BUCK3_STARTUP
#define LTC3589_BUCK3_STARTUP
Definition: LTC3589.h:143
LTC3589_ldo2_vout_max
float LTC3589_ldo2_vout_max()
Calculates the maximum output voltage of LDO2 in mV based on the feedback resistors.
Definition: LTC3589.cpp:217
LTC3589_RES_BUCK2_RBOT
#define LTC3589_RES_BUCK2_RBOT
Definition: LTC3589.h:88
LTC3589_BUCK2_STARTUP
#define LTC3589_BUCK2_STARTUP
Definition: LTC3589.h:144
LTC3589_set_startup_mode
int8_t LTC3589_set_startup_mode(uint8_t i2c_address, uint8_t startup_bit)
Sets the start-up mode for all regulators.
Definition: LTC3589.cpp:322
LTC3589_REG_VRRCR
#define LTC3589_REG_VRRCR
Definition: LTC3589.h:105
LTC3589_RES_LDO2_RTOP
#define LTC3589_RES_LDO2_RTOP
Definition: LTC3589.h:91
LTC3589_I2C_ADDRESS
#define LTC3589_I2C_ADDRESS
Definition: LTC3589.h:79
LTC3589_BUCK2_SLEW_MASK
#define LTC3589_BUCK2_SLEW_MASK
Definition: LTC3589.h:222
LTC3589_set_buck_fb_ref
float LTC3589_set_buck_fb_ref(uint8_t i2c_address, uint8_t register_address, float fb_ref_voltage)
Writes the Feedback Reference Voltage of any buck.
Definition: LTC3589.cpp:202
LTC3589_set_go_bits
int8_t LTC3589_set_go_bits(uint8_t i2c_address)
Sets all of the GO bits in the VCCR register.
Definition: LTC3589.cpp:392
LTC3589_BUCK_PG_MASK
#define LTC3589_BUCK_PG_MASK
Definition: LTC3589.h:164
LTC3589_REG_L2DTV2
#define LTC3589_REG_L2DTV2
Definition: LTC3589.h:111
LTC3589_LDO2_SLEW_MASK
#define LTC3589_LDO2_SLEW_MASK
Definition: LTC3589.h:220
LTC3589_RES_BUCK1_RTOP
#define LTC3589_RES_BUCK1_RTOP
Definition: LTC3589.h:85
LTC3589_RES_BUCK1_RBOT
#define LTC3589_RES_BUCK1_RBOT
Definition: LTC3589.h:86
LTC3589_buck_vout_max
float LTC3589_buck_vout_max(uint8_t buck_number)
Calculates the maximum output voltage of any buck in mV based on the feedback resistors.
Definition: LTC3589.cpp:229
LTC3589_LDO2_REF_SELECT
#define LTC3589_LDO2_REF_SELECT
Definition: LTC3589.h:151
LTC3589_register_write
int8_t LTC3589_register_write(uint8_t i2c_address, uint8_t register_address, uint8_t register_data)
Writes to an 8-bit register inside the LTC3589 using the standard I2C repeated start format...
Definition: LTC3589.cpp:92
LTC3589_FB_REF_MASK
#define LTC3589_FB_REF_MASK
Definition: LTC3589.h:219
i2c_write_byte_data
int8_t i2c_write_byte_data(uint8_t address, uint8_t command, uint8_t value)
Write a byte of data to register specified by "command".
Definition: LT_I2C.cpp:155
LTC3589_buck_vout_min
float LTC3589_buck_vout_min(uint8_t buck_number)
Calculates the minimum output voltage of any buck in mV based on the feedback resistors.
Definition: LTC3589.cpp:246
LTC3589_RES_BUCK3_RTOP
#define LTC3589_RES_BUCK3_RTOP
Definition: LTC3589.h:89
LTC3589_BUCK_DVDT_MASK
#define LTC3589_BUCK_DVDT_MASK
Definition: LTC3589.h:218
LTC3589_BB_STARTUP
#define LTC3589_BB_STARTUP
Definition: LTC3589.h:142
LTC3589_LDO2_GO
#define LTC3589_LDO2_GO
Definition: LTC3589.h:152
LTC3589_select_buck_reference
int8_t LTC3589_select_buck_reference(uint8_t i2c_address, uint8_t buck_number, int8_t ref_char)
Selects the reference for the specified buck regulator(s).
Definition: LTC3589.cpp:275
LTC3589_set_regulator_slew
int8_t LTC3589_set_regulator_slew(uint8_t i2c_address, uint8_t regulator_mask, uint8_t slew_rate)
Sets the dynamnic reference slew rate for the regulator(s).
Definition: LTC3589.cpp:359
LTC3589_bit_is_set
uint8_t LTC3589_bit_is_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
Reads the value of any bit in any register or the LTC3589.
Definition: LTC3589.cpp:140
LTC3589_BUCK2_GO
#define LTC3589_BUCK2_GO
Definition: LTC3589.h:156
LT_I2C.h
LT_I2C: Routines to communicate with ATmega328P&#39;s hardware I2C port.
LTC3589_REG_B1DTV1
#define LTC3589_REG_B1DTV1
Definition: LTC3589.h:103
LTC3589_set_buckboost_mode
int8_t LTC3589_set_buckboost_mode(uint8_t i2c_address, uint8_t mode)
Sets the switching mode for the buck-boost regulator.
Definition: LTC3589.cpp:313
LTC3589_set_buck_output_voltage
float LTC3589_set_buck_output_voltage(uint8_t i2c_address, uint8_t register_address, float output_voltage)
Sets the output voltage of any buck.
Definition: LTC3589.cpp:164
LTC3589_register_read
int8_t LTC3589_register_read(uint8_t i2c_address, uint8_t register_address, uint8_t *register_data)
Reads an 8-bit register from the LTC3589 using the standard repeated start format.
Definition: LTC3589.cpp:84
LTC3589_REG_L2DTV1
#define LTC3589_REG_L2DTV1
Definition: LTC3589.h:110
LTC3589_BUCK3_GO
#define LTC3589_BUCK3_GO
Definition: LTC3589.h:154
LTC3589_BUCK1_GO
#define LTC3589_BUCK1_GO
Definition: LTC3589.h:158
LTC3589_set_buck_mode
int8_t LTC3589_set_buck_mode(uint8_t i2c_address, uint8_t buck_number, uint8_t mode)
Sets the switching mode for the specified buck regulator(s).
Definition: LTC3589.cpp:294
LTC3589_bit_clear
int8_t LTC3589_bit_clear(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
Clears any bit inside the LTC3589 using the standard I2C repeated start format.
Definition: LTC3589.cpp:113
LTC3589_set_ldo2_output_voltage
float LTC3589_set_ldo2_output_voltage(uint8_t i2c_address, uint8_t register_address, float output_voltage)
Sets the output voltage of LDO2.
Definition: LTC3589.cpp:151
LTC3589_RES_LDO2_RBOT
#define LTC3589_RES_LDO2_RBOT
Definition: LTC3589.h:92
LTC3589_set_pgood_mask
int8_t LTC3589_set_pgood_mask(uint8_t i2c_address, uint8_t pgood_bit)
Sets the PGOOD mask bit for all bucks and LDO2.
Definition: LTC3589.cpp:336
LTC3589_BUCK3_SLEW_MASK
#define LTC3589_BUCK3_SLEW_MASK
Definition: LTC3589.h:221
LTC3589_RES_BUCK2_RTOP
#define LTC3589_RES_BUCK2_RTOP
Definition: LTC3589.h:87
LTC3589_set_ldo4_voltage
int8_t LTC3589_set_ldo4_voltage(uint8_t i2c_address, uint8_t ldo4_output_voltage_code)
Sets LDO4 output voltage on the LTC3589.
Definition: LTC3589.cpp:347
LTC3589_REG_SCR1
#define LTC3589_REG_SCR1
Definition: LTC3589.h:98
LTC3589_LDO4_VOLTAGE_MASK
#define LTC3589_LDO4_VOLTAGE_MASK
Definition: LTC3589.h:224
LTC3589_REG_B3DTV1
#define LTC3589_REG_B3DTV1
Definition: LTC3589.h:108
LTC3589_bit_set
int8_t LTC3589_bit_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
Sets any bit inside the LTC3589 using the standard I2C repeated start format.
Definition: LTC3589.cpp:100