cancel
Showing results for 
Search instead for 
Did you mean: 

B-U585I-IOT02A USB Host problem

milorad
Associate III

I'm using BSP driver for USB PD (TCPP03-M20) on the B-U585I-IOT02A, for initialization of the USB PD as USB Host I use the following code:

BSP_USBPD_PWR_Init (USBPD_PWR_TYPE_C_PORT_1);
BSP_USBPD_PWR_SetRole (USBPD_PWR_TYPE_C_PORT_1, POWER_ROLE_SOURCE);
BSP_USBPD_PWR_SetPowerMode(USBPD_PWR_TYPE_C_PORT_1, USBPD_PWR_MODE_NORMAL);
BSP_USBPD_PWR_VBUSInit (USBPD_PWR_TYPE_C_PORT_1);
BSP_USBPD_PWR_VBUSOn (USBPD_PWR_TYPE_C_PORT_1);

what I don't understand is, why when I connect an USB stick to the USB Type-C connector an over-current event (OCP VBUS) is detected by the TCPP03-M20 chip, and then after sending a recovery word the voltage on the Vbus line is provided again by the TCPP03-M20 chip and operation continues as normal?

Why is the OCP event happening?

Is there a way to avoid it?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @milorad 

330 pF C1 and C2 capacitors and 2.2 µF C3 capacitor are required by the USB Power Delivery standard.

C3 2.2 µF capacitor ensures a good system robustness. but since it placed after shunt resistor that senses the current it does not impact parasitic OCP.
Internal ticket is reported to dedicated team (197941). Thank you for reporting this.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!

View solution in original post

6 REPLIES 6
FBL
ST Employee

Hi @milorad 

You may need to provide better details about your project configuration. It seems like you didn't activate _VCONN_SUPPORT.

By integrating the BSP_USBPD_PWR_VCONNDischargeOn and BSP_USBPD_PWR_VCONNIsOn functions, you can effectively manage VCONN discharge and status checks based on the current hardware conditions and events. 

//Activate VCONN discharge on detachment 
if (BSP_USBPD_PWR_VCONNDischargeOn(PortNum) != BSP_ERROR_NONE)

// Check VCONN status on attachment 
if (BSP_USBPD_PWR_VCONNIsOn(PortNum, USBPD_PWR_TYPE_C_CC1, &vconnState) == BSP_ERROR_NONE)

 This helps ensure proper operation and power management for USB Type-C devices and avoid OCP.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
milorad
Associate III

Hi @FBL ,

thanks for answering.

In my situation I have B-U585I-IOT02A board, and I'm trying to use it as an USB Host via the USB Type-C connector.

I configure it as mentioned in my first post and when I connect an USB memory stick to the USB Type-C connector, the OCP event is detected by the TCPP03 chip.

That causes VBUS to be disabled by the TCPP03 chip and after calling :

BSP_USBPD_PWR_EventCallback(USBPD_PWR_TYPE_C_PORT_1);

which sends the recovery word to the TCPP03 the VBUS is again provided and everything works normally.

What I would like to avoid is to get this OCP event when the stick is connected as that should not in general trigger an OCP event.

What you are describing is actually for handling a disconnection of the USB device, I actually did not see any problems at disconnection, no event is triggered.

It might be some setting of the TCPP03 that is missing or hardware for fault detection on this board results in OCP on connection?

 

FBL
ST Employee

Hi @milorad 

The Vbus capacitance of USB stick may not be compliant with USB standard (too high). Here are some workarounds:

  1. Accept the first OCP and restart. The USB stick Vbus capacitor is charged and there is no more OCP.
  2. Or, try to increase VBUS OCP threshold by reducing shunt resistor. 7mOhm is the default value --> 6A

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
milorad
Associate III

Hi @FBL,

thanks for helping.

I went to investigate a bit, and even just putting oscilloscope probe on that resistor (R13) used for Isense (which is on this board 47 mOhm) causes over-current detection thus I think the actual problem is that on this board there is no external capacitor on the VBUS line.

In the datasheet of the TCPP03-M20 the block diagram below shows C3 for which datasheet says 100 nF, 50 V :

TCPP03-M20_datasheet_pic.png

 But on the B-U585I-IOT02A board according to schematic, there is no capacitor, see below:

B-U585I-IOT02A_schematic.png

Anyways, my conclusion is that without hardware changes on this board there is no way to avoid this over-current event when connecting any USB Device.

I don't think USB memory sticks I have are a problem.

I will just do what I already did (basically your workaround 1.) after detecting OCP send the recovery word, which is all supported by BSP driver already.

Hi @milorad 

330 pF C1 and C2 capacitors and 2.2 µF C3 capacitor are required by the USB Power Delivery standard.

C3 2.2 µF capacitor ensures a good system robustness. but since it placed after shunt resistor that senses the current it does not impact parasitic OCP.
Internal ticket is reported to dedicated team (197941). Thank you for reporting this.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
milorad
Associate III

Thank you @FBL !