2023-09-24 11:41 AM - edited 2023-09-24 11:47 AM
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:
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
Solved! Go to Solution.
2023-09-29 05:19 AM
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.
Best Regards,
LECHEVESTRIER Lucas
2023-10-02 09:58 AM - edited 2023-10-02 10:00 AM
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.