2021-10-29 12:19 AM
We are planning to use STM32G071 in our next project.
We would like to have 9V@3A in PDO1.
So we edited the PDO1 data in the usbpd_pdo_defs.h file as follows.
[0x0202D12C]
00 0 0 0 0 1 00 000 0010110100 0100101100
Bit Description Applied value
[31,30] Fixed supply 00b
[29] Dual-role power 0b
[28] Higher capability 0b
[27] Unconstrained power 0b
[26] USB communication capable 0b
[25] Dual-role data 1b
[24,23] Value 00b
[22-20] Reserved 000b
[19-10] Voltage 0010110100b
[9-0] Current 0100101100b
However, only 5v output has been confirmed.
Where should we fixed?
Solved! Go to Solution.
2021-11-16 01:37 AM
I just compiled and tested your application, it works fine and I am able to select the 15V PDO.
I even flashed the binary you compiled on your PC (as you sent it with the project in your previous message). It works fine and selects the 15V PDO.
As you can see in my trace, the sink asks for position 4 which correspond to 15V.
I suggest you to retry by first erasing your STM32 completely (using STM32CubeProgrammer), then re-flash.
Regards
2021-11-16 04:12 PM
Thank you for your answer.
After erasing the STM and rewriting the code, I was able to extract the specified voltage.
Thank you for your cooperation.