Skip to main content
Bhautik
Associate III
September 16, 2020
Question

[STUSB4500] How can we know attached type-c charger is PD compliant or not though I2C register?

  • September 16, 2020
  • 4 replies
  • 1636 views

Hello,

We are currently working on a USB type C based fast charging system design and interfacing STUSB4500 with MSP430G2553 to compliant PD for fast charging. 

We are successfully able to read and write registers through I2C.

So Is it require to implement policy engine, device policy manager, protocol layer and physical layer on software side? or Is it internally handle by STUSB4500?

Is it possible to check attached type-c charger is PD compliant though I2C register? If yes, than which register to indicate attached type-c charger is PD compliant?

Also How to know attached type-c charger is support 5V@3A/9V@2.5A/12V@1.9A through I2C register?

I have referred attached pdf file.

Regards,

Bhautik

    This topic has been closed for replies.

    4 replies

    Bhautik
    BhautikAuthor
    Associate III
    September 24, 2020

    Hello Team,

    Can any one please give hint or answer or any suggestion?

    Winfred LU
    ST Employee
    September 25, 2020

    Please refer to STSW-STUSB003, the Software Library package for STUSB4500

    https://www.st.com/content/st_com/en/products/embedded-software/evaluation-tool-software/stsw-stusb003.html

    This function "Print_PDO_FROM_SRC (Port);" prints the source capabilities received by the STUSB4500. Source capabilities are stored on the device connection in the structure, PDO_FROM_SRC.

    Bhautik
    BhautikAuthor
    Associate III
    September 28, 2020

    Hello Winfred,

    Thanks for update.

    Yes, this function "Print_PDO_FROM_SRC (Port);" prints the source capabilities received by the STUSB4500 like 5V, 9V & 12V.

    But How can I identify attached type-c charger is PD compliant or not? or Is there any function to get attached type-c charger is PD compliant or not?

    Regards,

    Bhautik

    Winfred LU
    ST Employee
    September 28, 2020

    Look into PORT_STATUS_1 register,

    if CC_ATTACH (bit 0) is 0, it means STUSB4500 is connected to a type C device;

    if CC_ATTACH is 1, it means STUSB4500 is connected to a PD source.

    Bhautik
    BhautikAuthor
    Associate III
    September 28, 2020

    Thanks Winfred.

    If CC_ATTACH (bit 0) is 0, means "standard DCP type C [1.5A/3A]" device attached [Not PD compliant adaptor i.e. Nokia adaptor or [Type A to Type C cable 5V,2A] which is USB C support but non-PD standard adaptor].

    If CC_ATTACH will not give this standard USB Type C non-PD compliant information than what is other option/register bits to get to find non-PD compliant standard USB Type C adaptor?

    Is it my right understanding??

    Also If I have 5V,500mA/1A non standard adaptor [old phone chargers which has micro B cable support] and use type A to type C cable than we will be detect by TUSB4500 and can also draw power to charge sink device?

    Winfred LU
    ST Employee
    September 29, 2020

    In the STUSB003 implementation, it checks not only register PORT_STATUS_1 bit 0, but also the time of connection has been made for more than 500 ms, to make sure there is no PD messages sent by the peer device. That means the adapter does not understand PD protocol, which implies that it is a Type C only adapter.

    In main.c:

     if((PD_status[Usb_Port].Port_Status.b.CC_ATTACH_STATE !=0) && (ConnectionStamp[Usb_Port] > 0))
     { 
     Print_Type_C_Only_Status(Usb_Port);
     }

    In USB_PD_core.c:

    void Print_Type_C_Only_Status(uint8_t Usb_Port) 
    {
     int Status;
     int timeout = HAL_GetTick( );
     if ( (timeout - ConnectionStamp[Usb_Port]) > 500 ) 
     /* Status of Type C only is comfirm only after 500 ms to verify that no PD messages are sent by conterpart */
     {
     ...
     }
    ...
    }

    A better way is to check PE_FSM register (offset 0x29),

    when the value is 0x12 (which means PE is disabled) the adapter is type C only.

    >Also If I have 5V,500mA/1A non standard adaptor [old phone chargers which has micro B cable support] and use type A to type C cable than we will be detect by TUSB4500 and can also draw power to charge sink device?

    Yes.