MAX14690 Library

Dependents:   MAX32630HSP3_IMU_HelloWorld MAX32630HSP3_IMU_HelloWorld max32630fthr max4146x_comp ... more

Fork of MAX14690 by Greg Steiert

Embed: (wiki syntax)

« Back to documentation index

MAX14690 Class Reference

MAX14690 Class Reference

MAX14690 Wearable Power-Management Solution Driver. More...

#include <MAX14690.h>

Public Types

enum  registers_t {
  REG_CHIP_ID = 0x00, REG_CHIP_REV = 0x01, REG_STATUS_A = 0x02, REG_STATUS_B = 0x03,
  REG_STATUS_C = 0x04, REG_INT_A = 0x05, REG_INT_B = 0x06, REG_INT_MASK_A = 0x07,
  REG_INT_MASK_B = 0x08, REG_I_LIM_CNTL = 0x09, REG_CHG_CNTL_A = 0x0A, REG_CHG_CNTL_B = 0x0B,
  REG_CHG_TMR = 0x0C, REG_BUCK1_CFG = 0x0D, REG_BUCK1_VSET = 0x0E, REG_BUCK2_CFG = 0x0F,
  REG_BUCK2_VSET = 0x10, REG_RSVD_11 = 0x11, REG_LDO1_CFG = 0x12, REG_LDO1_VSET = 0x13,
  REG_LDO2_CFG = 0x14, REG_LDO2_VSET = 0x15, REG_LDO3_CFG = 0x16, REG_LDO3_VSET = 0x17,
  REG_THRM_CFG = 0x18, REG_MON_CFG = 0x19, REG_BOOT_CFG = 0x1A, REG_PIN_STATUS = 0x1B,
  REG_BUCK_EXTRA = 0x1C, REG_PWR_CFG = 0x1D, REG_NULL = 0x1E, REG_PWR_OFF = 0x1F
}
 

Register Addresses.

More...
enum  thermStat_t {
  THMSTAT_000, THMSTAT_001, THMSTAT_010, THMSTAT_011,
  THMSTAT_100, THMSTAT_101, THMSTAT_110, THMSTAT_111
}
 

Thermal Status.

More...
enum  chgStat_t {
  CHGSTAT_000, CHGSTAT_001, CHGSTAT_010, CHGSTAT_011,
  CHGSTAT_100, CHGSTAT_101, CHGSTAT_110, CHGSTAT_111
}
 

Charge Status.

More...
enum  iLimCntl_t { ILIM_0mA, ILIM_100mA, ILIM_500mA, ILIM_1000mA }
 

Input Current Limit.

More...
enum  batReChg_t { BAT_RECHG_70mV, BAT_RECHG_120mV, BAT_RECHG_170mV, BAT_RECHG_220mV }
 

Recharge Threshold.

More...
enum  batReg_t {
  BAT_REG_4050mV, BAT_REG_4100mV, BAT_REG_4150mV, BAT_REG_4200mV,
  BAT_REG_4250mV, BAT_REG_4300mV, BAT_REG_4350mV, BAT_REG_RSVD
}
 

Battery Regulation Voltage.

More...
enum  vPChg_t {
  VPCHG_2100mV, VPCHG_2250mV, VPCHG_2400mV, VPCHG_2550mV,
  VPCHG_2700mV, VPCHG_2850mV, VPCHG_3000mV, VPCHG_3150mV
}
 

Precharge Voltage.

More...
enum  iPChg_t { IPCHG_5, IPCHG_10, IPCHG_20, IPCHG_30 }
 

Precharge Current.

More...
enum  chgDone_t { CHGDONE_5, CHGDONE_10, CHGDONE_20, CHGDONE_30 }
 

Done Current.

More...
enum  mtChgTmr_t { MTCHGTMR_0min, MTCHGTMR_15min, MTCHGTMR_30min, MTCHGTMR_60min }
 

Maintain Charge Timer.

More...
enum  fChgTmr_t { FCHGTMR_75min, FCHGTMR_150min, FCHGTMR_300min, FCHGTMR_600min }
 

Fast Charge Timer.

More...
enum  pChgTmr_t { PCHGTMR_30min, PCHGTMR_60min, PCHGTMR_120min, PCHGTMR_240min }
 

