2021-04-16 02:03 PM
Hi,
I have issues to get the source PDO capabilities by STUSB4500. My power source has 4 source PDOs as below:
But I most time got below:
Verifying the PD message registers, I got:
0x30 1 2 3 4 5 6 7 8 9 a b c d e f
00 66 07 7D 4B 1A EC 20 D1 02 00 2C B1 04 00 2C
41 06 00 ED F1 E2 0C 00 00 00 00 00 00 18 E3 00
I picked up the message register data as below
0x33 7D 4B 1A EC <--- PDO0 data is stored here temporary
0x37 20 D1 02 00 <--- PDO1 data is stored here temporary
0x3B 2C B1 04 00 <--- This is 15V, 3A for PDO2
0x3F 2C 41 06 00 <--- This is 20V, 3A for PDO3
I think my register reading may not be fast enough, but from USB-C PD sniffer, I cannot find any PD message that can overwrite the register 0x33 to 0x3A. All of the PD message ObjCounts is 0, except the source cap message, which has ObjCounts 4(4 source PDOs).
My questions are:
It would be ideal that STUSB4500 can store source capabilities to some fixed registers forever, until new source cap PD message comes.
Thanks,
Winston
Solved! Go to Solution.
2021-04-20 05:59 PM
Hello,
The PDO Capabilities sent by the USB-PD Source are not stored by STUSB4500.
They are only available in the STUSB4500 receive Buffer for a short time (~3 ms timing), until the USB-PD Source will send the next USB-PD message (which will overwrite the buffer).
To know if the data have not been overwritten, you need to check if the data content is consistent or not.
For example, the first PDO should be 5V@1.5A or 5V@3A.
All USB-PD messages are received in the RX_DATA_OBJx buffer:
If ObjCounts > 0, then the PD Message is a Data Message
If ObjCounts = 0, then the PD Message is a Control-Message. And it still overwrite the receive buffer.
To get properly the PDO Source Capabilities, it is needed to have the firmware to store the PDO data by I2C in interrupt mode.
An example is available in the STUSB4500 Library :
switch ( Header.b.MessageType )
{
case USBPD_DATAMSG_Source_Capabilities :
{
...
}
break;
...
}
2021-04-20 05:59 PM
Hello,
The PDO Capabilities sent by the USB-PD Source are not stored by STUSB4500.
They are only available in the STUSB4500 receive Buffer for a short time (~3 ms timing), until the USB-PD Source will send the next USB-PD message (which will overwrite the buffer).
To know if the data have not been overwritten, you need to check if the data content is consistent or not.
For example, the first PDO should be 5V@1.5A or 5V@3A.
All USB-PD messages are received in the RX_DATA_OBJx buffer:
If ObjCounts > 0, then the PD Message is a Data Message
If ObjCounts = 0, then the PD Message is a Control-Message. And it still overwrite the receive buffer.
To get properly the PDO Source Capabilities, it is needed to have the firmware to store the PDO data by I2C in interrupt mode.
An example is available in the STUSB4500 Library :
switch ( Header.b.MessageType )
{
case USBPD_DATAMSG_Source_Capabilities :
{
...
}
break;
...
}