60 return {14, PSTR(
"SEC1 (Bit 14): SECURITY Mode")};
63 return {13, PSTR(
"SEC0 (Bit 13): SECURITY Mode")};
65 static Flag AUTHCALM() {
66 return {12, PSTR(
"AUTHCALM (Bit 12): Automatic CALIBRATION mode")};
68 static Flag CheckSumValid() {
69 return {9, PSTR(
"CheckSumValid (Bit 9): Checksum Valid")};
71 static Flag BTP_INT() {
72 return {7, PSTR(
"BTP_INT (Bit 7): Battery Trip Point Interrupt")};
75 return {3, PSTR(
"LDMD (Bit 3): LOAD Mode")};
78 return {2, PSTR(
"R_DIS (Bit 2): Resistance Updates")};
81 return {1, PSTR(
"VOK (Bit 1): Voltage OK for QMax Update")};
84 return {0, PSTR(
"QMax (Bit 0): QMax Updates. This bit toggles after every QMax update")};
93 static const byte ERR_CODE = 0b111;
95 return {0, PSTR(
"EC0 (Bit 0): Error Code")};
98 return {1, PSTR(
"EC1 (Bit 1): Error Code")};
101 return {2, PSTR(
"EC2 (Bit 2): Error Code")};
104 return {3, PSTR(
"EC3 (Bit 3): Error Code")};
107 return {4, PSTR(
"FD (Bit 4): Fully Discharged: [Battery ok; Battery fully depleted]")};
110 return {5, PSTR(
"FC (Bit 5): Fully Charged: [Battery not fully charged; Battery fully charged]")};
113 return {6, PSTR(
"DSG (Bit 6): Discharging: [Battery is charging; Battery is discharging]")};
116 return {7, PSTR(
"INIT (Bit 7): Initialization: [Inactive; Active]")};
119 return {8, PSTR(
"RTA (Bit 8): Remaining Time Alarm: [Inactive; Active]")};
122 return {9, PSTR(
"RCA (Bit 9): Remaining Capacity Alarm: [Inactive; Active]")};
125 return {11, PSTR(
"TDA (Bit 11): Terminate Discharge Alarm: [Inactive; Active]")};
128 return {12, PSTR(
"OTA (Bit 12): Overtemperature Alarm: [Inactive; Active]")};
131 return {14, PSTR(
"TCA (Bit 14): Terminate Charge Alarm: [Inactive; Active]")};
134 return {15, PSTR(
"OCA (Bit 15): Overcharged Alarm: [Inactive; Active]")};
144 return {27, PSTR(
"UTD (Bit 27): Undertemperature During Discharge")};
147 return {26, PSTR(
"UTC (Bit 26): Undertemperature During Charge")};
150 return {21, PSTR(
"CTOS (Bit 21): Charge Timeout Suspend")};
153 return {19, PSTR(
"PTOS (Bit 19): Precharge Timeout Suspend")};
156 return {13, PSTR(
"OTD (Bit 13): Overtemperature During Discharge")};
159 return {12, PSTR(
"OTC (Bit 12): Overtemperature During Charge")};
162 return {10, PSTR(
"ASCD (Bit 10): Short-Circuit During Discharge")};
165 return {8, PSTR(
"ASCC (Bit 8): Short-Circuit During Charge")};
168 return {6, PSTR(
"AOLD (Bit 6): Overload During Discharge")};
171 return {4, PSTR(
"OCD (Bit 4): Overcurrent During Discharge")};
174 return {2, PSTR(
"OCC (Bit 2): Overcurrent During Charge")};
177 return {1, PSTR(
"COV (Bit 1): Cell Overvoltage")};
180 return {0, PSTR(
"CUV (Bit 0): Cell Undervoltage")};
190 return {27, PSTR(
"UTD (Bit 27): Undertemperature During Discharge")};
193 return {26, PSTR(
"UTC (Bit 26): Undertemperature During Charge")};
196 return {20, PSTR(
"CTO (Bit 20): Charge Timeout")};
199 return {18, PSTR(
"PTO (Bit 18): Precharge Timeout")};
202 return {13, PSTR(
"OTD (Bit 13): Overtemperature During Discharge")};
205 return {12, PSTR(
"OTC (Bit 12): Overtemperature During Charge")};
208 return {10, PSTR(
"ASCD (Bit 10): Short-Circuit During Discharge")};
211 return {8, PSTR(
"ASCC (Bit 8): Short-Circuit During Charge")};
214 return {6, PSTR(
"AOLD (Bit 6): Overload During Discharge")};
217 return {4, PSTR(
"OCD (Bit 4): Overcurrent During Discharge")};
220 return {2, PSTR(
"OCC (Bit 2): Overcurrent During Charge")};
223 return {1, PSTR(
"COV (Bit 1): Cell Overvoltage")};
226 return {0, PSTR(
"CUV (Bit 0): Cell Undervoltage")};
236 return {26, PSTR(
"DFW (Bit 26): Data Flash Wearout Failure")};
239 return {24, PSTR(
"IFC (Bit 24): Instruction Flash Checksum Failure")};
241 static Flag DFETF() {
242 return {17, PSTR(
"DFETF (Bit 17): Discharge FET Failure")};
244 static Flag CFETF() {
245 return {16, PSTR(
"CFETF (Bit 16): Charge FET Failure")};
248 return {12, PSTR(
"VIMR (Bit 12): Voltage Imbalance While Pack Is At Rest Failure")};
251 return {11, PSTR(
"VIMA (Bit 11): Voltage Imbalance While Pack Is Active Failure")};
254 return {1, PSTR(
"SOV (Bit 1): Safety Cell Overvoltage Failure")};
263 static Flag EMSHUT() {
264 return {29, PSTR(
"EMSHUT (Bit 29): Emergency FET Shutdown")};
267 return {28, PSTR(
"CB (Bit 28): Cell Balancing")};
269 static Flag SLPCC() {
270 return {27, PSTR(
"SLPCC (Bit 27): CC Measurement in SLEEP mode")};
272 static Flag SLPAD() {
273 return {26, PSTR(
"SLPAD (Bit 26): ADC Measurement in SLEEP mode")};
275 static Flag SMBLCAL() {
276 return {25, PSTR(
"SMBLCAL (Bit 25): Auto-offset calibration when Bus low is detected")};
279 return {24, PSTR(
"INIT (Bit 24): Initialization after full reset")};
281 static Flag SLEEPM() {
282 return {23, PSTR(
"SLEEPM (Bit 23): SLEEP mode")};
285 return {22, PSTR(
"XL (Bit 22): 400-kHz mode")};
287 static Flag CAL_OFFSET() {
288 return {21, PSTR(
"CAL_OFFSET (Bit 21): Calibration Output (raw CC Offset data)")};
291 return {20, PSTR(
"CAL (Bit 20): Calibration Output (raw ADC and CC data)")};
293 static Flag AUTHCALM() {
294 return {19, PSTR(
"AUTHCALM (Bit 19): Auto CC Offset Calibration by MAC AutoCCOffset")};
297 return {18, PSTR(
"AUTH (Bit 18): Authentication in progress")};
300 return {16, PSTR(
"SDM (Bit 16): SHUTDOWN triggered via command")};
305 static Flag SLEEP() {
306 return {15, PSTR(
"SLEEP (Bit 15): SLEEP mode conditions met")};
309 return {14, PSTR(
"XCHG (Bit 14): Charging disabled")};
312 return {13, PSTR(
"XDSG (Bit 13): Discharging disabled")};
315 return {12, PSTR(
"PF (Bit 12): PERMANENT FAILURE mode status")};
318 return {11, PSTR(
"SS (Bit 11): SAFETY mode status")};
321 return {10, PSTR(
"SDV (Bit 10): SHUTDOWN triggered via low pack voltage")};
324 return {9, PSTR(
"SEC1 (Bit 9)")};
327 return {8, PSTR(
"SEC0 (Bit 8)")};
329 static Flag BTP_INT() {
330 return {7, PSTR(
"BTP_INT (Bit 7): Battery Trip Point (BTP) Interrupt output")};
333 return {2, PSTR(
"CHG (Bit 2): CHG FET status")};
336 return {1, PSTR(
"DSG (Bit 1): DSG FET status")};
346 return {15, PSTR(
"VCT (Bit 15): Charge Termination")};
349 return {14, PSTR(
"MCHG (Bit 14): Maintenance Charge")};
352 return {13, PSTR(
"SU (Bit 13): Charge Suspend")};
355 return {12, PSTR(
"IN (Bit 12): Charge Inhibit")};
358 return {11, PSTR(
"HV (Bit 11): High Voltage Region")};
361 return {10, PSTR(
"MV (Bit 10): Mid Voltage Region")};
364 return {9, PSTR(
"LV (Bit 9): Low Voltage Region")};
367 return {8, PSTR(
"PV (Bit 8): Precharge Voltage Region")};
370 return {6, PSTR(
"OT (Bit 6): Over Temperature Region")};
373 return {5, PSTR(
"HT (Bit 5): High Temperature Region")};
376 return {4, PSTR(
"STH (Bit 4): Standard Temperature High Region")};
379 return {3, PSTR(
"RT (Bit 3): Room Temperature Region")};
382 return {2, PSTR(
"STL (Bit 2): Standard Temperature Low Region")};
385 return {1, PSTR(
"LT (Bit 1): Low Temperature Region")};
388 return {0, PSTR(
"UT (Bit 0): Under Temperature Region")};
397 static Flag OCVFR() {
398 return {20, PSTR(
"OCVFR (Bit 20): Open Circuit Voltage in Flat Region (during RELAX)")};
401 return {19, PSTR(
"LDMD (Bit 19): LOAD mode")};
404 return {18, PSTR(
"RX (Bit 18): Resistance Update (Toggles after every resistance update)")};
407 return {17, PSTR(
"QMax (Bit 17): QMax Update (Toggles after every QMax update)")};
410 return {16, PSTR(
"VDQ (Bit 16): Discharge Qualified for Learning (based on RU flag)")};
413 return {15, PSTR(
"NSFM (Bit 15): Negative Scale Factor Mode")};
415 static Flag SLPQMax() {
416 return {13, PSTR(
"SLPQMax (Bit 13): QMax Update During Sleep")};
419 return {12, PSTR(
"QEN (Bit 12): Impedance Track Gauging (Ra and QMax updates are enabled)")};
422 return {11, PSTR(
"VOK (Bit 11): Voltage OK for QMax Update")};
425 return {10, PSTR(
"RDIS (Bit 10): Resistance Updates")};
428 return {8, PSTR(
"REST (Bit 8): Rest")};
431 return {7, PSTR(
"CF (Bit 7): Condition Flag")};
434 return {6, PSTR(
"DSG (Bit 6): Discharge/Relax")};
437 return {5, PSTR(
"EDV (Bit 5): End-of-Discharge Termination Voltage")};
439 static Flag BAL_EN() {
440 return {4, PSTR(
"BAL_EN (Bit 4): Cell Balancing")};
443 return {3, PSTR(
"TC (Bit 3): Terminate Charge")};
446 return {2, PSTR(
"TD (Bit 2): Terminate Discharge")};
449 return {1, PSTR(
"FC (Bit 1): Fully Charged")};
452 return {0, PSTR(
"FD (Bit 0): Fully Discharged")};
461 static Flag CAL_EN() {
462 return {15, PSTR(
"CAL_EN (Bit 15) CALIBRATION Mode")};
464 static Flag PF_EN() {
465 return {6, PSTR(
"PF_EN (Bit 6) Permanent Failure Mode")};
467 static Flag LF_EN() {
468 return {5, PSTR(
"LF_EN (Bit 5) Lifetime Data Collection Mode")};
470 static Flag FET_EN() {
471 return {4, PSTR(
"FET_EN (Bit 4) All FET Action Mode")};
473 static Flag GAUGE_EN() {
474 return {3, PSTR(
"GAUGE_EN (Bit 3) Gas Gauging Mode")};
476 static Flag DSG_TEST() {
477 return {2, PSTR(
"DSG_TEST (Bit 2)Discharge FET Test")};
479 static Flag CHG_TEST() {
480 return {1, PSTR(
"CHG_TEST (Bit 1) Charge FET Test")};
518 return {2, PSTR(
"Bit 2: OTFET - FET action in OVERTEMPERATURE mode")};
525 return {3, PSTR(
"Bit 3: CHGSU - FET action in CHARGE SUSPEND mode")};
532 return {4, PSTR(
"Bit 4: CHGIN - FET action in CHARGE INHIBIT mode")};
539 return {5, PSTR(
"Bit 5: CHGFET - FET action on valid charge termination")};
546 return {6, PSTR(
"Bit 6: SLEEPCHG - CHG FET enabled during sleep")};
571 return {0, PSTR(
"Bit 0: CC0—Cell Count")};
578 return {3, PSTR(
"Bit 3: IN_SYSTEM_SLEEP—In-system SLEEP mode")};
585 return {4, PSTR(
"Bit 4: SLEEP—SLEEP Mode")};
592 return {6, PSTR(
"Bit 6: CTEMP—Cell Temperature protection source")};
614 static Flag Update0() {
615 return {0, PSTR(
"Bit 0: Update0 - Update Status")};
617 static Flag Update1() {
618 return {1, PSTR(
"Bit 1: Update0 - Update Status")};
625 return {2, PSTR(
"Bit 2: Enable - Impedance Track gauging and lifetime updating is enabled")};
632 return {3, PSTR(
"Bit 3: QMax_update - QMax was updated in the field (in real conditions)")};
681 static Flag TDSETV() {
682 return {0, PSTR(
"Bit 0: TDSETV - Enables the TD flag set by the cell voltage threshold")};
684 static Flag TDCLEARV() {
685 return {1, PSTR(
"Bit 1: TDCLEARV - Enables the TD flag clear by cell voltage threshold")};
687 static Flag TDSETRSOC() {
688 return {2, PSTR(
"Bit 2: TDSETRSOC - Enables the TD flag set by RSOC threshold")};
690 static Flag TDCLEARRSOC() {
691 return {3, PSTR(
"Bit 3: TDCLEARRSOC - Enables the TD flag cleared by the RSOC threshold")};
693 static Flag TCSETV() {
694 return {4, PSTR(
"Bit 4: TCSETV - Enables the TC flag set by cell voltage threshold")};
696 static Flag TCCLEARV() {
697 return {5, PSTR(
"Bit 5: TCCLEARV - Enables the TC flag clear by cell voltage threshold")};
699 static Flag TCSETRSOC() {
700 return {6, PSTR(
"Bit 6: TCSETRSOC - Enables the TC flag set by the RSOC threshold")};
702 static Flag TCCLEARRSOC() {
703 return {7, PSTR(
"Bit 7: TCCLEARRSOC - Enables the TC flag cleared by the RSOC threshold")};
705 static Flag FCSETVCT() {
706 return {10, PSTR(
"Bit 10: FCSETVCT - Enables the FC flag set by primary charge termination")};
708 static Flag TCSETVCT() {
709 return {11, PSTR(
"Bit 11: TCSETVCT - Enables the TC flag set by primary charge termination")};
12.1.6 0x0A/0B BatteryStatus()
Definition: flags.h:91
12.2.31 AltManufacturerAccess() 0x0055 ChargingStatus()
Definition: flags.h:343
Data Flash: Settings; Configuration; 0x469B; DA Configuration; H1.
Definition: flags.h:564
static Flag IN_SYSTEM_SLEEP()
Definition: flags.h:577
static Flag CC0()
Definition: flags.h:570
static Flag SLEEP()
Definition: flags.h:584
static Flag CTEMP()
Definition: flags.h:591
Data Flash: Settings; Configuration; FET Options; H1.
Definition: flags.h:511
static Flag SLEEPCHG()
Definition: flags.h:545
static Flag CHGSU()
Definition: flags.h:524
static Flag CHGIN()
Definition: flags.h:531
static Flag CHGFET()
Definition: flags.h:538
static Flag OTFET()
Definition: flags.h:517
Data Flash: Gas Gauging; State; 0x420E; Update Status; H1.
Definition: flags.h:605
static Flag QMax_update()
Definition: flags.h:631
static const byte UPDATE_STATUS
Definition: flags.h:613
static Flag Enable()
Definition: flags.h:624
12.2.32 AltManufacturerAccess() 0x0056 GaugingStatus()
Definition: flags.h:395
12.1.1 0x00/01 ManufacturerAccessControl()
Definition: flags.h:57
12.2.33 AltManufacturerAccess() 0x0057 ManufacturingStatus()
Definition: flags.h:459
12.2.30 AltManufacturerAccess() 0x0054 OperationStatus()
Definition: flags.h:261
12.2.29 AltManufacturerAccess() 0x0053 PFStatus()
Definition: flags.h:233
Data Flash: Settings; Configuration; 0x4632; SOC Flag Config A; H2.
Definition: flags.h:679
12.2.26 AltManufacturerAccess() 0x0050 SafetyAlert()
Definition: flags.h:141
12.2.27 AltManufacturerAccess() 0x0051 SafetyStatus()
Definition: flags.h:187
Structure that stores flag information.
Definition: flags.h:36
byte n
Definition: flags.h:41
const char * caption
Definition: flags.h:46