Precharge Timer.

More...
enum  ldoMode_t {
  LDO_DISABLED, SW_DISABLED, LDO_ENABLED, SW_ENABLED,
  LDO_EN_MPC0, SW_EN_MPC0, LDO_EN_MPC1, SW_EN_MPC1,
  LDO_DISABLED_DSC, SW_DISABLED_DSC, LDO_ENABLED_DSC, SW_ENABLED_DSC,
  LDO_EN_MPC0_DSC, SW_EN_MPC0_DSC, LDO_EN_MPC1_DSC, SW_EN_MPC1_DSC
}
 

LDO Enable Mode.

More...
enum  buckMd_t { BUCK_BURST, BUCK_FPWM, BUCK_MPC0_FPWM, BUCK_MPC1_FPWM }
 

Buck Operating Modes.

More...
enum  thrmCfg_t { THRM_DISABLED, THRM_ENABLED, THRM_RSVD, THRM_JEITA }
 

Thermistor Configuration.

More...
enum  monCfg_t {
  MON_PULLDOWN = 0x0, MON_BAT = 0x1, MON_SYS = 0x2, MON_BUCK1 = 0x3,
  MON_BUCK2 = 0x4, MON_LDO1 = 0x5, MON_LDO2 = 0x6, MON_LDO3 = 0x7,
  MON_HI_Z = 0x8
}
 

Monitor Configurations.

More...
enum  monRatio_t { MON_DIV4, MON_DIV3, MON_DIV2, MON_DIV1 }
 

Monitor Divide Ratio.

More...

Public Member Functions

 MAX14690 (I2C *i2c)
 MAX14690 constructor.
 ~MAX14690 ()
 MAX14690 destructor.
int init ()
 Initialize MAX14690.
int ldo2SetVoltage (int mV)
 Set the LDO Voltage.
int ldo2SetMode (ldoMode_t mode)
 Set LDO Enable Mode.
int ldo3SetVoltage (int mV)
 Set the LDO Voltage.
int ldo3SetMode (ldoMode_t mode)
 Set LDO Enable Mode.
int monSet (monCfg_t monCfg, monRatio_t monRatio)
 Configure Mon Pin.
int shutdown ()
 Shutdown.
void resetToDefaults ()
 Reset settings to default values.
int writeReg (registers_t reg, char value)
 Write Register.
int readReg (registers_t reg, char *value)
 Read Register.

Data Fields

bool intEnThermStatus
 Thermal Status Change Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnChgStatus
 Charger Status Change Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnILim
 Input Limit Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnUSBOVP
 USB Over Voltage Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnUSBOK
 USB OK Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnChgThmSD
 Charger Thermal Shutdown Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnThermReg
 Thermal Regulation Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnChgTimeOut
 Charger Timeout Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnThermBuck1
 Buck1 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnThermBuck2
 Buck2 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnThermLDO1
 LDO1 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnThermLDO2
 LDO2 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.
bool intEnThermLDO3
 LDO3 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.
iLimCntl_t iLimCntl
 CHGIN Input Current Limit Setting: default 500mA.
bool chgAutoStp
 Charger Auto Stop: default 1 - move to Charge Done when charging complete, 0 - remain in Maintain Charge mode.
bool chgAutoReSta
 Charger Auto Restart: default 1 - restart charging when Vbat drops below threshold, 0 - stay in Charge Done until charging disabled.
batReChg_t batReChg
 Charger Battery Recharge Threshold: default -120mV.
batReg_t batReg
 Charger Battery Regulation Voltage: default 4.20V.
bool chgEn
 Charger Enable: default 1 - Enabled, 0 - Disabled.
vPChg_t vPChg
 Charger Precharge Voltage Threshold: default 3.00V.
iPChg_t iPChg
 Charger Precharge Current Setting: default 10% of fast charge current.
chgDone_t chgDone
 Charger Done Threshold, stop charging when charge current drops to this level: default 10% of fast charge current.
mtChgTmr_t mtChgTmr
 Maintain Charge Timer, time to wait after reaching done current before disabling charger: default 0 min.
fChgTmr_t fChgTmr
 Fast Charge Timer, timeout for fast charge duration: default 300 min.
pChgTmr_t pChgTmr
 Precharge Timer, timeout for precharge duration: default 60 min.
