| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

LTC3676.cpp
Go to the documentation of this file.
1 /*!
2 LTC3676: Power management solution for application processors
3
4 @verbatim
5
6 The LTC3676 is a complete power management solution for advanced portable
7 application processor-based systems. The device contains four synchronous
8 step-down DC/DC converters for core, memory, I/O, and system on-chip (SoC)
9 rails and three 300mA LDO regulators for low noise analog supplies. The
10 LTC3676-1 has a 1.5A buck regulator configured to support DDR termination
11 plus a VTTR reference output. An I2C serial port is used to control regulator
12 enables, power-down sequencing, output voltage levels, dynamic voltage
13 scaling, operating modes and status reporting.
14 Regulator start-up is sequenced by connecting outputs to enable pins in the
15 desired order or via the I2C port. System power-on, power-off and reset
16 functions are controlled by pushbutton interface, pin inputs, or I2C.
17 The LTC3676 supports i.MX, PXA and OMAP processors with eight independent
18 rails at appropriate power levels. Other features include interface signals
19 such as the VSTB pin that toggles between programmed run and standby output
20 voltages on up to four rails simultaneously. The device is available in a
21 40-lead 6mm x 6mm QFN package.
22
23 I2C DATA FORMAT (MSB FIRST);
24
25 @endverbatim
26
27 http://www.linear.com/product/LTC3676
28
29 http://www.linear.com/product/LTC3676#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 /*! @file
67 @ingroup LTC3676
68 Library for LTC3676: Power management solution for application processors
69 */
70
71 #include <Arduino.h>
72 #include <stdint.h>
73 #include "Linduino.h"
74 #include "LT_I2C.h"
75 #include "LTC3676.h"
76
77 // Reads an 8-bit register from the LTC3676 using the standard repeated start format.
78 int8_t LTC3676_register_read(uint8_t i2c_address, uint8_t register_address, uint8_t *register_data)
79 {
80 int8_t ack = 0;
81 ack = i2c_read_byte_data(i2c_address, register_address, register_data);
82 return(ack);
83 }
84
85 // Writes to an 8-bit register inside the LTC3676 using the standard I2C repeated start format.
86 int8_t LTC3676_register_write(uint8_t i2c_address, uint8_t register_address, uint8_t register_data)
87 {
88 int8_t ack = 0;
89 ack = i2c_write_byte_data(i2c_address, register_address, register_data);
90 return(ack);
91 }
92
93
94 // Sets a bit within any register inside the LTC3676 using the standard I2C repeated start format.
95 int8_t LTC3676_bit_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
96 {
97 uint8_t register_data;
98 uint8_t bit_mask;
99 int8_t ack = 0;
100 bit_mask = 0x01 << bit_number;
101 ack |= LTC3676_register_read(i2c_address, register_address, &register_data); //Read register
102 register_data = register_data | bit_mask; //Set the bit at bit_address
103 ack |= LTC3676_register_write(i2c_address, register_address, register_data); //Write new data to register
104 return(ack);
105 }
106
107 // Sets a bit within any register inside the LTC3676 using the standard I2C repeated start format.
108 int8_t LTC3676_bit_clear(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
109 {
110 uint8_t register_data;
111 uint8_t bit_mask;
112 int8_t ack = 0;
113 bit_mask = 0x01 << bit_number;
114 ack |= LTC3676_register_read(i2c_address, register_address, &register_data); //Read register
115 register_data = register_data & (~bit_mask); //Clears the bit at bit_address
116 ack |= LTC3676_register_write(i2c_address, register_address, register_data); //Write new data to register
117 return(ack);
118 }
119
120 //! Writes any bit inside the LTC3676 using the standard I2C repeated start format.
121 //! @return Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
122 int8_t LTC3676_bit_write(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number, uint8_t bit_data)
123 {
124 uint8_t register_data;
125 uint8_t bit_mask;
126 int8_t ack = 0;
127 bit_mask = 0x01 << bit_number;
128 ack |= LTC3676_register_read(i2c_address, register_address, &register_data); //Read register
129 register_data = register_data & (~bit_mask); //Clears the bit at bit_address
130 register_data = register_data | ((bit_data & 0x01) << bit_number); //Writes the new bit
131 ack |= LTC3676_register_write(i2c_address, register_address, register_data); //Write new data to register
132 return(ack);
133 }
134
135 //! Reads the value of any bit in any register or the LTC3676.
136 //! @return Returns the bit value at the passed register subaddress and bit location.
137 uint8_t LTC3676_bit_is_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
138 {
139 uint8_t register_data;
140 int8_t ack = 0;
141 ack |= LTC3676_register_read(i2c_address, register_address, &register_data);
142 register_data = register_data >> bit_number; //Clears everything but the bit of interest
143 return (register_data & 0x01);
144 }
145
146 //! Sets the output voltage of any buck.
147 float LTC3676_set_buck_output_voltage(uint8_t i2c_address, uint8_t register_address, float output_voltage)
148 {
149 uint8_t register_data;
150 float fb_ref = 0;
151 int8_t nack = 0;
152 if (register_address == 0x0A | register_address == 0x0B)
153 {
154 fb_ref = output_voltage / (1 + LTC3676_RES_BUCK1_RTOP/LTC3676_RES_BUCK1_RBOT); //Generates desired FB reference input for given output voltage.
155 return (1 + LTC3676_RES_BUCK1_RTOP/LTC3676_RES_BUCK1_RBOT) * LTC3676_set_buck_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
156 }
157 if (register_address == 0x0C | register_address == 0x0D)
158 {
159 fb_ref = output_voltage / (1 + LTC3676_RES_BUCK2_RTOP/LTC3676_RES_BUCK2_RBOT); //Generates desired FB reference input for given output voltage.
160 return (1 + LTC3676_RES_BUCK2_RTOP/LTC3676_RES_BUCK2_RBOT) * LTC3676_set_buck_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
161 }
162 if (register_address == 0x0E | register_address == 0x0F)
163 {
164 fb_ref = output_voltage / (1 + LTC3676_RES_BUCK3_RTOP/LTC3676_RES_BUCK3_RBOT); //Generates desired FB reference input for given output voltage.
165 return (1 + LTC3676_RES_BUCK3_RTOP/LTC3676_RES_BUCK3_RBOT) * LTC3676_set_buck_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
166 }
167 if (register_address == 0x10 | register_address == 0x11)
168 {
169 fb_ref = output_voltage / (1 + LTC3676_RES_BUCK4_RTOP/LTC3676_RES_BUCK4_RBOT); //Generates desired FB reference input for given output voltage.
170 return (1 + LTC3676_RES_BUCK4_RTOP/LTC3676_RES_BUCK4_RBOT) * LTC3676_set_buck_fb_ref(i2c_address, register_address, fb_ref); //Writes new buck output fb refernce.
171 }
172 }
173
174 //! Writes the Feedback Reference Voltage of any buck.
175 //! @return Returns the new Feedback Reference Input Voltage, the closest allowable voltage to the user's chosen voltage.
176 float LTC3676_set_buck_fb_ref(uint8_t i2c_address, uint8_t register_address, float fb_ref_voltage)
177 {
178 uint8_t register_data;
179 uint8_t fb_ref_data = 0;
180 int8_t nack = 0;
181 fb_ref_data = (uint8_t) ((fb_ref_voltage + 6.25 - 412.5) / 12.5); //Generates 5-bit code for closest allowable value to user's chosen reference voltage.
182 nack |= LTC3676_register_read(i2c_address, register_address, &register_data); //Read current register value
183 register_data = register_data & (~LTC3676_FB_REF_MASK); //Clears existing feedback reference bits
184 register_data = register_data | fb_ref_data;
185 nack |= LTC3676_register_write(i2c_address, register_address, register_data); //Writes new register value
186 return (412.5 + (fb_ref_data * 12.5));
187 }
188
189 //! Calculates the maximum output voltage of any buck in mV based on the feedback resistors.
190 //! @return Returns the maximum possible output voltage for the selected buck.
191 float LTC3676_buck_vout_max(uint8_t buck_number)
192 {
193 switch (buck_number)
194 {
195 case 1:
196 return ((1 + (LTC3676_RES_BUCK1_RTOP/LTC3676_RES_BUCK1_RBOT)) * 800);
197 break;
198 case 2:
199 return ((1 + (LTC3676_RES_BUCK2_RTOP/LTC3676_RES_BUCK2_RBOT)) * 800);
200 break;
201 case 3:
202 return ((1 + (LTC3676_RES_BUCK3_RTOP/LTC3676_RES_BUCK3_RBOT)) * 800);
203 break;
204 case 4:
205 return ((1 + (LTC3676_RES_BUCK4_RTOP/LTC3676_RES_BUCK4_RBOT)) * 800);
206 break;
207 }
208 }
209
210 //! Calculates the minimum output voltage of any buck in mV based on the feedback resistors.
211 //! @return Returns the minimum possible output voltage for the selected buck.
212 float LTC3676_buck_vout_min(uint8_t buck_number)
213 {
214 switch (buck_number)
215 {
216 case 1:
217 return ((1 + LTC3676_RES_BUCK1_RTOP/LTC3676_RES_BUCK1_RBOT) * 412.5);
218 break;
219 case 2:
220 return ((1 + LTC3676_RES_BUCK2_RTOP/LTC3676_RES_BUCK2_RBOT) * 412.5);
221 break;
222 case 3:
223 return ((1 + LTC3676_RES_BUCK3_RTOP/LTC3676_RES_BUCK3_RBOT) * 412.5);
224 break;
225 case 4:
226 return ((1 + LTC3676_RES_BUCK4_RTOP/LTC3676_RES_BUCK4_RBOT) * 412.5);
227 break;
228 }
229 }
230
231 //! Selects the reference for the specified buck regulator(s).
232 //! @return Returns the state of the acknowledge bit after the I2C addresss write. 0=acknowledge, 1=no acknowledge.
233 int8_t LTC3676_select_buck_reference(uint8_t i2c_address, uint8_t buck_number, int8_t ref_char)
234 {
235 uint8_t user_register;
236 int8_t ack = 0;
237 if (buck_number == 0xFF)
238 {
239 ack |= LTC3676_select_buck_reference(i2c_address, 1, ref_char);
240 ack |= LTC3676_select_buck_reference(i2c_address, 2, ref_char);
241 ack |= LTC3676_select_buck_reference(i2c_address, 3, ref_char);
242 ack |= LTC3676_select_buck_reference(i2c_address, 4, ref_char);
243 return(ack);
244 }
245 user_register = (buck_number*2) + 8; //Converts selection to appropriate register address.
246 if (ref_char == 'A' || ref_char == 'a')
247 ack |= LTC3676_bit_clear(i2c_address, user_register, 5);
248 else if (ref_char == 'B' || ref_char == 'b')
249 ack |= LTC3676_bit_set(i2c_address, user_register, 5);
250 return(ack);
251 }
252
253 //! Sets the switching mode for the specified Buck regulator.
254 //! @return Returns the state of the acknowledge bit after the I2C addresss write. 0=acknowledge, 1=no acknowledge.
255 int8_t LTC3676_set_buck_mode(uint8_t i2c_address, uint8_t buck_number, uint8_t mode)
256 {
257 uint8_t register_data;
258 int8_t ack = 0;
259 if (buck_number == 0xFF)
260 {
261 ack |= LTC3676_set_buck_mode(i2c_address, 0x01, mode);
262 ack |= LTC3676_set_buck_mode(i2c_address, 0x02, mode);
263 ack |= LTC3676_set_buck_mode(i2c_address, 0x03, mode);
264 ack |= LTC3676_set_buck_mode(i2c_address, 0x04, mode);
265 return(ack);
266 }
267 ack |= LTC3676_register_read(i2c_address, buck_number, &register_data); //Read register
268 register_data = register_data & (~LTC3676_BUCK_MODE_MASK); //Clears the Mode bits in the Buck register
269 register_data = register_data | (mode << 5);
270 ack |= LTC3676_register_write(i2c_address, buck_number, register_data); //Writes new register value
271 return(ack);
272 }
273
274 //! Sets the start-up mode for all bucks.
275 //! @return Returns the state of the acknowledge bit after the I2C addresss write. 0=acknowledge, 1=no acknowledge.
276 int8_t LTC3676_set_startup_mode(uint8_t i2c_address, uint8_t buck_number, uint8_t startup_bit)
277 {
278 int8_t ack = 0;
279 if (buck_number == 0xFF)
280 {
281 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_BUCK1, LTC3676_BUCK_STARTUP, startup_bit);
282 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_BUCK2, LTC3676_BUCK_STARTUP, startup_bit);
283 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_BUCK3, LTC3676_BUCK_STARTUP, startup_bit);
284 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_BUCK4, LTC3676_BUCK_STARTUP, startup_bit);
285 return(ack);
286 }
287 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, buck_number, LTC3676_BUCK_STARTUP, startup_bit);
288 return(ack);
289 }
290
291 //! Sets the PGOOD mask bit in the DVBxB register for all bucks.
292 //! @return Returns the state of the acknowledge bit after the I2C addresss write. 0=acknowledge, 1=no acknowledge.
293 int8_t LTC3676_set_buck_pgood_mask(uint8_t i2c_address, uint8_t buck_number, uint8_t pgood_bit)
294 {
295 int8_t ack = 0;
296 uint8_t dvbxb_register = (2*buck_number)+9;
297 if (buck_number == 0xFF)
298 {
299 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_DVB1B, LTC3676_BUCK_PG_MASK, pgood_bit);
300 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_DVB2B, LTC3676_BUCK_PG_MASK, pgood_bit);
301 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_DVB3B, LTC3676_BUCK_PG_MASK, pgood_bit);
302 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, LTC3676_REG_DVB4B, LTC3676_BUCK_PG_MASK, pgood_bit);
303 return(ack);
304 }
305 ack |= LTC3676_bit_write(LTC3676_I2C_ADDRESS, dvbxb_register, LTC3676_BUCK_PG_MASK, pgood_bit);
306 return(ack);
307 }
308
309 //! Writes a new UV warning threshold voltage in the CTRL register.
310 //! @return Returns the state of the acknowledge bit after the I2C addresss write. 0=acknowledge, 1=no acknowledge.
311 int8_t LTC3676_set_uv_warning_threshold(uint8_t i2c_address, float uv_warning_threshold)
312 {
313 int8_t ack = 0;
314 uint8_t uv_warning_data = 0;
315 uint8_t register_data;
316 ack |= LTC3676_register_read(i2c_address, LTC3676_REG_CNTRL, &register_data); //Read CNTRL register
317 register_data = register_data & (~LTC3676_UV_WARN_THRESH_MASK); //Clears the UV Warning Threshold bits in the CNTRL register
318 uv_warning_data = (uint8_t) ((uv_warning_threshold + 0.05 - 2.7) / 0.1); //Generates 3-bit code for closest allowable value to user's chosen threshold voltage.
319 register_data = register_data | (uv_warning_data << 2);
320 ack |= LTC3676_register_write(i2c_address, LTC3676_REG_CNTRL, register_data); //Writes new register value
321 return(ack);
322 }
323
324 //! Writes the UV warning threshold of any buck.
325 //! @return Returns the state of the acknowledge bit after the I2C addresss write. 0=acknowledge, 1=no acknowledge.
326 int8_t LTC3676_set_overtemp_warning_level(uint8_t i2c_address, uint8_t ot_warning_level)
327 {
328 int8_t ack = 0;
329 uint8_t ot_warning_data = 0;
330 uint8_t register_data;
331 ack |= LTC3676_register_read(i2c_address, LTC3676_REG_CNTRL, &register_data); //Read CNTRL register
332 register_data = register_data & (~LTC3676_OT_WARN_LEVEL_MASK); //Clears the over temperature warning level bits in the CNTRL register
333 ot_warning_data = (uint8_t) ((ot_warning_level + 5 - 10) / 10); //Generates 2-bit code for closest allowable value to user's chosen threshold voltage.
334 register_data = register_data | ot_warning_data;
335 ack |= LTC3676_register_write(i2c_address, LTC3676_REG_CNTRL, register_data); //Writes new register value
336 return(ack);
337 }
338
339 //! Sets LDO4 output voltage on the LTC3676-1.
340 //! @return Returns the state of the acknowledge bit after the I2C addresss write. 0=acknowledge, 1=no acknowledge.
341 int8_t LTC3676_1_set_ldo4_voltage(uint8_t i2c_address, uint8_t ldo4_output_voltage_code)
342 {
343 int8_t ack = 0;
344 uint8_t register_data;
345 ack |= LTC3676_register_read(i2c_address, LTC3676_REG_LDOB, &register_data); //Read register
346 register_data = register_data & (~LTC3676_1_LDO4_VOLTAGE_MASK); //Clears the LDO4 Output Voltage bits in the LDOB register
347 register_data = register_data | (ldo4_output_voltage_code << 3);
348 ack |= LTC3676_register_write(i2c_address, LTC3676_REG_LDOB, register_data); //Writes new register value
349 return(ack);
350 }
351
352 //! Sets the Sequence Down bits for any buck in the SQD1 register.
353 //! @return Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
354 int8_t LTC3676_set_buck_sequence_down(uint8_t i2c_address, uint8_t buck_number, uint8_t sequence_phase)
355 {
356 int8_t ack = 0;
357 uint8_t register_data;
358 sequence_phase = sequence_phase & (0x03); //Mask out everything but the first two bits of sequence_phase
359 ack |= LTC3676_register_read(i2c_address, LTC3676_REG_SQD1, &register_data); //Read SQD1 register.
360 register_data &= (~LTC3676_BUCK_SEQ_MASK(buck_number)); //Clear data in sequence down bits to be written.
361 register_data |= (sequence_phase << ((buck_number*2)- 2)); //Bit shift sequence bits to the correct position.
362 ack |= LTC3676_register_write(i2c_address, LTC3676_REG_SQD1, register_data); //Write new sequence data.
363 return(ack);
364 }
365
366 //! Sets the Sequence Down bits for any buck in the SQD1 register.
367 //! @return Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
368 int8_t LTC3676_set_ldo_sequence_down(uint8_t i2c_address, uint8_t ldo_number, uint8_t sequence_phase)
369 {
370 int8_t nack = 0;
371 uint8_t register_data;
372 sequence_phase = sequence_phase & (0x03); //Mask out everything but the first two bits of sequence_phase
373 nack |= LTC3676_register_read(i2c_address, LTC3676_REG_SQD2, &register_data); //Read SQD2 register.
374 register_data &= (~LTC3676_LDO_SEQ_MASK(ldo_number)); //Bit shift sequence bits to the correct position.
375 register_data |= (sequence_phase << ((ldo_number-2)* 2)); //Bit shift sequence bits to the correct position.
376 nack |= LTC3676_register_write(i2c_address, LTC3676_REG_SQD2, register_data); //Write new sequence data.
377 return(nack);
378 }
LTC3676_set_buck_mode
int8_t LTC3676_set_buck_mode(uint8_t i2c_address, uint8_t buck_number, uint8_t mode)
Sets the switching mode for the specified Buck regulator.
Definition: LTC3676.cpp:255
LTC3676_bit_is_set
uint8_t LTC3676_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 LTC3676.
Definition: LTC3676.cpp:137
LTC3676_RES_BUCK1_RBOT
#define LTC3676_RES_BUCK1_RBOT
Definition: LTC3676.h:88
LTC3676_set_startup_mode
int8_t LTC3676_set_startup_mode(uint8_t i2c_address, uint8_t buck_number, uint8_t startup_bit)
Sets the start-up mode for all bucks.
Definition: LTC3676.cpp:276
LTC3676_REG_BUCK1
#define LTC3676_REG_BUCK1
Definition: LTC3676.h:100
LTC3676_REG_BUCK2
#define LTC3676_REG_BUCK2
Definition: LTC3676.h:101
i2c_address
uint8_t i2c_address
LTC3676_I2C_ADDRESS
#define LTC3676_I2C_ADDRESS
Definition: LTC3676.h:79
LTC3676_REG_LDOB
#define LTC3676_REG_LDOB
Definition: LTC3676.h:105
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
LTC3676_register_write
int8_t LTC3676_register_write(uint8_t i2c_address, uint8_t register_address, uint8_t register_data)
Writes to an 8-bit register inside the LTC3676 using the standard I2C repeated start format...
Definition: LTC3676.cpp:86
LTC3676_set_ldo_sequence_down
int8_t LTC3676_set_ldo_sequence_down(uint8_t i2c_address, uint8_t ldo_number, uint8_t sequence_phase)
Sets the Sequence Down bits for any buck in the SQD1 register.
Definition: LTC3676.cpp:368
LTC3676_RES_BUCK2_RBOT
#define LTC3676_RES_BUCK2_RBOT
Definition: LTC3676.h:90
LTC3676_RES_BUCK1_RTOP
#define LTC3676_RES_BUCK1_RTOP
Definition: LTC3676.h:87
LTC3676_buck_vout_max
float LTC3676_buck_vout_max(uint8_t buck_number)
Calculates the maximum output voltage of any buck in mV based on the feedback resistors.
Definition: LTC3676.cpp:191
Linduino.h
Header File for Linduino Libraries and Demo Code.
LTC3676_set_buck_fb_ref
float LTC3676_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: LTC3676.cpp:176
LTC3676_select_buck_reference
int8_t LTC3676_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: LTC3676.cpp:233
LTC3676_REG_DVB2B
#define LTC3676_REG_DVB2B
Definition: LTC3676.h:112
LTC3676_set_buck_sequence_down
int8_t LTC3676_set_buck_sequence_down(uint8_t i2c_address, uint8_t buck_number, uint8_t sequence_phase)
Sets the Sequence Down bits for any buck in the SQD1 register.
Definition: LTC3676.cpp:354
LTC3676_RES_BUCK2_RTOP
#define LTC3676_RES_BUCK2_RTOP
Definition: LTC3676.h:89
LTC3676_BUCK_PG_MASK
#define LTC3676_BUCK_PG_MASK
Definition: LTC3676.h:174
LTC3676_buck_vout_min
float LTC3676_buck_vout_min(uint8_t buck_number)
Calculates the minimum output voltage of any buck in mV based on the feedback resistors.
Definition: LTC3676.cpp:212
LTC3676_REG_CNTRL
#define LTC3676_REG_CNTRL
Definition: LTC3676.h:108
LTC3676_bit_write
int8_t LTC3676_bit_write(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number, uint8_t bit_data)
Writes any bit inside the LTC3676 using the standard I2C repeated start format.
Definition: LTC3676.cpp:122
LTC3676_REG_DVB4B
#define LTC3676_REG_DVB4B
Definition: LTC3676.h:116
LTC3676_bit_clear
int8_t LTC3676_bit_clear(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
Clears any bit inside the LTC3676 using the standard I2C repeated start format.
Definition: LTC3676.cpp:108
LTC3676_register_read
int8_t LTC3676_register_read(uint8_t i2c_address, uint8_t register_address, uint8_t *register_data)
Reads an 8-bit register from the LTC3676 using the standard repeated start format.
Definition: LTC3676.cpp:78
LTC3676_RES_BUCK3_RBOT
#define LTC3676_RES_BUCK3_RBOT
Definition: LTC3676.h:92
LTC3676_REG_DVB3B
#define LTC3676_REG_DVB3B
Definition: LTC3676.h:114
LTC3676.h
LTC3676: Power management solution for application processors.
LTC3676_BUCK_MODE_MASK
#define LTC3676_BUCK_MODE_MASK
Definition: LTC3676.h:256
LTC3676_UV_WARN_THRESH_MASK
#define LTC3676_UV_WARN_THRESH_MASK
Definition: LTC3676.h:264
LTC3676_set_uv_warning_threshold
int8_t LTC3676_set_uv_warning_threshold(uint8_t i2c_address, float uv_warning_threshold)
Writes a new UV warning threshold voltage in the CTRL register.
Definition: LTC3676.cpp:311
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
LTC3676_RES_BUCK4_RTOP
#define LTC3676_RES_BUCK4_RTOP
Definition: LTC3676.h:93
LTC3676_REG_SQD2
#define LTC3676_REG_SQD2
Definition: LTC3676.h:107
LTC3676_bit_set
int8_t LTC3676_bit_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
Sets any bit inside the LTC3676 using the standard I2C repeated start format.
Definition: LTC3676.cpp:95
LTC3676_REG_BUCK3
#define LTC3676_REG_BUCK3
Definition: LTC3676.h:102
LTC3676_set_buck_output_voltage
float LTC3676_set_buck_output_voltage(uint8_t i2c_address, uint8_t register_address, float output_voltage)
Sets the output voltage of any buck.
Definition: LTC3676.cpp:147
LTC3676_RES_BUCK3_RTOP
#define LTC3676_RES_BUCK3_RTOP
Definition: LTC3676.h:91
LTC3676_set_buck_pgood_mask
int8_t LTC3676_set_buck_pgood_mask(uint8_t i2c_address, uint8_t buck_number, uint8_t pgood_bit)
Sets the PGOOD mask bit in the DVBxB register for all bucks.
Definition: LTC3676.cpp:293
LTC3676_OT_WARN_LEVEL_MASK
#define LTC3676_OT_WARN_LEVEL_MASK
Definition: LTC3676.h:265
LTC3676_LDO_SEQ_MASK
#define LTC3676_LDO_SEQ_MASK(num)
Definition: LTC3676.h:255
LTC3676_REG_DVB1B
#define LTC3676_REG_DVB1B
Definition: LTC3676.h:110
LTC3676_1_LDO4_VOLTAGE_MASK
#define LTC3676_1_LDO4_VOLTAGE_MASK
Definition: LTC3676.h:272
LT_I2C.h
LT_I2C: Routines to communicate with ATmega328P&#39;s hardware I2C port.
LTC3676_BUCK_SEQ_MASK
#define LTC3676_BUCK_SEQ_MASK(num)
Definition: LTC3676.h:254
LTC3676_FB_REF_MASK
#define LTC3676_FB_REF_MASK
Definition: LTC3676.h:266
LTC3676_1_set_ldo4_voltage
int8_t LTC3676_1_set_ldo4_voltage(uint8_t i2c_address, uint8_t ldo4_output_voltage_code)
Sets LDO4 output voltage on the LTC3676-1.
Definition: LTC3676.cpp:341
LTC3676_REG_SQD1
#define LTC3676_REG_SQD1
Definition: LTC3676.h:106
LTC3676_RES_BUCK4_RBOT
#define LTC3676_RES_BUCK4_RBOT
Definition: LTC3676.h:94
LTC3676_REG_BUCK4
#define LTC3676_REG_BUCK4
Definition: LTC3676.h:103
LTC3676_set_overtemp_warning_level
int8_t LTC3676_set_overtemp_warning_level(uint8_t i2c_address, uint8_t ot_warning_level)
Writes the UV warning threshold of any buck.
Definition: LTC3676.cpp:326
LTC3676_BUCK_STARTUP
#define LTC3676_BUCK_STARTUP
Definition: LTC3676.h:131