rikka0w0 / CH55x_USB_PD

Implement USB PD negotiation on CH55x series 8051 microcontroller
MIT License
23 stars 9 forks source link

voltage range of cc pins in order to receive gpio rx interrupt #1

Open swleungbrian opened 4 years ago

swleungbrian commented 4 years ago

i tried the code. connection detected and started to receive pd messages on cc1 pin (P1.4). Yet no gpip interrupts received. The cc1 signal swings between 0 to 1V only and wonder if it is too low to generate interrupts. Any special hardware settings i have to take care?

Thanks

Brian

rikka0w0 commented 2 years ago

Sorry for the super later reply, this code was for testing purposes only, and unfortunately the conclusion is that CH554 is not capable of handling PD communication. The time taken for decoding and verifying each message is longer than the inter-frame gap, even with the help of manually written assembly. So I have given up.

DeqingSun commented 1 year ago

@rikka0w0 I can confirm 24M clock is not enough to decode BMC in real-time with C (sdcc), while the CH549 can do it in C on 40MHz clock. However, with some assembly optimizations, it is possible to receive BMC with 24M Clock on CH552.

https://github.com/DeqingSun/ch55xduino/tree/ch55xduino/ch55xduino/ch55x/libraries/Generic_Examples/examples/05.USB/PowerDelivery