buckMd_t buck1Md
 Buck 1 Mode Select: default Burst mode.
bool buck1Ind
 Buck 1 Inductor Select: default 0 - 2.2uH, 1 - 4.7uH.
buckMd_t buck2Md
 Buck 2 Mode Select: default BUCK_BURST.
bool buck2Ind
 Buck 2 Inductor Select: default 0 - 2.2uH, 1 - 4.7uH.
ldoMode_t ldo2Mode
 LDO 2 Mode Select: default LDO_DISABLED.
int ldo2Millivolts
 LDO 2 Voltage in millivolts: default 3200.
ldoMode_t ldo3Mode
 LDO 3 Mode Select: default LDO_DISABLED.
int ldo3Millivolts
 LDO 3 Voltage in millivolts: default 3000.
thrmCfg_t thrmCfg
 Thermistor Configuration: default THRM_ENABLED.
monRatio_t monRatio
 Monitor Multiplexer Divider Ratio Select: default MON_DIV4.
monCfg_t monCfg
 Monitor Multiplexer Configuration: default MON_PULLDOWN.
bool buck2ActDsc
 Buck 2 Active Discharge: default 0 - discharge only during hard reset, 1 - discharge when regulator is disabled.
bool buck2FFET
 Buck 2 Force FET Scaling: default 0 - full FET for better active efficiency, 1 - reduced FET for lower quiescent current.
bool buck1ActDsc
 Buck 1 Active Discharge: default 0 - discharge only during hard reset, 1 - discharge when regulator is disabled.
bool buck1FFET
 Buck 1 Force FET Scaling: default 0 - full FET for better active efficiency, 1 - reduced FET for lower quiescent current.
bool pfnResEna
 PFN pin resistor enable: default 1 - internal pullup/pulldown enabled, 0 - internal pullup/pulldown disabled.
bool stayOn
 Stay On Handshake: default 1 - remain on, 0 - turn off if not set within 5s of power-on.

Detailed Description

MAX14690 Wearable Power-Management Solution Driver.

The MAX14690 is a compact power-management solutions for space-constrained, battery-powered applications where size and efficiency are critical. It combines a battery charger with two buck regulators, three LDOs and a other power supervisory functions to optimize the system implementation.
https://www.maximintegrated.com/en/products/power/battery-management/MAX14690.html

 #include "mbed.h"
 #include "MAX14690.h"

 // I2C Master 2
 I2C i2cm2(I2C2_SDA, I2C2_SCL);

 MAX14690 max14690(&i2cm2);

 DigitalOut led(LED1, 0);
 InterruptIn button(SW1);

 void turnOff()
 {
     max14690.shutdown();
 }

 int main()
 {
     button.fall(&turnOff);

     max14690.ldo2Millivolts = 3300;
     max14690.ldo3Millivolts = 3300;
     max14690.ldo2Mode = MAX14690::LDO_ENABLED;
     max14690.ldo3Mode = MAX14690::LDO_ENABLED;
     max14690.monCfg = MAX14690::MON_HI_Z;
     if (max14690.init() == MAX14690_ERROR) {
         printf("Error initializing MAX14690");
     }

     Thread::wait(500);

     while(1) {
         led1 = !led1;
         Thread::wait(500);
     }
 }

Definition at line 98 of file MAX14690.h.


Member Enumeration Documentation

enum batReChg_t

Recharge Threshold.

Battery recharge voltage threshold

Enumerator:
BAT_RECHG_70mV 

70mV

BAT_RECHG_120mV 

120mV

BAT_RECHG_170mV 

170mV

BAT_RECHG_220mV 

220mV

Definition at line 186 of file MAX14690.h.

enum batReg_t

Battery Regulation Voltage.

Battery regulation voltages set point

Enumerator:
BAT_REG_4050mV 

4.05V

BAT_REG_4100mV 

4.10V

BAT_REG_4150mV 

4.15V

BAT_REG_4200mV 

4.20V

BAT_REG_4250mV 

4.25V

BAT_REG_4300mV 

4.30V

BAT_REG_4350mV 

4.35V

BAT_REG_RSVD 

reserved

Definition at line 197 of file MAX14690.h.

enum buckMd_t

Buck Operating Modes.

