Replies: 2 comments
-
|
I start to get used to the RP2040 and it's PIO module. I bet my *** it shouldn't be too difficult to implement the required Rx/Tx state machine. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
The Raspi Pico is most likely capable to deal with USB PD. And the PIO peripheral can indeed be helpful. Do you already have a setup in mind, e.g. using external comparators to level shift the USB PD signals to 3.3V CMOS levels and the PIO peripheral for measuring the duration of the high and low state of the input signal or even fully decoding it, and for encoding the output signal? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What will it take to port the code to further MCUs?
For STM32 MCUs, it should be straight-forward. The existing code for USB PD processing (timer and DMA in input capture mode, processing of captured values, SPI for transmission etc.) should contain all the building blocks for implementing all other STM32 MCUs. The main challenge can be to figure out a working combination of pins, timers and timer channels as the STM32 is quite restrictive in this regard.
For other MCU families, it looks different. For certain ones I'm skeptical it can be done at all as they are missing crucial components such as some sort of input capture or a peripheral suitable for generating the CC signal.
What's your take? What would be a suitable approach for the ESP32 or the Raspberry Pico?
Beta Was this translation helpful? Give feedback.
All reactions