ryan-ma / PD_Micro

USB-C PD3.0 PPS on ATMega32U4 Arduino board
MIT License
387 stars 69 forks source link

How to change the Changing PPS voltage and current in run time? Need an example for it,plz! THX :) #7

Open pengjjchao opened 3 years ago

pengjjchao commented 3 years ago

I have tried the function set_PPS() after calling the init_PPS() and run().It succeed.but it tooks a very long time to negotiate. However,it won't happen when I first called init_PPS() at the begining of the programme.It was very fast and smooth.So i was wonder how to boost the process of the voltage transition in runtime

ryan-ma commented 3 years ago

It should take less than 50ms for set_PPS() to response. Can you capture the debug log for investigation?

pengjjchao commented 3 years ago

here's the code and log.I've found it usually happen when I try to drop the current voltage.As u can see,the load switch was closed after I set 8.1V(It was 20V before).But when I set 11.2V,it finished negotiation immediately without closing the load switch.

企业微信截图_16352128783564 企业微信截图_16352129395674 RED part is the 8.1V step down process BLUE part is the 11.2V boosting process