USB-C PD Dual Role Power Swap not working
Hello,
I have been working for a week now on USB-C Power Delivery Library for STM32G0 but I am facing some problems to communicate with other devices. I want to setup a Dual Role Power (DRP) communication with a power bank also supporting DRP.
I based my code on the USB-PD sink introduction example, changing only the total heap size of FreeRTOS to 10KB to be able to launch the USBC thread.
Then, I added some Source and Sink PDOs to the system: 0x22019096 (5V DRP+DRD), 0x2202d096 (9V DRP+DRD) and 0x2203c096 (12V DRP+DRD) based on the USB-C PD Rev3.0 specs.
My hardware setup looks like this (I adapted the measurement of VBUS for BSP_PWR_VBUSGetVoltage):

I even downloaded the USB-C PD ST Microcontroller Guide and looked at the PR Swap Accepted request message sequence, but this time, but this time I get no notification at all.
Eventually, In my default thread when I launch the power role swap :
USBPD_StatusTypeDef ret = USBPD_DPM_RequestPowerRoleSwap(USBPD_PORT_0);I can't even connect to STM32CubeMonitor UCPD. The only trace I can get with my COM port is "PRS not accepted by the stack", which doesn't help me either.
The return status USBPD_ERROR and I don't really know why. When debugging, you end up in the USBPD pre-compiled code so no way to find what the problem is.
I never found a Dual Role Power code example on Internet. Can someone help me?
Thanks in advance
