The shutdown timer is implemented to prevent I2C activity from re-awakening the fuel gauge during the shutdown process. By default, the timer is set to 45 seconds, but a shutdown can be performed in anywhere between 1.4 seconds and 1.6 hours.
- To set the timeout period between 45s and 1.6h, set the THR bits of the ShdnTimer register according to the formula:
- Shutdown Time-Out Period = 175.8ms × 2(8+THR)
- To achieve shutdown in less than 45s, you can skip a portion of the timeout period by writing to the ShdnTimer register. When the SHDN command is sent, the CTR bits of ShdnTimer begin counting at 0 in 1.4s increments, and the shutdown is triggered one cycle after the count matches the threshold set by the THR bits. The default THR value of 0 corresponds to a count of 0x1F. To trigger a faster shutdown, follow this sequence:
- Set the SHDN bit in the Config register to begin the shutdown timer
- Write the ShdnTimer register to 0x001F - [delay(seconds) / 1.4]. Writing ShdnTimer to 0x001F triggers the fastest possible shutdown in about 1.4s.
- Ensure that ther is no I2C activity after the shutdown timer expires, or the fuel gauge will re-enter active mode.