SLUUCF2C January 2021 – May 2022 BQ769142
The BQ769142 device includes registers, which are stored in the RAM, and are integrated in one-time programmable (OTP) memory. At initial powerup, the device loads OTP settings into registers, which are used by the device firmware during operation. The device can also perform a reset on demand if the 0x0012 RESET() subcommand is sent. The recommended procedure is for the customer to write settings into OTP on the manufacturing line, in which case the device will use these settings whenever it is powered up. Alternatively, the host processor can initialize registers after powerup, without using the OTP memory, but the registers will need to be reinitialized after each power cycle of the device. Register values are preserved while the device is in NORMAL, SLEEP, or DEEPSLEEP modes. If the device enters SHUTDOWN mode, all register memory is cleared, and the device will return to the default parameters when powered again.
The OTP memory in the BQ769142 device is initially all-zeros. Each bit can be left as a "0" or written to a "1," but it cannot be written from a "1" back to a "0." The OTP memory includes two full images of the Data Memory configuration settings. At powerup, the device will XOR each setting in the first OTP image with the corresponding setting in the second OTP image and with the default value for the corresponding setting, with the resulting value stored into the RAM register for use during operation. This allows any setting to be changed from the default value using the first image, then changed back to the default once using the second image. The OTP memory also includes a 16-bit signature, which is calculated over most of the settings and stored in OTP. When the device is powered up, it will read the OTP settings and check that the signature matches that stored, to provide robustness against bit errors in reading or corruption of the memory. If a signature error is detected, the device will boot into the default configuration (as if the OTP is cleared).
The device supports up to eight different signature values, so up to eight partial changes in OTP can be made, with the signature updated accordingly. The OTP signature does not include the Manufacturing Data (available using the 0x0070 MANU_DATA() subcommand) nor any PF status data that was written to OTP (which is read using the 0x0053 SAVED_PF_STATUS() subcommand).
The OTP memory settings are typically written after the device is assembled onto the PCB, but before cells are attached to the board. Programming the OTP memory settings requires the voltage applied on the BAT pin and the temperature to be within allowed limits, per specifications. All configuration settings are first loaded into registers using the serial communication interface (see Chapter 10). The 0x00A0 OTP_WR_CHECK() subcommand can be sent to initiate a self-check whether OTP writing can be accomplished. The device must be in FULLACCESS and CONFIG_UPDATE modes when this subcommand is sent. Table 4-1 shows the 0x00A0 OTP_WR_CHECK() information the device returns.
Byte-0 | ||
---|---|---|
Bit | Name | Description |
7 | ProgrammingOK | If this bit is set, conditions are met for programming, and none of the remaining bits in this byte will be set. |
6 | Reserved | |
5 | Locked | The device is not in FULLACCESS and CONFIG_UPDATE mode or the OTP Lock bit was set to prevent further modification. |
4 | No_SIG | Signature cannot be written (indicating the signature has already been written too many times). |
3 | No_DATA | Could not program data (indicating data has been programmed too many times; no XOR bits left) |
2 | HighTemp | The measured internal temperature is above the allowed OTP programming temperature range. |
1 | LowVoltage | The measured stack voltage is below the allowed OTP programming voltage. |
0 | HighVoltage | The measured stack voltage is above the allowed OTP programming voltage. |
Bytes-1,2 | ||
If byte 0, bit 3 is set, then byte 1 and byte 2 will contain the LSB and MSB of the address of the first data value that could not be programmed. |
If the self-check is successful, then the actual OTP write can be initiated by sending the 0x00A1 OTP_WRITE() subcommand. This subcommand provides the same feedback as the 0x00A0 OTP_WR_CHECK() subcommand above, with byte-0, bit-7 being set if programming completed successfully. The time for OTP programming depends on the number of bytes that must be programmed, with the device taking approximately 200 μs per byte programmed.
Special exceptions are provided that allow programming the Manufacturing Data and PF status data to OTP during normal operation if Settings:Manufacturing:Mfg Status Init[OTPW_EN] is set.