STUSB4500 PDO SRC not read
Hi,
I have a custom PCB with STUSB4500 as the UCPD controller and STM32H7 as my application processor. Without any I2C communication between stm32h7 and stusb4500 the stusb4500 is able to negotiate a higher voltage from a usbC PD source by matching its preset values. I have checked with a 20V PD source.
I am trying to read the capabilities of a USB C PD source as received by the stusb4500 chip. I am using the STSW-STUSB003 software library as a reference to develop my code which is on Zephyr RTOS. I am able to read and write to the stusb4500 over I2C. I have tested the usb_pd_init() and Send_Soft_reset_Message() and they work without any errors. But when I am trying to print the RDO I get the following log:
---- Usb_Port #0: CONNECTION STATUS ----------
- CONTRACT : EXPLICIT
- Requested PDO # : 1
- PDO SRC not properly red by the SW
- PIN : CC1
- Max Current : 3.00A
- Operating Current : 1.50A
- Capability Mismatch : 0
- Give back : 0
- USB Com Capable : 0
- USB suspend : 0
I have tried with various usbC PD sources but every time I am getting the message "PDO SRC not properly red by the SW" even though the chip is able to negotiate a 20V from the usbC PD source.
I debugged the source code and found the below if condition is failing and hence the error:
Status = I2C_Read_USB_PD(STUSB45DeviceConf[Usb_Port].I2cBus,STUSB45DeviceConf[Usb_Port].I2cDeviceID_7bit ,RX_HEADER ,&DataRW[0], 2 );
Header.d16 = LE16(&DataRW[0]);
if( Header.b.NumberOfDataObjects > 0 ) // NumberOfDataObjects is 0 in my case
Can someone tell me what could be the issue and what else should I be trying out?
Thanks
