ZHDA137 April   2026 TPS25751A , TPS26750A

 

  1.   1
  2.   摘要
  3.   商标
  4. 1其他 TI USB-PD 控制器的适用性
    1. 1.1 USB-PD 受电方简介
    2. 1.2 自动协商受电方用途
    3. 1.3 定义
  5. 2涉及的字段
  6. 3自动协商受电方基础知识与示例
    1. 3.1 自动协商 RDO 优先级 (ANRDOPriority)
    2. 3.2 自动计算受电方最小功率和自动协商受电方最小必需功率
    3. 3.3 “无能力不匹配”和“能力不匹配时自动禁用受电方”
    4. 3.4 自动计算受电方最小电压和自动协商最小电压
    5. 3.5 自动计算受电方最大电压和自动协商最大电压
  7. 4自动协商受电方基础知识与 EPR 示例
    1. 4.1 需要 ≥140W 功率的系统
    2. 4.2 受电路径 SPR 到 EPR 转换
  8. 5常见错误或特有系统限制
    1. 5.1 系统需要更高功率,但 PD 选择更低功率的 PDO
    2. 5.2 系统支持 EPR 电源,但 PD 继续选择 20V PDO
    3. 5.3 将“最小电压”和“最大电压”设置为相同的值
  9. 6高级自动协商受电方示例
    1. 6.1 降级至 5V 固定 PDO
    2. 6.2 使用中断驱动 EC 自动协商受电方
    3. 6.3 ANeg:自动协商受电方更新
    4. 6.4 AUTO_NEGOTIATE_SINK 寄存器
      1. 6.4.1 AUTO_NEGOTIATE_SINK 使用示例 1
      2. 6.4.2 AUTO_NEGOTIATE_SINK 使用示例 2
      3. 6.4.3 AUTO_NEGOTIATE_SINK 使用示例 3
      4. 6.4.4 AUTO_NEGOTIATE_SINK 使用示例 4
  10. 7参考资料

使用中断驱动 EC 自动协商受电方

大多数 EC 依靠中断来为许多器件提供服务。大多数 TI PD 控制器都提供有 I2Ct_IRQ(中断)线路,通常当 PD 具有 EC 的信息时该线路会置为低电平有效。举例来说,降级至 5V 固定 PDO 可为中断驱动,在 USB-PD GitHub 上就有这样的示例。下面是有关该示例的 EC/PD 流程的伪代码和基本信息。

while(true){
  if (connection_present() )
    break
}
// begin example code
// connection of USB-PD capable charger causes
// Plug Insert or Removal 
// New Contract as Consumer
// Source Capabilities Message Received
// to assert. 
interrupt_events = read_i2c1_irq()
if ( interrupt_events.plug_insert_or_removal ){
  // do something
} else if ( .... ){
   ...
}
// clear the interrupts by writing back the same bits
write_i2c1_clear(interrupt_events)
// setup the autonegotiate sink register to 5V max
reduce_power_5v()
// sets AUTO_NEGOTIATE_SINK.AutoComputeSinkMaxVoltage = 0
// sets AUTO_NEGOTIATE_SINK.AutoNegMaxVoltage = 100
write_4CC("ANeg")