Skip to main content
Associate II
August 11, 2025
Question

USB PD change voltage during active contract

  • August 11, 2025
  • 7 replies
  • 554 views

Dear ST Community,

 

I have a working application for USB PD SPR and EPR and now I want to change the voltage (power profile) during an active contract.
So e.g. I have 5V currently and want to request 9V from the source, or I have 20V currently and want to switch to 28V (EPR).
How to do that? According to the USB Specification you would send a "Get Source Capability" Request so I used USBPD_DPM_RequestGetSourceCapability() [or USBPD_PE_Send_ExtendeControlMessage(m_uPort, USBPD_EXTENDED_CONTROL_EPR_GETSRCCAPA) in EPR]. Then the source responds with it's capabilities. USBPD_DPM_SetDataInfo gets called with the PDOs but USBPD_DPM_SNK_EvaluateCapabilities is never called afterwards....
In SPR Mode nothing happens, voltage stays the same. In EPR Mode 30ms later a hard reset is triggered.

 

Why does the ST Stack not Evaluate Capabilities after successfull reception of PDOs? According to USB Spec as a Sink we always need to respond to a capabilities message with our "wish".....

 

How to fix that?

I am using Core Stack version V5.3.0 (latest version as of writing this post). Microcontroller used is STM32H523.

 

Regards,

Adrian

7 replies

Technical Moderator
August 11, 2025

Hi @abtq 

Would you share minimum firmware to reproduce the issue on a reference board? 

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.Best regards,FBL
abtqAuthor
Associate II
August 18, 2025

Hi @FBL ,

I now have added a workaround: In USBPD_DPM_SetDataInfo() for USBPD_CORE_DATATYPE_RCV_SRC_PDO and USBPD_CORE_DATATYPE_RCV_SRC_PDO_EPR I added

if(usb.m_bChangingProfile && DPM_Params[PortNum].PowerRange == USBPD_EPR_MODE) {
 evaluateAndRequest(); // if an contract is active we need to evaluate our selves
}

(or check for SPR mode in similar fashion).

With:

bool CUSBPowerDelivery::evaluateAndRequest() {
	USBPD_SNKRDO_TypeDef uRequestData;
	USBPD_CORE_PDO_Type_TypeDef type;
	USBPD_DPM_SNK_EvaluateCapabilities(m_uPort, &uRequestData.d32, &type);
	USBPD_StatusTypeDef status = USBPD_PE_Send_Request(m_uPort, uRequestData.d32, type);
	if(status != USBPD_OK) {
 return false;
	}
	return true;
}

 

But in fact the ST stack should do that on its own? If so I will have to look into that and compose a minimal example to see whether this is a problem in my environment or whether the behaviour is the same in the minimal example.

 

Technical Moderator
August 29, 2025

Hi @abtq 

That would be great to share minimal project to reproduce on ! An internal ticket 215626 is submitted to USB PD stack team to answer all related questions!

Thank you

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.Best regards,FBL
abtqAuthor
Associate II
September 4, 2025

Hi @FBL ,

I now finally made a minimal example.
Please find it attached. Its just "quickly" thrown together.

I found out as long as I don't go into EPR Mode Source Capabilities Message is automatically handled by the stack (change the code so it does not go into EPR).
But in the provided configuration I couldn't even get it to send the 

USBPD_PE_Send_ExtendeControlMessage(0, USBPD_EXTENDED_CONTROL_EPR_GETSRCCAPA);

message. That call always returns USBPD_FAIL. But without code to look into I find it really hard to debug the issue.

abtq_0-1756993696834.png

With my EPR Source communication seems fine. After that only keep alive and acknowledges can be seen but no epr get source capabilities.



Just to be clear: In my main application (not the minimal sample) it does actually send the USBPD_EXTENDED_CONTROL_EPR_GETSRCCAPA message, the source responds accordingly:

abtq_1-1756993884829.png

but the ST Stack does not evaluate and respond with a request message.

 

Also sending the non-EPR equivalent USBPD_DPM_RequestGetSourceCapability(0) in EPR mode does not work. This message is sent and the source responds accordingly but also no evaluation and no request from our side.

abtq_2-1756994056144.png

But notice there is no hard reset in this case!

 

Source used is a Delta Electronics USB PD 3.1 device.

 

I hope you can help with actually sending the epr get source capabilities message and then help debugging why the ST Stack does not evaluate and request.

Thanks and best regards,

Adrian 

abtqAuthor
Associate II
September 29, 2025

@FBL wrote:

Hi @abtq 

That would be great to share minimal project to reproduce on ! An internal ticket 215626 is submitted to USB PD stack team to answer all related questions!

Thank you


Is there any update on this topic? Can you reproduce this issue using the minimal sample?

I guess I don't have access to the internal ticket?

Technical Moderator
November 7, 2025

Hi @abtq 

Currently, ST’s USB PD stack does not provide application examples or full support for EPR mode. Do you have any issues running the SPR mode?

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.Best regards,FBL
Technical Moderator
January 23, 2026

Hi @abtq 

Any updates regarding the issue?

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.Best regards,FBL
abtqAuthor
Associate II
January 26, 2026

Hi @FBL ,

sorry for not answering the last message. SPR works fine this is a pure EPR issue.
I got informed that this issue is potentially fixed by the next release but I am yet to test it. Will report back once I have (probably within next two weeks)

Best regards,

Adrian