STM32G0 USB PD periphery doesn't send data after extracting code from CubeIDE
Hello,
I am developing a USB PD sink product using STM32G0B1VET6 MCU.
I have a project in CubeIDE, created proof-of-concept code following ST tutorial Getting started with USB-Power Delivery Sink and everything works as expected.
I then tried to transfer all of the code into my project (outside of CubeIDE) and it's not working. See the attached trace
The events go as follows:
- Source advertises SRC_CAPABILITIES
- Sink requests PDO
- No answer, sink repeats request 3 more times
- Sink requests PE_STATE_SEND_SOFT_RESET
- Sometimes, source answers, usually not
- After 4 attempts ad soft reset, sink requests hard reset.
- Repeat indefinitely
I suspect the sink isn't actually sending any data out.
I tried sniffing the PD bus, and indeed, there is no communication going from sink to source. Maybe something went wrong, when moving the code to different project. Maybe I forgot something.
How do I debug this?