Enumerated operating modes for buck regulator

Enumerator:
BUCK_BURST 

Burst Mode Operation.

BUCK_FPWM 

Forced PWM Operation.

BUCK_MPC0_FPWM 

MPC activated Forced PWM.

BUCK_MPC1_FPWM 

MPC activated Forced PWM.

Definition at line 305 of file MAX14690.h.

enum chgDone_t

Done Current.

Charger done current where charging stops

Enumerator:
CHGDONE_5 

5% of Ifchg

CHGDONE_10 

10% of Ifchg

CHGDONE_20 

20% of Ifchg

CHGDONE_30 

30% of Ifchg

Definition at line 238 of file MAX14690.h.

enum chgStat_t

Charge Status.

Current operating mode of charger

Enumerator:
CHGSTAT_000 

Charger off.

CHGSTAT_001 

Charging suspended by temperature.

CHGSTAT_010 

Pre-charge.

CHGSTAT_011 

Fast-charge constant current.

CHGSTAT_100 

Fast-charge constant voltage.

CHGSTAT_101 

Maintain charge.

CHGSTAT_110 

Done.

CHGSTAT_111 

Charger fault.

Definition at line 160 of file MAX14690.h.

enum fChgTmr_t

Fast Charge Timer.

Timeout settings for fast charge mode

Enumerator:
FCHGTMR_75min 

75 min

FCHGTMR_150min 

150 min

FCHGTMR_300min 

300 min

FCHGTMR_600min 

600 min

Definition at line 260 of file MAX14690.h.

enum iLimCntl_t

Input Current Limit.

CHGIN input current limit values

Enumerator:
ILIM_0mA 

0mA

ILIM_100mA 

100mA

ILIM_500mA 

500mA

ILIM_1000mA 

1000mA

Definition at line 175 of file MAX14690.h.

enum iPChg_t

Precharge Current.

Battery precharge current value

Enumerator:
IPCHG_5 

5% of Ifchg

IPCHG_10 

10% of Ifchg

IPCHG_20 

20% of Ifchg

IPCHG_30 

30% of Ifchg

Definition at line 227 of file MAX14690.h.

enum ldoMode_t

LDO Enable Mode.

Enumerated enable modes for voltage regulators

Enumerator:
LDO_DISABLED 

Disabled, Regulator Mode.

SW_DISABLED 

Disabled, Switch Mode.

LDO_ENABLED 

Enabled, Regulator Mode.

SW_ENABLED 

Enabled, Switch Mode.

LDO_EN_MPC0 

Regulator Enabled by MPC pin.

SW_EN_MPC0 

Switch Enabled by MPC pin.

LDO_EN_MPC1 

Regulator Enabled by MPC pin.

SW_EN_MPC1 

Switch Enabled by MPC pin.

LDO_DISABLED_DSC 

Regulator Disabled.

SW_DISABLED_DSC 

Switch Disabled.

LDO_ENABLED_DSC 

Regulator Enabled.

SW_ENABLED_DSC 

Switch Enabled.

LDO_EN_MPC0_DSC 

Regulator Enabled by MPC pin.

SW_EN_MPC0_DSC 

Switch Enabled by MPC pin.

LDO_EN_MPC1_DSC 

Regulator Enabled by MPC pin.

SW_EN_MPC1_DSC 

Switch Enabled by MPC pin.

Definition at line 282 of file MAX14690.h.

enum monCfg_t

Monitor Configurations.

Enumerated configuration modes for monitor multiplexer

Enumerator:
MON_PULLDOWN 

Pulled down by 100k Ohm.

MON_BAT 

BAT Selected.

MON_SYS 

SYS Selected.

MON_BUCK1 

BUCK1 Selected.

MON_BUCK2 

BUCK2 Selected.

MON_LDO1 

LDO1 Selected.

MON_LDO2 

LDO2 Selected.

MON_LDO3 

LDO3nSelected.

MON_HI_Z 

High Impedance.

Definition at line 327 of file MAX14690.h.

enum monRatio_t

Monitor Divide Ratio.

Ratio settings for monitor divider

Enumerator:
MON_DIV4 

4:1 Monitor Ratio

MON_DIV3 

3:1 Monitor Ratio

MON_DIV2 

2:1 Monitor Ratio

