cancel
Showing results for 
Search instead for 
Did you mean: 

USBPD EPR Request

KamilB
Associate II

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.

6 REPLIES 6
FBL
ST Employee

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.

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.


KamilB
Associate II

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?

No @KamilB 

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

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.


KamilB
Associate II

Hi.

Don't worry about HW. We have build our own PCB and protections on our company which are compatible with ~48V EPR voltage range. 

Can you just tell me how to send proper EPR request front STM32 to Source using ST PD Stack?

Thanks.

FBL
ST Employee

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.

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.


KamilB
Associate II

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.