Open nikolai2111 opened 11 months ago
Hia, To confirm are you using a black pill board with all the IO wired up as mentioned in the Readme? When I last updated this project it was working to request a connection. You may have a power supply that advertises 21V max in the PPS profile but cant supply it. Try disabling this if block section https://github.com/Ralim/STM32-USB-PD-Demo/blob/58fcba925cb40cd79dd307f3b30fd32ffb364d06/Workspace/USBPDDemo/Core/user/PDUser.cpp#L98
If that is the case, just limit the max requested voltage to 20V
Hello,
Thanks for your fast response. No I'm not using a Black Pill Board, I'm using an own Board. But I'm pretty sure the connection are right, because I tested them already.
I have tested the program without the "else if" statement which you suggested, but no success.
Could it also be a malfunctioning interrupt, because I misconfigured something?
Edit: I also tested if the interrupt comes through, and it does. When I plug in the connector I will land in this function. So I'm sure the hardware is working correct.
The Log on the UART-Interface with the PD_DEBUG_OUTPUT defined. Looks like the following:
Starting
FUSB Comms OK
>Running thread
Current state - PESinkDiscovery
Current state - PESinkSetupWaitCap
Waiting for events 0023
>Waiting for events
>Running thread
>Waiting for events
>Running thread
>Waiting for events
>Running thread
>Waiting for events
Notification received 0800
Notification received 0002
>Running thread
Current state - PESinkWaitCap
Wait Cap Event 0802
Source Capabilities message RX
Current state - PESinkEvalCap
PD slot 0 -> 5000 mV; 3000 mA
PD slot 1 -> 9000 mV; 3000 mA
PD slot 2 -> 12000 mV; 3000 mA
PD slot 3 -> 15000 mV; 3000 mA
PD slot 4 -> 20000 mV; 5000 mA
Found desired capability at index 4, 20000 mV, 5000 mA
Current state - PESinkSelectCapTx
Sending desired capability
Starting message Tx - 02
Message queued to send
Waiting for events 0E01
>Waiting for events
>Running thread
>Waiting for events
>Running thread
>Waiting for events
...
Edit: It looks like the device gets detached, with both USB-C sources I have.
So the uart logs show that it is attempting to send the message back but your not seeing it in your logger. Are you able to capture the I2C bus traffic?
Yes, I captured it today. I started the capture, then reseted the device, then plugged in the USB-C cable.
The circuit diagram looks like this. I have placed R401 as it does not work, but I have in mind, that this Connection to VBUS is not needed. Is that correct? A 220pF capacitor is connected to each of the CC lines.
Hello,
I am currently working on a project for my bachelor thesis. It is a USB-C PD laboratory power supply. I am currently on the home straight.
Unfortunately, I couldn't get your demo project to work. Because the two devices can't agree on a PDO, or a PDO is requested but it never happens. See picture below. This is the output over the UART:
This is the voltage on the VBUS:
And here is the output of the STM32CubeMonitor USB-C PD:
Can you help me? I'm planning to open-source the project when it's finished, so your usb-pd part would be perfect.