Skip to content

Fix: _PD_UFP.run() need to be run multiple times during power negotiation #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

aentinger
Copy link
Contributor

@aentinger aentinger commented Jan 31, 2022

Running the function only once every 5 seconds does not enable successful power renegotiation.

The documentation for the PD_UFP library demands to execute the function at least every 10 ms.

Everything fine, power is checked every 5 seconds.

14060:TX Request id=0 raw=0x1082
14060: obj0=0x6202D028
14065:RX GoodCRC id=0 raw=0x01A1
14083:RX Accept id=3 raw=0x07A3
14103:RX PS_RDY id=4 raw=0x09A6
14103:PPS 7.20V 2.00A supply ready

19064:TX Request id=1 raw=0x1282
19064: obj0=0x6202D028
19077:RX GoodCRC id=1 raw=0x03A1
19087:RX Accept id=5 raw=0x0BA3
19107:RX PS_RDY id=6 raw=0x0DA6
19107:PPS 7.20V 2.00A supply ready

Unplugging USB-C + replugging shows successful renegotiation

12125:TX Request id=4 raw=0x1882
12125: obj0=0x6202D028
12130:RX GoodCRC id=4 raw=0x09A1
12148:RX Accept id=3 raw=0x07A3
12168:RX PS_RDY id=4 raw=0x09A6
12168:PPS 7.20V 2.00A supply ready

/* UNPLUG USB-C */

17129:TX Request id=5 raw=0x1A82
17129: obj0=0x6202D028
17713:5.00V 1.00A supply ready

/* REPLUG USB-C */

35305:RX Src_Cap id=0 raw=0x61A1
35305: obj0=0x0801912C
35305: obj1=0x0002D12C
35305: obj2=0x0003C12C
35305: obj3=0x0004B12C
35305: obj4=0x0006412C
35305: obj5=0xC1A4213C
35305:   [0] 5.00V 3.00A
35305:   [1] 9.00V 3.00A
35305:   [2] 12.00V 3.00A
35305:   [3] 15.00V 3.00A
35305:   [4] 20.00V 3.00A
35305:   [5] 3.30V-21.00V 3.00A PPS *
35307:TX Request id=5 raw=0x1A82
35307: obj0=0x6202D028
35313:RX GoodCRC id=5 raw=0x0B61
35333:RX Accept id=1 raw=0x03A3
35585:RX PS_RDY id=2 raw=0x05A6
35585:PPS 7.20V 2.00A supply ready

@aentinger aentinger added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jan 31, 2022
@aentinger aentinger self-assigned this Jan 31, 2022
…to complete the power (re)negotiation on time.
@aentinger aentinger requested a review from facchinm January 31, 2022 07:10
@aentinger aentinger marked this pull request as draft January 31, 2022 07:50
@aentinger aentinger marked this pull request as ready for review January 31, 2022 07:53
@arduino-libraries arduino-libraries deleted a comment from github-actions bot Jan 31, 2022
@arduino-libraries arduino-libraries deleted a comment from github-actions bot Jan 31, 2022
@arduino-libraries arduino-libraries deleted a comment from github-actions bot Jan 31, 2022
@github-actions
Copy link

Memory usage change @ 48b60d3

Board flash % RAM for global variables %
arduino:mbed_nano:nanorp2040connect 💚 -3828 - -3828 -0.02 - -0.02 💚 -40 - -40 -0.01 - -0.01
Click for full report table
Board examples/Braccio__Template
flash
% examples/Braccio__Template
RAM for global variables
% examples/LCD_Custom_Menu
flash
% examples/LCD_Custom_Menu
RAM for global variables
% examples/LCD_Menu_Joystick
flash
% examples/LCD_Menu_Joystick
RAM for global variables
% examples/LCD_Motors
flash
% examples/LCD_Motors
RAM for global variables
% examples/LearnByDoing
flash
% examples/LearnByDoing
RAM for global variables
% examples/New_APIs
flash
% examples/New_APIs
RAM for global variables
% examples/Tools/Factory_Set_ID_Interactive
flash
% examples/Tools/Factory_Set_ID_Interactive
RAM for global variables
% examples/Tools/Factory_Set_Initial_Servo_Position
flash
% examples/Tools/Factory_Set_Initial_Servo_Position
RAM for global variables
% examples/Tools/Test_Inputs
flash
% examples/Tools/Test_Inputs
RAM for global variables
% examples/Tools/Test_Motor_Angular_Control
flash
% examples/Tools/Test_Motor_Angular_Control
RAM for global variables
% examples/Tools/Test_Motor_Communication
flash
% examples/Tools/Test_Motor_Communication
RAM for global variables
%
arduino:mbed_nano:nanorp2040connect -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01 -3828 -0.02 -40 -0.01
Click for full report CSV
Board,examples/Braccio__Template<br>flash,%,examples/Braccio__Template<br>RAM for global variables,%,examples/LCD_Custom_Menu<br>flash,%,examples/LCD_Custom_Menu<br>RAM for global variables,%,examples/LCD_Menu_Joystick<br>flash,%,examples/LCD_Menu_Joystick<br>RAM for global variables,%,examples/LCD_Motors<br>flash,%,examples/LCD_Motors<br>RAM for global variables,%,examples/LearnByDoing<br>flash,%,examples/LearnByDoing<br>RAM for global variables,%,examples/New_APIs<br>flash,%,examples/New_APIs<br>RAM for global variables,%,examples/Tools/Factory_Set_ID_Interactive<br>flash,%,examples/Tools/Factory_Set_ID_Interactive<br>RAM for global variables,%,examples/Tools/Factory_Set_Initial_Servo_Position<br>flash,%,examples/Tools/Factory_Set_Initial_Servo_Position<br>RAM for global variables,%,examples/Tools/Test_Inputs<br>flash,%,examples/Tools/Test_Inputs<br>RAM for global variables,%,examples/Tools/Test_Motor_Angular_Control<br>flash,%,examples/Tools/Test_Motor_Angular_Control<br>RAM for global variables,%,examples/Tools/Test_Motor_Communication<br>flash,%,examples/Tools/Test_Motor_Communication<br>RAM for global variables,%
arduino:mbed_nano:nanorp2040connect,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01,-3828,-0.02,-40,-0.01

@aentinger aentinger merged commit 80a316a into master Jan 31, 2022
@aentinger aentinger deleted the check-pd-code branch January 31, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant