cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 USBPD periphery seems to be deaf

Tadeas_Pilar
Associate II

Hello,
I am developing a USB PD sink application on custom board with STM32G0B1VET
I am using periphery UCPD2. I followed AN5418 to set up eveyrthing in CubeMX and add the specified pieces of code.
Hovewer, ithe USBPD stack doesn't seem to send or recieve anything on the CC1 or CC2 lines. I have confirmed with oscilloscope, data is flowing to the MCU CC2 pin, but nothing seem to happen inside the USB stack.
This is as far as it gets:

Tadeas_Pilar_0-1695580295446.png

With a sniffer device, I can see the power supply sending source capabilities, but these packets are nowhere to be seen when logging the application.
This leads me to believe, the USB PD stack isn't getting the data.
Any ideas where to look for the problem? I have followed the instrucions and I can't see how this could be a electricall issue. 
Firmware package is STM32Cube FW_G0 V1.6.1

Thank you for any help

 

11 REPLIES 11

Hello @Tadeas_Pilar,

As I said you don't need those two resistors, you have to remove them. UCPD IP already includes resistors that you can configure using ANAMODE and ANASUBMODE of the UCPD control register. 

In your case, ANAMODE must be set to 1.

LLECH1_0-1695989875187.png

Best Regards,

LECHEVESTRIER Lucas

Tadeas_Pilar
Associate II

Solved it.
Turns out, precise timing is very important. Even though all ST manuals suggest using internal 16MHz RC oscilator, it might not be precise enough. After switching to external crystal oscilator, it started working as expected.

Hope this helps anyone in this situation.
@LLECH.1 please update your manuals to reflect this finding. At least as a debug step. It had cost me 15h of my life to figure out.

Also external pull down resistors don't actually hurt anything and can stay.