cancel
Showing results for 
Search instead for 
Did you mean: 

USB PD Reseting issue

HGorl.1
Associate II

Hi Stmteam,

I am using Stm32G081RB to Develop Source application.

please have a look at the source files and trace.

provider_port1

Note : trace file is from sink device attached to the Source Device currently we are looking to Develop complete solution.

Questions:

  1. we couldn't see the PS_RDY msg from source device after the Power Setting across the VBUS. is there any timings to be met for Power establishment after Port negotiation with connected port partner?

Note : ADC reading after the power establishment is proper. I make sure the voltage read by the USBPD stack is correct by putting break point at BSP_PWR_VBUSGetVoltage in usbpd_pwr_user.c file.

Kindly don't hesitate to revert back (at any time) for more information about the product.

Thanks and Regards

Himavanth

16 REPLIES 16
Yohann M.
ST Employee

Dear @HGorl.1​ 

Could you please confirm that the function 'USBPD_DPM_SetupNewPower' returns 'USBPD_OK' status? (USBPD_PE_RequestSetupNewPower written in the attached MSC)

The sent of PS_RDY is triggered after calling this function.

Regards,

Yohann

Note: I will really appreciate a USB-PD trace done on your device. Could you please think about adding a USART TX connection on your board to evacuate the USB-PD trace?

HGorl.1
Associate II

Hi Yohann M,

USBPD_DPM_SetupNewPower returning USBPD_OK. Is there any other things to make sure to work PD properly?

Thanks and Regards

Himavanth

Hi

Do you know the delay to setup the power to 15V? Function 'USBPD_SC88xx_SET_V_C'?

After successful call of SetupNewPower, provider should send the PS_RDY.

I think that the pb is that this timing to setup the power is higher than the max timing expected by the sink to receive the PS_RDY (set to tPSTransition at 500ms in our stack).

<--- 0000155812 P0 SOP s:002 PD3 H:0x03a3 ACCEPT

---> 0000155812 P0 SOP s:002   H:0x0201 GOODCRC

-no - 0000155813 P0 NOTIFY_POWER_STATE_CHANGE

-no - 0000155813 P0 NOTIFY_REQUEST_ACCEPTED

-pe - 0000155813 P0 PE_SNK_TRANSITION_SNK

(tPSTransition expiration on disco side)

-pe - 0000156313 P0 PE_STATE_HARD_RESET

It could be confirm easily with a PD trace on provider side!

Regards,

Yohann

HGorl.1
Associate II

Hi Yohann,

After I digging through Header files and source files in PSBPD stack I couldn't find  tPSTransition parameter.

  1. what is tPSTransition parameter refers to, "is it source side max Timeout(with in which PS_RDY should send)" or "sink side max Timeout(with in which PS_RDY should receive)?"
  2. If it is source side max Timeout, where can I found the variable in the stack?

Regards

  • Himavanth

Hi Himavanth,

This information can be found in the USB-PD specification (§6.6.5.1 PSTransitionTimer). This is the time "sink side max Timeout(with in which PS_RDY should receive)". As this timeout are defined in the stack, they are defined directly in the library. They has been tuned to pass USB-PD certification and should be changed.

Did you measure your time to raise the voltage to 15V?

Yohann

HGorl.1
Associate II

Hi Yohan,

The typical rise time  is less than 10ms(from datasheet).

As I am operating ADC clock frequency at very low frequency previously, I set the ADC frequency to synchronous clock/ 2. i.e . equal to 32MHz(which is less than max ADC frequency 35Mhz ).

After this change to the code control is trapping to HAL_DMA_IRQHandler() and it can't come out of the Handler forever. Please let me know the reasons for that. how can I resolve the issue?

Thanks

-Himavanth

HGorl.1
Associate II

Hi Yohan,

As I am using STM32g071_Discovery Kit as a sink device to get the trace, As I am not done any programming for slave device to watch the trace. Is there any way to change the Sink side MAX Timeout for STM32GO71_Discovery Kit?

Note :

I tried multiple Device connected to the board as a sink, but none of the boards are working fine(As I don't Know the sink side max Timeout, I can't determine the what is going wrong).

Thanks & Regards

Yohann M.
ST Employee

Hi

For test, you can flash your disco with attached binary. !!! This version is not compliant as I put a timeout to 2s !!!

In the other hand, I took again your application and adapt it to work with EVAL_G0 and it works fine in my side. Please find the complete package (using latest core lib)

Regards,

Yohann

Yohann M.
ST Employee

+ package