Electronics > Microcontrollers

amazing project: USB FS host/device using RP2040 PIO

(1/3) > >>

via the Ultibo forum (which is a great bare metal rPi platform), I stumbled over this link about an amazing project
to implement a full speed USB host and device (simultaneously if you want) on a RP2040 processor:

It links to

This project is being merged with the tiny usb project:

enjoy and spread the word about this top-class hacking project by sekigon-gonnoc, hathach and FahimFBA!
It is not fiished, but progresses very quickly...

why is it haking? it's called programming and bit banging

It's impressive, running the USB I/F in software is not easy, you gotta know every detail about USB spec.
But yeah nowadays everything is "hacking"  :D

well yes, when you choose to bit bang you are taking GPIO pins and controlling them with software that perfectly mimics what a piece of hardware would do. This is why a micro has "peripherals". In computer land it is called "hardware acceleration" in microcontrollers they are simply peripherals. I could bit bang a PWM but yea, it's a pain in the ass so it's nice to have even the simplest of hardware features and saves a lot of software writing and means that your CPU can do other stuff.

The cores run at 133 MHz, I guess having 2 you can use one just for USB "emulation".

How do you even write code for multiple core microcontrollers?

The RP2040 already has a USB OTG controller, so this is really 1/ for getting an additional USB port and 2/ just as an exercise.
But the nice thing with this is that it also gives you a starting point for implementing USB FS OTG on other targets. In particular, that would be a nice starting point for implementing this on some FPGA if you already use a soft core. Whatever is done with the PIO would be easily implementable on FPGA, and the software side ported to your soft core.

Since it's being included in the TinyUSB project, I would suppose this project is already "mature" enough and reasonably implemented.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version