Skip to main content
KLim.2
Associate
February 2, 2023
Question

STM32G071RB: USB PD application, REQUEST_DISCARDED debug message from PE.

Hello

I am building an USB PD application.

- MCU: STM32G071RB

- Tool: STM32CubeIDE (Firmware version 1.6.1)

I am using 2 USB PD ports (UCPD1 and UCPD2).

The power role of UCPD1 is DRP, and UCPD2 is Sink.

And I am reading debug messages through STM32CubeMonitor-UCPD.

In my application, 2 UCPDs on the STM32 run at the same time once both ports are connected.

Sometimes, on the Sink port, I see the "REQUEST_DISCARDED" message (Type: NOTIF).

The timing I see the message is after "REQUEST" sent, "GOODCRC" received, "ACCEPT" received, and "GOODCRC" sent.

Message exchanges are normal, but PE reports "REQUEST_DISCARDED" even though message exchanges are successful.

And then, the Sink sends a "SOFT_RESET" message, and sends "HARD_RESET" eventually.

Since it is invisible to me where the "REQUEST_DISCARDED" message comes from (probably it happens in the STM32 static library), I have no idea what is happening inside.

Would it be a timing issue because 2 PEs are running at the same time or a control register have some peculiar values?

I would like to know cases that "REQUEST_DISCARDED" message is issued.

Please let me know if anyone has any idea.

Thanks

This topic has been closed for replies.

7 replies

Nicolas P.
ST Employee
February 7, 2023

Hello @KLim.2​ ,

it could be helpful if you could attach your .cpd file here, so that we can help you.

Have you checked the Wiki ?

It would help to check if sequence before the discard is ok, and also check the timings.

Thanks and regards,

Nicolas

KLim.2
KLim.2Author
Associate
February 10, 2023

Hello @nicolas P​ ,

 

I have Dual-Role (UCPD1) and Sink (UCPD2) port in my application.

I am sending Request data message in several cases, and encounter "REQUEST_DISCARDED" occasionally.

The below is what I see when that happens.

 

I added a snippet and screenshot of the debug messages.

(If you don't recognize functions or values in the snippet, they are created by myself.)

 

I have no idea how I can debug this error.

 

============ In my code =============================0693W00000YAUqDQAX.png 

Nicolas P.
ST Employee
February 14, 2023

Hello @KLim.2​ 

Are you using the G0 eval board, that has one DRP port, and a sink only port ?

This looks interesting, but I have questions. You say that port 1 is DRP, and port 2 is sink only.

But, in your test description you say that DRP port (port 1) request a power role swap. Is it to port 2, the sink port, or another DRP device ?

How can the sink only port be source ?

To check the full sequence, it would be clearer if you could share the trace .cpd file (see Wiki), so that we have in the same file the power role swap, and all the capability messages.