ACFET/RBFET and BATFET can never be on at the same time, otherwise there would be a short from the adapter input to the battery. The process always starts from ACDET, which cannot be ignored by the controller, although it can be directly connected to ground. If ACDET is low, ACFET/RBFET will immediately turn off; if ACDET goes high, ACFET/RBFET turns on after the ACOK rising deglitch time. This rising deglitch time can be adjusted in REG0x37[12]. However, it is important to note that even if the ACOK pin is always low (grounded), ACFET/RBFET will still turn on. Also, if ACDET is high but then goes from low to high within 3µs, ACDET will not detect the low signal. This 3µs falling deglitch time is an average, so there are no upper and lower bounds for this spec on the datasheet. Then, the sequences are as follows:
Adapter plug in: ACDET high (valid adapter) -> BATFET off -> ACFET/RBFET on
Adapter unplug: ACDET low (invalid or no adapter) -> ACFET/RBFET off -> BATFET on
If a valid adapter is not detected (invalid adapter) by ACDET, ACFET/RBFET turn off and the ACN pin voltage decreases. Once this voltage falls below the VACNSRN_FALL threshold (typically SRN + 200mV), BATFET turns on. Note that in the adapter unplug sequence, there is a period where both ACFET/RCFET and BATFET are off.
Battery removal and insertion cases function similarly to adapter plug in and unplug cases. If a battery is removed while an adapter is present, /BATPRES is pulled high, meaning the ACFET/RBFET will not turn on until BATFET is turned off, disabling charging and hybrid power boost mode. However, the host can reenable charging and hybrid power boost mode when /BATPRES is high by writing to REG0x14() and REG0x15(). If a battery is going to be inserted while an adapter is present, charging should first be disabled and then /BATPRES will be pulled low.
Refer to section 7.3.2 of the datasheet for the conditions in which an adapter is valid or invalid. These conditions act as a protection against reverse current from the battery to the adapter. An interlock function between ACDRV and BATDRV ensures BATFET is turned off before ACFET is turned on. The charge pump for ACDRV is powered by the VCC pin, where the charge pump ground is referenced to the CMSRC pin voltage. The charge pump for BATDRV is powered by the battery. There are no specs for the timings between steps in the above sequences. The key is just that there is no current going into the battery through BATFET.