Skip to main content
Explorer
August 11, 2025
Question

USB PD change voltage during active contract

  • August 11, 2025
  • 5 replies
  • 553 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

    This topic has been closed for replies.

    5 replies

    Technical Moderator
    August 11, 2025

    Hi @abtq 

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

    abtqAuthor
    Explorer
    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

    abtqAuthor
    Explorer
    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?