MON_DIV1 

1:1 Monitor Ratio

Definition at line 343 of file MAX14690.h.

enum mtChgTmr_t

Maintain Charge Timer.

Timeout settings for maintain charge mode

Enumerator:
MTCHGTMR_0min 

0 min

MTCHGTMR_15min 

15 min

MTCHGTMR_30min 

30 min

MTCHGTMR_60min 

60 min

Definition at line 249 of file MAX14690.h.

enum pChgTmr_t

Precharge Timer.

Timeout settings for precharge mode

Enumerator:
PCHGTMR_30min 

30 min

PCHGTMR_60min 

60 min

PCHGTMR_120min 

120 min

PCHGTMR_240min 

240 min

Definition at line 271 of file MAX14690.h.

Register Addresses.

Enumerated MAX14690 register addresses

Enumerator:
REG_CHIP_ID 

Chip ID.

REG_CHIP_REV 

Chip Revision.

REG_STATUS_A 

Status Register A.

REG_STATUS_B 

Status Register B.

REG_STATUS_C 

Status Register C.

REG_INT_A 

Interrupt Register A.

REG_INT_B 

Interrupt Register B.

REG_INT_MASK_A 

Interrupt Mask A.

REG_INT_MASK_B 

Interrupt Mask B.

REG_I_LIM_CNTL 

Input Limit Control.

REG_CHG_CNTL_A 

Charger Control A.

REG_CHG_CNTL_B 

Charger Control B.

REG_CHG_TMR 

Charger Timers.

REG_BUCK1_CFG 

Buck 1 Configuration.

REG_BUCK1_VSET 

Buck 1 Voltage Setting.

REG_BUCK2_CFG 

Buck 2 Configuration.

REG_BUCK2_VSET 

Buck 2 Voltage Setting.

REG_RSVD_11 

Reserved 0x11.

REG_LDO1_CFG 

LDO 1 Configuration.

REG_LDO1_VSET 

LDO 1 Voltage Setting.

REG_LDO2_CFG 

LDO 2 Configuration.

REG_LDO2_VSET 

LDO 2 Voltage Setting.

REG_LDO3_CFG 

LDO 3 Configuration.

REG_LDO3_VSET 

LDO 3 Voltage Setting.

REG_THRM_CFG 

Thermistor Configuration.

REG_MON_CFG 

Monitor Multiplexer Configuration.

REG_BOOT_CFG 

Boot Configuration.

REG_PIN_STATUS 

Pin Status.

REG_BUCK_EXTRA 

Additional Buck Settings.

REG_PWR_CFG 

Power Configuration.

REG_NULL 

Reserved 0x1E.

REG_PWR_OFF 

Power Off Register.

Definition at line 106 of file MAX14690.h.

Thermal Status.

Thermal status determined by thermistor

Enumerator:
THMSTAT_000 

T < T1.

THMSTAT_001 

T1 < T < T2.

THMSTAT_010 

T2 < T < T3.

THMSTAT_011 

T3 < T < T4.

THMSTAT_100 

T > T4.

THMSTAT_101 

No theremistor detected.

THMSTAT_110 

Thermistor Disabled by ThermEn.

THMSTAT_111 

CHGIN not present.

Definition at line 145 of file MAX14690.h.

enum thrmCfg_t

Thermistor Configuration.

Enumerated thermistor operating modes

Enumerator:
THRM_DISABLED 

Thermistor monitoring disabled.

THRM_ENABLED 

Basic thermistor monitoring.

THRM_RSVD 

reserved, do not use

THRM_JEITA 

JEITA thermistor monitoring.

Definition at line 316 of file MAX14690.h.

enum vPChg_t

Precharge Voltage.

Battery precharge voltage threshold

Enumerator:
VPCHG_2100mV 

2.10V

VPCHG_2250mV 

2.25V

VPCHG_2400mV 

2.40V

VPCHG_2550mV 

2.55V

VPCHG_2700mV 

2.70V

VPCHG_2850mV 

2.85V

VPCHG_3000mV 

3.00V

VPCHG_3150mV 

3.15V

Definition at line 212 of file MAX14690.h.


Constructor & Destructor Documentation

MAX14690 ( I2C *  i2c )

MAX14690 constructor.

