Skip to main content
Visitor II
November 27, 2025
Question

USBPD EPR Request

  • November 27, 2025
  • 3 replies
  • 289 views

Hi! I'm working on a Power Delivery Sink using an STM32G484RETx MCU. I managed to get SPR Power Delivery working without any issues, but I'm having trouble handling the EPR handshake.

I'm using the latest USB-PD library from ST's GitHub:

https://github.com/STMicroelectronics/stm32-mw-usbpd-core

I can successfully enter EPR Mode, but the PD stack automatically calls Evaluate Capabilities and sends an SPR Request (Data Object[2] == 0). I can’t find any option to prevent the stack from running Evaluate Capabilities when Extended PDOs are received from the source.

I’ve read @FBL's post on the ST Community, which states that the latest stack should support EPR:

https://community.st.com/t5/stm32-mcus-embedded-software/update-about-usb-pd-stack-to-support-epr-mode/td-p/829168

Do you have any solutions or examples that show how to properly handle EPR using the ST USB-PD stack?

 

epr.jpgepr2.jpg

In the second screenshot, you can see that the stack incorrectly sends an EPR Request (Data Object[2] = 00000000h) because it still triggers the SPR Evaluate Capabilities callback.

Thanks.

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    November 27, 2025

    Hi @KamilB 

    Indeed, the stack supports it but we don't have an example to showcase the extended power range and the hardware supporting it.

    KamilBAuthor
    Visitor II
    November 27, 2025

    Hi.

    I'm only interested in the communication layer. I've built my own hardware that should handle voltages up to 48V. Do you mean the STM32G4 can't handle this?

    Technical Moderator
    November 27, 2025

    No @KamilB 

    I mean the HW setup to manage power around the STM32 like TCPP protections provided.

    Technical Moderator
    November 28, 2025

    Hi @KamilB 

    To create EPR request STM32 as source, here is some guidelines

    1. Initialize EPR PDOs Properly : Create your EPR Source PDO PORT0_PDO_ListEPRSRC following the USB PD 3.1 AVS PDO format (voltage in 25 mV units, current in 50 mA units).

    2. Assign this PORT0_PDO_ListEPRSRC and its count to the EPR PDO storage in USBPD_PWR_IF_Init.

    3. Enable EPR Source support in DPM_Settings for the port to inform the PE and stack

      .Is_EPR_Supported_src=USBPD_TRUE,
    4. Ensure USBPD_PWR_IF_GetPortPDOs supports USBPD_CORE_DATATYPE_SRC_PDO_EPR to handle PDO retrieval for EPR.
    5. In USBPD_PWR_IF_SearchRequestedPDO, check if the requested RDO position corresponds to an EPR PDO.
    6. In USBPD_PWR_IF_SetProfile,  set voltage/current to process the selected PDO type when the device receives a power contract request RDO to handle EPR voltages and currents properly (up to ~48 V).

    For further details, you can refer to your ticket 00249068.

    KamilBAuthor
    Visitor II
    December 3, 2025

    Hi. I need to send a request as a sink.

    Regarding point 3: If I understand correctly, you cannot notify the stack by setting something inside DPM_Settings. I can’t find any function in the examples that passes the DPM_Settings structure to the stack.

    Technical Moderator
    December 26, 2025

    Hi @KamilB 

    There is no external explicit API call or function that "passes" the entire DPM_Settings structure to the USB PD stack at runtime. Instead, the stack and the DPM share access to these global data structure variables internally.

    For example, this check reads the Is_EPR_Supported_SNK flag directly from DPM_Settings to set the EPR capability bit in the RDO.

     if ( (USBPD_SPECIFICATION_REV2 < DPM_Params[PortNum].PE_SpecRevision)
     &&(USBPD_TRUE == DPM_Settings[PortNum].PE_PD3_Support.d.Is_EPR_Supported_SNK) )
     {
     rdo.FixedVariableRDO.EPR_Capable = 1;
     }

    Don't forget the precompiled core library .a