2020-09-15 09:52 PM
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
2020-09-24 05:07 AM
Hello Team,
Can any one please give hint or answer or any suggestion?
2020-09-24 10:51 PM
Please refer to STSW-STUSB003, the Software Library package for STUSB4500
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.
2020-09-27 08:05 PM
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
2020-09-27 10:36 PM
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.
2020-09-28 02:40 AM
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?
2020-09-28 11:01 PM
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.