Parameters:
i2cI2C object to use.

Definition at line 37 of file MAX14690.cpp.

~MAX14690 (  )

MAX14690 destructor.

Definition at line 43 of file MAX14690.cpp.


Member Function Documentation

int init (  )

Initialize MAX14690.

Applies settings to MAX14690. Settings are stored in public variables. The variables are pre-loaded with the most common configuation. Assign new values to the public variables before calling init. This will update all the settings including the LDO voltages and modes.

Returns:
0 if no errors, -1 if error.

Definition at line 171 of file MAX14690.cpp.

int ldo2SetMode ( ldoMode_t  mode )

Set LDO Enable Mode.

Sets the enable mode for the LDO/SW

Parameters:
modeThe enable mode for the LDO/SW
Returns:
0 if no errors, -1 if error.

Definition at line 95 of file MAX14690.cpp.

int ldo2SetVoltage ( int  mV )

Set the LDO Voltage.

Sets the voltage for the boost regulator. The voltage is specified in millivolts. The MAX14690 cannot update the voltage when enabled. This function checks the local ldoMode variable and if the regualtor is enabled it will send the disable command before sending the new voltage and re-enable the LDO after the new voltage is written.

Parameters:
mVvoltage for boost regualtor in millivolts
Returns:
0 if no errors, -1 if error.

Definition at line 102 of file MAX14690.cpp.

int ldo3SetMode ( ldoMode_t  mode )

Set LDO Enable Mode.

Sets the enable mode for the LDO/SW

Parameters:
modeThe enable mode for the LDO/SW
Returns:
0 if no errors, -1 if error.

Definition at line 133 of file MAX14690.cpp.

int ldo3SetVoltage ( int  mV )

Set the LDO Voltage.

Sets the voltage for the boost regulator. The voltage is specified in millivolts. The MAX14690 cannot update the voltage when enabled. This function checks the local ldoMode variable and if the regualtor is enabled it will send the disable command before sending the new voltage and re-enable the LDO after the new voltage is written.

Parameters:
mVvoltage for boost regualtor in millivolts
Returns:
0 if no errors, -1 if error.

Definition at line 140 of file MAX14690.cpp.

int monSet ( monCfg_t  monCfg,
monRatio_t  monRatio 
)

Configure Mon Pin.

Configures the operating mode of the monitor multiplexer

Parameters:
monCfgThe configuration mode for the monitor pin
Returns:
0 if no errors, -1 if error.

Definition at line 293 of file MAX14690.cpp.

int readReg ( registers_t  reg,
char *  value 
)

Read Register.

Reads from the specified register

Parameters:
regThe register to be read
valuePointer for where to store the data
Returns:
0 if no errors, -1 if error.

Definition at line 321 of file MAX14690.cpp.

void resetToDefaults (  )

Reset settings to default values.

Resets all local variables to the default value. Note: this only resets the local variables and has no effect on the part until they are applied by another functions such as init();

Returns:
0 if no errors, -1 if error.

Definition at line 48 of file MAX14690.cpp.

int shutdown (  )

Shutdown.

Sends the command to turn off all supplies and put the part in battery saving shelf mode.

Returns:
0 if no errors, -1 if error.

Definition at line 302 of file MAX14690.cpp.

int writeReg ( registers_t  reg,
char  value 
)

Write Register.

Writes the given value to the specified register. Note, this function provides direct access to the registers without any awareness or effect on the settings stored in the public variables. This is used by the other functions to set the values inside the MAX14690. Calling this outside of the other functions can break the synchronization of the variables to the state of the MAX14690.

Parameters:
regThe register to be written
valueThe data to be written
Returns:
0 if no errors, -1 if error.

Definition at line 309 of file MAX14690.cpp.


Field Documentation

Charger Battery Recharge Threshold: default -120mV.

Definition at line 501 of file MAX14690.h.

Charger Battery Regulation Voltage: default 4.20V.

Definition at line 503 of file MAX14690.h.

Buck 1 Active Discharge: default 0 - discharge only during hard reset, 1 - discharge when regulator is disabled.

Definition at line 545 of file MAX14690.h.

bool buck1FFET

Buck 1 Force FET Scaling: default 0 - full FET for better active efficiency, 1 - reduced FET for lower quiescent current.

