2022-11-09 05:58 AM
Hi, I am implementing a system with two DRP ports using an stm32g0 runnig a full USBPD stack. One of the ports is connected to a powerbank (usb pd v2). The other is connected to either a charger, which is used to power the system and charge the powerbank, or to connect an accessory.
This powerbank does support sourcing and sinking, but not power roleswitching. Therefore, to switch between sinking and sourcing I am trying to reset the connection and from the new connect event set up a new sink or source contract based on what is connected to the charger/accessory port. However, when I try to set up a source port, the powerbank ignores the source capabilities messages and resets the connection, after which my ports defaults back to sink mode before I ever got a source request.
When I connect the powerbank directly to my PD3 powersupply, I see similar behaviour by the powerbank. But because the powersupply sticks to source mode eventually, after a couple more resets, the powerbank does accept the source cap messages by the power supply. A contract for the powersupply to source to the powerbank is set up.
Can I in any way force my DRP port to stick to source mode whenever a power supply is connected to my other port, so it survives the powerbank's resetting behaviour and keeps sending source capabilities messages?