2020-09-16 12:17 AM
Hi Stmteam,
I am using Stm32G081RB to Develop Source application.
please have a look at the source files and trace.
Note : trace file is from sink device attached to the Source Device currently we are looking to Develop complete solution.
Questions:
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
2020-09-16 06:15 AM
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?
2020-09-17 08:50 AM
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
2020-09-17 11:33 PM
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
2020-09-24 02:54 AM
Hi Yohann,
After I digging through Header files and source files in PSBPD stack I couldn't find tPSTransition parameter.
Regards
2020-09-24 04:59 AM
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
2020-09-24 08:07 AM
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
2020-09-24 11:44 PM
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
2020-09-25 05:25 AM
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
2020-09-25 05:25 AM