ryan-ma / PD_Micro

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

PPS above 11V exits after 5 seconds of triggering #4

Closed sakura-ushio closed 3 years ago

sakura-ushio commented 3 years ago

My charger supports 5-20V 5A PPS, but it will exit PPS 5 seconds after triggering PPS above 11v. Why?

ryan-ma commented 3 years ago

Hi, I just realize a bug that may related to your problem. The power_data_obj[] array in PD_protocol_t should be size of 7 instead of 6, which will cause power negotiation fail or even crash if number of PDO is more than 6. I pushed the fix. See if this can solve your issue.

sakura-ushio commented 3 years ago

Now the PPS above 11V works perfectly.