When the crystal stops oscillating, the IC stops working, but will not change the CH bit of the register and set it to 1. When the main power supply VCC2 and the battery power supply VCC1 both experience a voltage drop, CH is automatically set to 1. Afterwards when the device is powered up again, initialization is required, setting CH to 0.