SLUAA04A june 2020 – may 2023 BQ25150 , BQ25155 , BQ25618 , BQ25619 , TS5A12301E , TS5A3157 , TS5A3159A , TS5A6542
When the UART RX interrupt is triggered, the interrupt will check if a charge complete byte has been received. If the charge has been completed, the MCU will set the case to low power mode and wait for a system state change. If a charge complete byte was not received, the MCU will store the received earbud battery voltage and continue the interrupt.
The PWM duty cycle will then be calculated with the newly received earbud battery voltage. This calculation is based on resistor divider and filter that are connected to the feedback pin of the TLV62568P. An excel calculator, Design Tool for Output Voltage Adjustment using a DAC, for these values can be found here.
The calculation needs to be adjusted to produce an output voltage of approximately 200 mV above the current earbud battery voltage to account for the headroom needed by the earbud battery charger. After this calculation is done, the PWM duty cycle value is qualified to prevent a voltage under 3 V or over 4.5 V from being applied. If the value is found to be good, the MCU will adjust the PWM duty cycle and the output voltage will follow.
To re-enter charging mode, the analog switch is toggled off and the load switch is re-activated. The interrupt will then terminate.