BQ27541 Hibernate Mode Disabling

Click here to load reader

  • date post

    02-Jul-2015
  • Category

    Software

  • view

    230
  • download

    6

Embed Size (px)

description

This is the manual method to disable Hibernate mode in fuel gauge BQ27541.

Transcript of BQ27541 Hibernate Mode Disabling

  • 1. How to set Hibernate I&V mode (bq27541-v200) in kernel driver

2. 1 3.2V GaugeIC Hibernate DUT 2 Hibernate GaugeIC Normal DUT( AC Adapter) Hibernate AC TI datasheet Hibernate GaugeIC reset GaugeIC datasheet 3. 3 1. Hibernate I&V Hibernate I&V 0 2. (1) GaugeIC UNSEALED/SEALED (2) (Sanyo/LG) UNSEALED (3) block data flash control The gauge will remain in HIBERNATE mode until any communication activity appears on the communication lines Upon exiting HIBERNATE mode, the [HIBERNATE] bit of CONTROL_STATUS is cleared. Since any communication activity wakes up the gauge from HIBERNATE mode, the host is required to set the [HIBERNATE] bit of the CONTROL_STATUS register to allow gauge to re-enter HIBERNATE mode. Because the fuel gauge is dormant in HIBERNATE mode, the battery should not be charged or discharged in this mode, because any changes in battery charge status will not be measured. If necessary, the host equipment can draw a small current (generally infrequent and less than 1mA, for purposes of low-level monitoring and updating); however, the corresponding charge drawn from the battery will not be logged by the gauge. Once the gauge exits to NORMAL mode, the IT algorithm will take about 3 seconds to re-establish the correct battery capacity and measurements, regardless of the total charge drawn in HIBERNATE mode. During this period of re-establishment, the gauge reports previously calculated values prior to entering HIBERNATE mode. The host can identify exit from HIBERNATE mode by checking if Voltage() < Hibernate Voltage or [HIBERNATE] bit is cleared by the gauge. If a charger is attached, the host should immediately take the fuel gauge out of HIBERNATE mode before beginning to charge the battery. Charging the battery in HIBERNATE mode will result in a notable gauging error that will take several hours to correct. 4. (4) Sub Class( 10 16 ) (5) block offset( 10 16 ) (6) Sub Class (7) checksum( = 255 - sum%256) (8) checksum (9) (10) GaugeIC (SEALED) 3. A500/510/701 (1) GaugeIC UNSEALED/SEALED GaugeIC SEALED UNSEALED high/low byte GaugeIC Sayno 1640-6303 40 0x00 16 0x01 1 5. (2) (Sanyo/LG) UNSEALED datasheet page.22 Security class sub class 112 (3) block data flash control (4) Sub Class( 10 16 ) (5) block offset( 10 16 ) A. 00 0x61 B. 44 0x3e(SubClass 68 16 0x44) C. 00 0x3f D. Hibernate I&V 6. E. (6) Sub Class Sub Class Hibernate I&V 0 sum 7. (7) checksum checksum = 255 - sum%256 (8) checksum A. 00 0x4b0x4c Hibernate I 0 B. 00 0x4d0x4e Hibernate V 0 C. checksum 0x60 8. (9) (10) GaugeIC (SEALED) 4 Fuel Gauge IC Hibernate I M 0 () 1. debug system stanbirg@stanbirg:~/codebase/image/ICS-PIM$ ./adb shell ( adb shell) shell@android:/ $ cd sys/BatControl/ ( sys/BatControl) shell@android:/sys/BatControl $ ls -al () -rw-r--r-- root root 4096 2011-12-16 06:44 BatCapacity -rw-r--r-- root root 4096 2011-12-16 06:44 BatCurrent 9. -rw-r--r-- root root 4096 2011-12-16 06:44 BatEnergyNow -rw-r--r-- root root 4096 2011-12-16 06:44 BatHealth -rw-r--r-- root root 4096 2011-12-16 06:44 BatPowerAVG -rw-r--r-- root root 4096 2011-12-16 06:44 BatStatus -rw-r--r-- root root 4096 2011-12-16 06:44 BatTemperature -rw-r--r-- root root 4096 2011-12-16 06:44 BatVoltage -rw-r--r-- root root 4096 2011-12-16 06:44 ChargerReset -rw-r--r-- root root 4096 2011-12-16 06:44 CheckLGHI -rw-r--r-- root root 4096 2011-12-16 06:44 CheckSYHI -rw-r--r-- root root 4096 2011-12-16 06:44 DisableHibernate -rw-r--r-- root root 4096 2011-12-16 06:44 GaugeReset -rw-r--r-- root root 4096 2011-12-16 06:44 SealStatus 2. Hibernate CheckSYHI check Sayno pack shell@android:/sys/BatControl $ cat CheckSYHI () write SY pw1 = 0 write SY pw2 = 0 0x61 = 0 0x3e = 0 0x3f = 0 FIRMWARE = 0 0x61 = 0 0x3e = 0 0x3f = 0 10. Hibernate I (0x4b) = 800 (I 0 !!!) Hibernate V (0x4d) = b80b (V 0 !!!) Change to Sealed Mode = 0 Hibernate I&V3. Hibernate I&V LG Sayno pack CheckLGHI ( CheckSYHI) -121 LG ( Sayno) shell@android:/sys/BatControl $ cat CheckLGHI () write LG pw1 = 0 write LG pw2 = 0 0x61 = -121 0x3e = -121 0x3f = 0 FIRMWARE = 0 0x61 = -121 0x3e = -121 0x3f = 0 Hibernate I (0x4b) = 0 Hibernate V (0x4d) = 0 Change to Sealed Mode = 0 LG CheckSYHI shell@android:/sys/BatControl $ cat CheckSYHI () write SY pw1 = 0 write SY pw2 = 0 0x61 = 0 0x3e = 0 11. 0x3f = 0 FIRMWARE = 0 0x61 = 0 0x3e = 0 0x3f = 0 Hibernate I (0x4b) = 0 ( 0) Hibernate V (0x4d) = 0 ( 0) Change to Sealed Mode = 0 Hibernate IC 3. Hibernate I&V OS IC (ex: I2C fail) shell@android:/sys/BatControl $ cat DisableHibernate ( 6 ) write SY pw1 = 0 write SY pw2 = 0 0x61 = 0 0x3e = 0 0x3f = 0 Hibernate I (0x4b) = 800 (I 0 !!!) Hibernate V (0x4d) = b80b (V 0 !!!) 0x61 = 0 0x3e = 0 0x3f = 0 =========== 0x40 = a ========= 12. ( pack checksum) =========== 0x41 = f0 ========= =========== 0x42 = 0 ========= =========== 0x43 = a ========= =========== 0x44 = 5 ========= =========== 0x45 = 0 ========= =========== 0x46 = 32 ========= =========== 0x47 = 1 ========= =========== 0x48 = c2 ========= =========== 0x49 = 14 ========= =========== 0x4a = 14 ========= =========== 0x4b = 0 ========= =========== 0x4c = 8 ========= =========== 0x4d = b ========= =========== 0x4e = b8 ========= =========== 0x4f = 32 ========= =========== 0x50 = 0 ========= =========== 0x51 = 0 ========= =========== 0x52 = 0 ========= =========== 0x53 = 0 ========= =========== 0x54 = 0 ========= =========== 0x55 = 0 ========= =========== 0x56 = 0 ========= =========== 0x57 = 0 ========= =========== 0x58 = 0 ========= =========== 0x59 = 0 ========= =========== 0x5a = 0 ========= 13. =========== 0x5b = 0 ========= =========== 0x5c = 0 ========= =========== 0x5d = 0 ========= =========== 0x5e = 0 ========= =========== 0x5f = 0 ========= =========== sum = 258 ========= =========== CHECKSUM = a7 ========= ( checksum ) 0x61 = 0 0x3e = 0 0x3f = 0 Clear Hibernate I (0x4b) = 0 ( I 0) Clear Hibernate I (0x4c) = 0 ( I 0) Clear Hibernate V (0x4d) = 0 ( V 0) Clear Hibernate V (0x4e) = 0 ( V 0) Checksum (0x60) = a7, Hibernate I (0x4b) = 0 ( 0) Hibernate V (0x4d) = 0 ( 0) Change to Sealed Mode = 0 Hibernate IC 4. SEALED shell@android:/sys/BatControl $ cat SealStatus () FAS = 4000 , SS = 2000 Reset status = 240 FAS/SS 0