Resolved! STM32G0 USB-PD Source stack periodically sends hard resets when compiler optimizations are enabled.
I'm using a Cube IDE generated project (latest version) with the latest version of the G0 SDK. This problem originally showed up on a custom board but I have reproduced the problem using a Nucleo-G071RB dev board wired up to a USB-C breakout jack wit...