SLUAA04A june   2020  – may 2023 BQ25150 , BQ25155 , BQ25618 , BQ25619 , TS5A12301E , TS5A3157 , TS5A3159A , TS5A6542

 

  1.   1
  2.   High-Efficiency Charging for TWS Using a 2-Pin Interface
  3.   Trademarks
  4. Introduction
  5. System Overview
    1. 2.1 Charging Case
      1. 2.1.1 BQ25619
      2. 2.1.2 TLV62568P
      3. 2.1.3 TPS22910A
      4. 2.1.4 TS5A12301E
      5. 2.1.5 MCU
    2. 2.2 Earbuds
      1. 2.2.1 BQ25155
      2. 2.2.2 TPS22910A
      3. 2.2.3 TS5A12301E
      4. 2.2.4 BT/SOC
  6. Charging Case Algorithm Implementation
    1. 3.1 Initialization and Main Code
    2. 3.2 UART Interrupt and Output Voltage Adjustment
  7. Earbud Algorithm Implementation
    1. 4.1 Initialization and Main Code
    2. 4.2 Interrupt and Transmission
  8. Test Procedure
  9. Test Results
    1. 6.1 Dynamic Voltage Adjustment
    2. 6.2 BQ25619 with 4.6-V Output
    3. 6.3 Standard Boost with 5V Output
  10. Summary
  11. Schematics
  12. PCB Layout
  13. 10Software
    1. 10.1 Charging Case main.c
    2. 10.2 Earbuds main.c
  14. 11Revision History

Interrupt and Transmission

When the MCU enters the ISR, it will first check to see if the interrupt was caused by VIN_PGOOD_FLAG. This is checked because the BQ25155 has many other interruptible flags that it can set, and for this application we are only using Vin flag. The end user can choose to take different actions for other flags that are set by the BQ25155.

If the Vin flag has been asserted, the internal ADC of the BQ25155 will be used to qualify the interrupt. This is done by reading Vin every 3 ms for 250 ms and comparing the comparing most recent three values. The interrupt will timeout if three consecutive values are not found to confirm the interrupt within 250 ms

If the interrupt is qualified, the Charge Complete register will then be checked. If the charging has been completed a charge complete bit will be transmitted. If the charging is not complete, the earbud battery voltage that was read in the main loop will be transmitted over UART. The transmission is completed by disabling the earbud load switch and enabling the analog switch. The data will then be pushed into the UART transmit buffer and sent to the case. The earbud will then immediately re-enter charging mode by toggling the switches. This prevents an accidental powering of the earbud logic pins when the case re-enters charging mode as a response to the communication. After this step, the earbud will return to the main loop.

GUID-F86F0090-3AE8-491D-BDC7-DD0CB88EDAA4-low.svg Figure 4-2 Earbud Interrupt Routine