Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MAX14720 MAX30205 USBDevice
MAX14720Info.cs
00001 /******************************************************************************* 00002 * Copyright (C) 2016 Maxim Integrated Products, Inc., All rights Reserved. 00003 * 00004 * This software is protected by copyright laws of the United States and 00005 * of foreign countries. This material may also be protected by patent laws 00006 * and technology transfer regulations of the United States and of foreign 00007 * countries. This software is furnished under a license agreement and/or a 00008 * nondisclosure agreement and may only be used or reproduced in accordance 00009 * with the terms of those agreements. Dissemination of this information to 00010 * any party or parties not specified in the license agreement and/or 00011 * nondisclosure agreement is expressly prohibited. 00012 * 00013 * The above copyright notice and this permission notice shall be included 00014 * in all copies or substantial portions of the Software. 00015 * 00016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00017 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00018 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00019 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES 00020 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00021 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00022 * OTHER DEALINGS IN THE SOFTWARE. 00023 * 00024 * Except as contained in this notice, the name of Maxim Integrated 00025 * Products, Inc. shall not be used except as stated in the Maxim Integrated 00026 * Products, Inc. Branding Policy. 00027 * 00028 * The mere transfer of this software does not imply any licenses 00029 * of trade secrets, proprietary technology, copyrights, patents, 00030 * trademarks, maskwork rights, or any other form of intellectual 00031 * property whatsoever. Maxim Integrated Products, Inc. retains all 00032 * ownership rights. 00033 ******************************************************************************* 00034 */ 00035 00036 using System; 00037 using System.Collections.Generic; 00038 using System.Linq; 00039 using System.Text; 00040 using HealthSensorPlatform.DeviceDescriptions; 00041 using RPCSupport.DeviceSupport; 00042 00043 namespace Maxim.CustomControls 00044 { 00045 /// <summary> 00046 /// PMIC Register Information 00047 /// </summary> 00048 public class MAX14720Info : Device 00049 { 00050 00051 public MAX14720Info() 00052 { 00053 deviceDetails = new DeviceDetails(); 00054 deviceDetails.InitI2c(2, 0x54); 00055 00056 initalizeDescription(); 00057 00058 } 00059 00060 void initalizeDescription() 00061 { 00062 Info = new RegisterInfo[] { 00063 new RegisterInfo("ChipId",0x00), 00064 new RegisterInfo("ChipRev",0x01), 00065 new RegisterInfo("BoostCDiv",0x03), 00066 new RegisterInfo("BoostISet",0x04), 00067 new RegisterInfo("BoostVSet",0x05), 00068 new RegisterInfo("BoostCfg",0x06), 00069 new RegisterInfo("BuckVSet",0x07), 00070 new RegisterInfo("BuckCfg",0x08), 00071 new RegisterInfo("BuckISet",0x09), 00072 new RegisterInfo("LDOVSet",0x0A), 00073 new RegisterInfo("LDOCfg",0x0B), 00074 new RegisterInfo("SwitchCfg",0x0C), 00075 new RegisterInfo("BatTime",0x0D), 00076 new RegisterInfo("BatCfg",0x0E), 00077 new RegisterInfo("BatBCV",0x0F), 00078 new RegisterInfo("BatOCV",0x10), 00079 new RegisterInfo("BattLCV",0x11), 00080 new RegisterInfo("MONCfg",0x19), 00081 new RegisterInfo("BoostCfg",0x1A), 00082 new RegisterInfo("PinStat",0x1B), 00083 new RegisterInfo("BBBExtra",0x1C), 00084 new RegisterInfo("HandShk",0x1D), 00085 new RegisterInfo("UVLOCfg",0x1E), 00086 new RegisterInfo("PWROFF",0x1F) 00087 }; 00088 00089 // register 0x00 00090 Descriptions(0x00).Add("Bit [7:0]", "ChipId", "Version information"); 00091 // register 0x01 00092 Descriptions(0x01).Add("Bit [7:0]", "ChipRev", "Revison Information"); 00093 // register 0x03 00094 Descriptions(0x03).Add("Bit 7", "ClkDivEn", @"Boost Current-Limited Output Mode Enable 00095 This allows the boost regulator to be operated in a current limited output mode. 00096 0: Normal Operation, Full Output Current Capability 00097 1: Divided Clock Current Limited Mode 00098 When the clock divider is enabled, the boost is operated with a fixed peak current limit and programmable 00099 frequency. The peak current is set by BoostISet[2:0] and the switching frequency is determined by 00100 ClkDivSet[6:0]. The regulator will stop switching when the voltage is above the set point and will only run when 00101 the voltage is below the output setting. This mode can only be enabled once the output voltage is set higher 00102 than the input voltage."); 00103 // register 0x03 00104 Descriptions(0x03).Add("Bit [6:0]", "ClkDivSet", @"Current-Limited Boost Clock Divider Setting 00105 When the current limited mode is enabled, the frequency of the boost regulator in current limited mode will be 00106 the frequency of the oscillator divided by the value of (10 + ClkDivSet[6:0]). The range is fOSC/10 to fOSC/137."); 00107 // register 0x04 00108 Descriptions(0x04).Add("Bit [2:0]", "BoostISet", @"Buck-Boost Peak Current-Limit Setting 00109 000: 0 (Minimum On-Time) 00110 001: 50mA 00111 010: 100mA 00112 011: 150mA 00113 100: 200mA 00114 101: 250mA 00115 110: 300mA 00116 111: 350mA"); 00117 // register 0x05 00118 Descriptions(0x05).Add("Bit [4:0]", "BoostVSet[4:0]", @"Boost Output Voltage Setting. This setting is internally latched and can change only when boost is disabled. 00119 2.5V to 5.0V, linear scale, 100mV increments 00120 000000 = 2.5V 00121 000001 = 2.6V 00122 … 00123 011001 = 5.0V 00124 > 011001 = 5.0V"); 00125 // register 0x06 00126 Descriptions(0x06).Add("Bit [7:5]", "BoostSeq[2:0]", @"Boost Enable Configuration (Read-Only) 00127 000 = Disabled 00128 001 = Reserved 00129 010 = Enabled at 0% of Boot/POR Process Delay Control 00130 011 = Enabled at 25% of Boot/POR Process Delay Control 00131 100 = Enabled at 50% of Boot/POR Process Delay Control 00132 101 = Reserved 00133 110 = Controlled by HVEN (MAX14750) 00134 111 = Controlled by BoostEn [1:0] after 100% of Boot/POR Process Delay Control (MAX14720)"); 00135 Descriptions(0x06).Add("Bit [4:3]", "BoostEn[1:0]", @"Boost Enable Configuration (effective only when BoostSeq[2:0] == 111) 00136 00 = Disabled. Active discharge behavior depends on BoostActDsc. 00137 01 = Enabled 00138 10 = Enabled when MPC is high 00139 11 = Reserved"); 00140 Descriptions(0x07).Add("Bit 1", "BoostEMI", @"Boost EMI reduction. Dampens ringing of the inductor when in discontinuous mode 00141 0 = EMI damping active (improve EMI) 00142 1 = EMI damping disabled (improve Efficiency)"); 00143 Descriptions(0x08).Add("Bit 0", "BoostInd", @"Boost Inductance Select 00144 1 = Inductance is 3.3µH 00145 0 = Inductance is 4.7µH"); 00146 // register 0x07 00147 Descriptions(0x07).Add("Bit [5:0]", "BuckVSet[5:0]", @"Buck Output Voltage Setting This setting is internally latched and can change only when buck is disabled. 00148 1.0V to 2.0V, linear scale, 25mV increments 00149 000000 = 1.000V 00150 000001 = 1.025V 00151 … 00152 101000 = 2.0V 00153 > 101000 = 2.0V"); 00154 // register 0x08 00155 Descriptions(0x08).Add("Bit [7:6]", "BuckSeq[2:0]", @"Buck Enable Configuration (Read-Only) 00156 000 = Disabled 00157 001 = Reserved 00158 010 = Enabled at 0% of Boot/POR Process Delay Control 00159 011 = Enabled at 25% of Boot/POR Process Delay Control 00160 100 = Enabled at 50% of Boot/POR Process Delay Control 00161 101 = Reserved 00162 110 = Controlled by BEN (MAX14750) 00163 111 = Controlled by BuckEn [1:0] after 100% of Boot/POR Process Delay Control"); 00164 Descriptions(0x08).Add("Bit [4:3]", "BuckEn[1:0]", @"Buck Enable Configuration (effective only when BuckSeq[2:0] == 111) 00165 00 = Disabled. Active discharge behavior depends on BuckActDsc. 00166 01 = Enabled 00167 10 = Enabled when MPC is high 00168 11 = Reserved"); 00169 Descriptions(0x08).Add("Bit [2:1]", "BuckMd[1:0]", @"Buck Mode Select 00170 00 = Burst mode 00171 01 = Forced PWM mode 00172 10 = Forced PWM mode when MPC is high 00173 11 = Reserved"); 00174 Descriptions(0x08).Add("Bit 0", "BuckFst", @"Buck Fast Start 00175 0 = Normal startup current limit 00176 1 = Double the startup current to reduce the startup time by half"); 00177 // register 0x09 00178 Descriptions(0x09).Add("Bit [7:5]", "BuckISet[2:0]", @"Buck Peak Current Limit Setting 00179 000: 50mA 00180 001: 100mA 00181 010: 150mA 00182 011: 200mA 00183 100: 250mA 00184 101: 300mA 00185 110: 350mA 00186 111: 400mA"); 00187 Descriptions(0x09).Add("Bit 4", "BuckCfg", @"Buck Configuration 00188 0 = set to 0 for burst mode 00189 1 = set to 1 for FPWM mode"); 00190 Descriptions(0x09).Add("Bit 3", "BuckInd", @"Buck Inductance Select 00191 0 = Inductance is 2.2µH 00192 1 = Inductance is 4.7µH"); 00193 Descriptions(0x09).Add("Bit 2", "BuckHysOff", @"Buck Hysteresis Off 00194 0 = Enable comparator hysteresis 00195 1 = Disable comparator hysteresis (recommended to reduce voltage ripple)"); 00196 Descriptions(0x09).Add("Bit 1", "BuckMinOT", @"Buck Minimum On-Time 00197 0 = Enable deglitch delay on comparator for better efficiency 00198 1 = Disable deglitch delay on comparator to minimize voltage ripple"); 00199 Descriptions(0x09).Add("Bit 0", "BuckInteg", @"Buck Integrate 00200 0 = Helps stabilize the buck regulator for high currents with small output capacitor 00201 1 = Better load regulation at high current (recommended for output capacitance > 6µF)"); 00202 // register 0x0a 00203 Descriptions(0x0A).Add("Bit [4:0]", "LDOVSet[4:0]", @"LDO Output Voltage Setting 00204 0.9V to 4V, linear scale, 100mV increments 00205 00000 = 0.9V 00206 00001 = 1.0V 00207 … 00208 10000 = 2.5V 00209 … 00210 11111 = 4.0V"); 00211 // register 0x0b 00212 Descriptions(0x0B).Add("Bit [7:5]", "LDOSeq[2:0]", @"LDO Enable Configuration (Read-Only) 00213 000 = Disabled 00214 001 = Enabled always when BAT/SYS is present 00215 010 = Enabled at 0% of Boot/POR Process Delay Control 00216 011 = Enabled at 25% of Boot/POR Process Delay Control 00217 100 = Enabled at 50% of Boot/POR Process Delay Control 00218 101 = Disabled 00219 110 = Controlled by LEN (MAX14750) 00220 111 = Controlled by LDOEn[1:0] after 100% of Boot/POR Process Delay Control"); 00221 Descriptions(0x0B).Add("Bit 4", "LDOActDsc", @"LDO Active Discharge Control 00222 0: LDO output will be discharged only entering off and hard-reset modes. 00223 1: LDO output will be discharged only entering off and hard-reset modes and when the enable is low."); 00224 Descriptions(0x0B).Add("Bit 3", "LDOActDsc", @"LDO Active Discharge Control 00225 0: LDO output will be actively discharged only entering off and hard-reset modes. 00226 1: LDO output will be actively discharged only entering off and hard-reset modes and when the enable is low."); 00227 Descriptions(0x0B).Add("Bit [2:1]", "LDOEn[1:0]", @"LDO Enable Configuration (effective only when LDOSeq[2:0] == 111) 00228 00 = Disabled 00229 01 = Enabled 00230 10 = Enabled when MPC is high 00231 11 = Reserved"); 00232 Descriptions(0x0B).Add("Bit 0", "LDOMode", @"LDO Mode Control 00233 0 = Normal LDO operating mode 00234 1 = Load switch mode. FET is either fully on or off depending on the state of LDOEn. When FET is on, the 00235 output is unregulated and is not affected by UVLO’s control block. This setting is internally latched and can 00236 change only when the LDO is disabled."); 00237 // register 0x0c 00238 Descriptions(0x0C).Add("Bit [7:5]", "SWSeq[2:0]", @"SW Enable Configuration (Read-Only) 00239 000 = Disabled 00240 001 = Enabled always when BAT/SYS is present 00241 010 = Enabled at 0% of Boot/POR Process Delay Control 00242 011 = Enabled at 25% of Boot/POR Process Delay Control 00243 100 = Enabled at 50% of Boot/POR Process Delay Control 00244 101 = Disabled 00245 110 = Controlled by SWEN (MAX14750) 00246 111 = Controlled by SWEn[1:0] after 100% of Boot/POR Process Delay Control"); 00247 Descriptions(0x0C).Add("Bit [2:1]", "SWSoftStart", @"SW Enable Configuration (effective only when SWSeq[2:0] == 111) 00248 00 = Disabled 00249 01 = Enabled 00250 10 = Enabled when MPC is high 00251 11 = Reserved"); 00252 // register 0x0d 00253 Descriptions(0x0d).Add("Bit [5:4]", "BCVTm[1:0]", @"Battery Cell Voltage Timing 00254 00: Skip battery measurement 00255 01: Take battery measurement after 10ms delay 00256 10: Take battery measurement after 100ms delay 00257 11: Take battery measurement after 1000ms delay"); 00258 Descriptions(0x0d).Add("Bit [3:2]", "OCVTm[1:0]", @"Battery Open Cell Voltage Timing 00259 If this step is skipped, LCV measurement will be taken with switch closed 00260 00: Skip OCV measurement 00261 01: Take OCV measurement after 10ms delay 00262 10: Take OCV measurement after 100ms delay 00263 11: Take OCV measurement after 1000ms delay"); 00264 Descriptions(0x0d).Add("Bit [1:0]", "LCVTm[1:0]", @"Battery Loaded Cell Voltage Timing 00265 00: Skip LCV measurement 00266 01: Take LCV measurement after 10ms delay 00267 10: Take LCV measurement after 100ms delay 00268 11: Take LCV measurement after 1000ms delay"); 00269 // register 0x0e 00270 Descriptions(0x0e).Add("Bit 7", "BIA", @"Battery Impedance Active 00271 Write 1 to start battery impedance measurement. If the measurement is already running, the write is ignored. 00272 Bit will remain high until the measurement is completed. 00273 0: Battery impedance measurement is not ongoing 00274 1: Battery impedance measurement is ongoing"); 00275 Descriptions(0x0e).Add("Bit 6", "BIMAbort", @"Battery Impedance Measurement Skip 00276 Write 1 to immediately abort the battery impedance measurement 00277 0: Battery impedance measurement is aborted 00278 1: Battery impedance measurement is not aborted yet"); 00279 Descriptions(0x0e).Add("Bit 3", "LcvDly2Skip", @"Write 1 to skip the second delay time (equal again to LCVTm) after LCV Measurement is taken. This second 00280 delay time allows VCC to recover its unloaded value before closing the power switch again. 00281 0: Wait second delay time 00282 1: Skip second delay time"); 00283 Descriptions(0x0e).Add("Bit [2:0]", "BatimpCur[2:0]", @"Battery Impedance Current 00284 000: 0 00285 001: 250µA 00286 010: 500µA 00287 011: 1mA 00288 100: 2mA 00289 101: 4mA 00290 110: 8mA 00291 111: Reserved"); 00292 // register 0x0f 00293 Descriptions(0x0f).Add("Bit [7:0]", "BatV[7:0]", @"Battery Voltage Measurement Result 00294 8-bit battery voltage measurement: VCC = [ 2.6 * (BCV[7:0]/255) + 1.1 ] V 00295 If BCVTm[2:0] = 00, BCV[7:0] = 0000 0000. 00296 If error occurs or the measurement is aborted, BCV[7:0] =1111 1111."); 00297 // register 0x10 00298 Descriptions(0x10).Add("Bit [7:0]", "BatOCV[7:0]", @"Battery Voltage Measurement Result 00299 8-bit battery voltage measurement: VCC = [2.6 x (OCV[7:0]/255) + 1.1] V 00300 If OCVTm[2:0] = 00, OCV[7:0] =0000 0000. 00301 If error occurs or the measurement is aborted, OCV[7:0] =1111 1111."); 00302 // register 0x11 00303 Descriptions(0x11).Add("Bit [7:0]", "LCV[7:0]", @"Battery Voltage Measurement Result 00304 8 bit battery voltage measurement: VCC = [2.6 x ( LCV[7:0]/255) + 1.1] V 00305 If LCVTm[2:0] = 00, BCV[7:0] = 0000 0000. 00306 If error occurs or the measurement is aborted, LCV[7:0] =1111 1111."); 00307 // register 0x19 00308 Descriptions(0x19).Add("Bit 7", "MonEn", @"Monitor Enable 00309 0 = Monitor function disabled 00310 1 = Monitor function enabled"); 00311 Descriptions(0x19).Add("Bit 3", "MONtHiZ", @"MON OFF MODE Condition 00312 0 = Pulled Low by a 100k Pulldown Resistor 00313 1 = Hi-Z"); 00314 Descriptions(0x19).Add("Bit [2:0]", "MONCtr[2:0]", @"MON Pin Source Selection 00315 000 = MON connected to SWIN 00316 001 = MON connected to SWOUT 00317 010 = MON connected to BIN 00318 011 = MON connected to BOUT 00319 100 = MON connected to HVIN 00320 101 = MON connected to HVOUT 00321 110 = MON connected to LIN 00322 111 = MON connected to LOUT"); 00323 // register 0x1a 00324 Descriptions(0x1a).Add("Bit [7:4]", "PwrRstCfg[4:0]", @"0000: Pin Controlled (MAX14750) 00325 0110: Push-Button Monitor (MAX14720)"); 00326 Descriptions(0x1a).Add("Bit 3", "SftRstCfg", @"Soft Reset Register Default 00327 0 = Registers do not reset to default values on soft reset 00328 1 = Registers reset to default values on soft reset"); 00329 Descriptions(0x1a).Add("Bit 2", "PFNPUDCfg", @"KIN Pullup/Pulldown Configuration 00330 0 = Pullups and pulldowns on control lines disabled 00331 1 = Selective pullups and pulldowns enabled on KIN pin"); 00332 Descriptions(0x1a).Add("Bit [1:0]", "BootDly[1:0]", @"Boot/POR Process tRESET Delay Control 00333 00 = 80ms 00334 01 = 120ms 00335 10 = 220ms 00336 11 = 420ms"); 00337 // register 0x1b 00338 Descriptions(0x1a).Add("Bit 3", "/KIN", @"Input State 00339 0 = Pin low 00340 1 = Pin high"); 00341 Descriptions(0x1a).Add("Bit 2", "/KOUT", @"Input State 00342 0 = Pin low 00343 1 = Pin high"); 00344 Descriptions(0x1a).Add("Bit 1", "MPC", @"Input State 00345 0 = Pin low 00346 1 = Pin high"); 00347 Descriptions(0x1a).Add("Bit 0", "/RST", @"Input State 00348 0 = Pin low 00349 1 = Pin high"); 00350 // register 0x1c 00351 Descriptions(0x1c).Add("Bit 7", "BoostHysOff", @"Boost Hysteresis Off 00352 0 = Enable comparator hysteresis 00353 1 = Disable comparator hysteresis (recommended to reduce voltage ripple)"); 00354 Descriptions(0x1c).Add("Bit 6", "BoostPacDsc", @"Boost Passive Discharge Control 00355 0: Boost output will be discharged only when entering off and hard-reset modes. 00356 1: Boost output will be discharged only when entering off and hard-reset modes and when BoostEn is set to 00."); 00357 Descriptions(0x1c).Add("Bit 5", "BoostActDsc", @"Boost Active Discharge Control 00358 0: Boost output will be discharged only when entering off and hard-reset modes. 00359 1: Boost output will be discharged only when entering off and hard-reset modes and when BoostEn is set to 00."); 00360 Descriptions(0x1c).Add("Bit 2", "BuckActDsc", @"Buck Passive Discharge Control 00361 0: Buck output will be discharged only when entering off and hard-reset modes. 00362 1: Buck output will be discharged only when entering off and hard-reset modes and when BuckEn is set to 00."); 00363 Descriptions(0x1c).Add("Bit 1", "BuckActDsc", @"Buck Active Discharge Control 00364 0: Buck output will be discharged only when entering off and hard-reset modes. 00365 1: Buck output will be discharged only when entering off and hard-reset modes and when BuckEn is set to 00."); 00366 Descriptions(0x1c).Add("Bit 0", "BuckFScl", @"Buck Force FET scaling (it reduces IQ by lowering the nMOS power to 20% of the nominal value) 00367 0: FET Scaling only enabled during the buck turn-on sequence 00368 1: FET Scaling enabled during the buck turn-on sequence and also in the buck active state."); 00369 // register 0x1d 00370 Descriptions(0x1d).Add("Bit 7", "StartOff", @"Start In Off 00371 1: The device will start in the off mode. 00372 0: The device begins the power-on sequence after a VCC power on reset."); 00373 Descriptions(0x1d).Add("Bit 6", "GlbPasDsc", @"Global Passive Discharge 00374 0: Passive discharge loads are disabled in off mode. 00375 1: Passive discharge loads are enabled in off mode."); 00376 Descriptions(0x1d).Add("Bit 0", "StayOn", @"Processor Handshake 00377 This bit is used to ensure that the processor booted correctly. This bit must be set within 5s of power-on to 00378 prevent the part from shutting down and returning to the power-off condition. This bit has no effect after being 00379 set. 00380 0 = Shutdown 5s after power-on 00381 1 = Stay on"); 00382 // register 0x1e 00383 Descriptions(0x1e).Add("Bit 1", "BBBUVLOSel", @"Buck/Buck-Boost UVLO Select 00384 0: Buck and buck-boost are turned off/on according to LIN_UVLO thresholds 00385 1: Buck and buck-boost are turned off/on according to BIN_UVLO thresholds"); 00386 Descriptions(0x1e).Add("Bit 0", "LDOUVLOsel", @"LDO UVLO Select 00387 0: LDO is turned off/on according to LIN_UVLO thresholds 00388 1: LDO is turned off/on according to BIN_UVLO thresholds"); 00389 // register 0x1f 00390 Descriptions(0x1f).Add("Bit [7:0]", "PWROFFCMD[7:0]", @"Power-Off Command 00391 Writing 0xB2 to this register will place the part in the off state/seal mode. Waking up the device from this mode 00392 requires a low pulse on /KIN. 00393 All other codes = Do nothing"); 00394 } 00395 } 00396 }
Generated on Thu Jul 28 2022 18:07:15 by
1.7.2