Definition at line 547 of file MAX14690.h.

bool buck1Ind

Buck 1 Inductor Select: default 0 - 2.2uH, 1 - 4.7uH.

Definition at line 521 of file MAX14690.h.

Buck 1 Mode Select: default Burst mode.

Definition at line 519 of file MAX14690.h.

Buck 2 Active Discharge: default 0 - discharge only during hard reset, 1 - discharge when regulator is disabled.

Definition at line 541 of file MAX14690.h.

bool buck2FFET

Buck 2 Force FET Scaling: default 0 - full FET for better active efficiency, 1 - reduced FET for lower quiescent current.

Definition at line 543 of file MAX14690.h.

bool buck2Ind

Buck 2 Inductor Select: default 0 - 2.2uH, 1 - 4.7uH.

Definition at line 525 of file MAX14690.h.

Buck 2 Mode Select: default BUCK_BURST.

Definition at line 523 of file MAX14690.h.

Charger Auto Restart: default 1 - restart charging when Vbat drops below threshold, 0 - stay in Charge Done until charging disabled.

Definition at line 499 of file MAX14690.h.

bool chgAutoStp

Charger Auto Stop: default 1 - move to Charge Done when charging complete, 0 - remain in Maintain Charge mode.

Definition at line 497 of file MAX14690.h.

Charger Done Threshold, stop charging when charge current drops to this level: default 10% of fast charge current.

Definition at line 511 of file MAX14690.h.

bool chgEn

Charger Enable: default 1 - Enabled, 0 - Disabled.

Definition at line 505 of file MAX14690.h.

Fast Charge Timer, timeout for fast charge duration: default 300 min.

Definition at line 515 of file MAX14690.h.

CHGIN Input Current Limit Setting: default 500mA.

Definition at line 495 of file MAX14690.h.

Charger Status Change Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 471 of file MAX14690.h.

Charger Thermal Shutdown Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 479 of file MAX14690.h.

Charger Timeout Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 483 of file MAX14690.h.

bool intEnILim

Input Limit Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 473 of file MAX14690.h.

Buck1 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 485 of file MAX14690.h.

Buck2 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 487 of file MAX14690.h.

LDO1 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 489 of file MAX14690.h.

LDO2 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 491 of file MAX14690.h.

LDO3 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 493 of file MAX14690.h.

Thermal Regulation Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 481 of file MAX14690.h.

Thermal Status Change Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 469 of file MAX14690.h.

bool intEnUSBOK

USB OK Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 477 of file MAX14690.h.

USB Over Voltage Interrupt Enable: default 0 - Disabled, 1 - Enabled.

Definition at line 475 of file MAX14690.h.

Charger Precharge Current Setting: default 10% of fast charge current.

Definition at line 509 of file MAX14690.h.

LDO 2 Voltage in millivolts: default 3200.

Definition at line 529 of file MAX14690.h.

LDO 2 Mode Select: default LDO_DISABLED.

Definition at line 527 of file MAX14690.h.

LDO 3 Voltage in millivolts: default 3000.

Definition at line 533 of file MAX14690.h.

LDO 3 Mode Select: default LDO_DISABLED.

Definition at line 531 of file MAX14690.h.

Monitor Multiplexer Configuration: default MON_PULLDOWN.

Definition at line 539 of file MAX14690.h.

Monitor Multiplexer Divider Ratio Select: default MON_DIV4.

Definition at line 537 of file MAX14690.h.

Maintain Charge Timer, time to wait after reaching done current before disabling charger: default 0 min.

Definition at line 513 of file MAX14690.h.

Precharge Timer, timeout for precharge duration: default 60 min.

Definition at line 517 of file MAX14690.h.

bool pfnResEna

PFN pin resistor enable: default 1 - internal pullup/pulldown enabled, 0 - internal pullup/pulldown disabled.

Definition at line 549 of file MAX14690.h.

bool stayOn

Stay On Handshake: default 1 - remain on, 0 - turn off if not set within 5s of power-on.

Definition at line 551 of file MAX14690.h.

Thermistor Configuration: default THRM_ENABLED.

Definition at line 535 of file MAX14690.h.

Charger Precharge Voltage Threshold: default 3.00V.

Definition at line 507 of file MAX14690.h.