In order to write to OTP, a voltage
between 10 to 12 V should be applied to the BAT pin and the device must be in
FULLACCESS mode. The recommended steps are listed below to write to OTP.
- Check whether OTP programming has
already been done on the device by reading one of the programmed registers. When
power is applied, registers will either report the default values or the values
programmed in OTP if OTP has been programmed. If OTP programming has not been
done, proceed to the next steps.
- Read the 0x12 Battery
Status[SEC1,SEC0] bits to verify the device is in FULL ACCESS mode
(0x01).
- If the device is in FULL ACCESS mode, enter CONFIG_UPDATE mode
- (Subcommand 0x0090).
- Configure the register settings
in data memory.
- Exit CONFIG_UPDATE mode -
(Subcommand 0x0092).
- Read the data memory registers to
verify all parameters were written successfully.
- Enter CONFIG_UPDATE mode.
- Check the Battery
Status[OTPB] bit is clear to verify OTP programming conditions are met.
- Read OTP_WR_CHECK() (Subcommand 0x00A0). If this returns a
value of 0x80, then OTP programming conditions are met.
- If OTP_WR_CHECK indicates conditions are met, send OTP_WRITE()
subcommand (0x00A1).
- Wait 100 ms. Read from 0x40 to
check if OTP programming was successful (0x80 indicates success).
- Exit CONFIG_UPDATE mode - (Subcommand 0x0092).