Electronics > Microcontrollers

amazing project: USB FS host/device using RP2040 PIO

(1/3) > >>

spostma:
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:
https://ultibo.org/forum/viewtopic.php?p=12872#p12872

It links to
https://github.com/sekigon-gonnoc/Pico-PIO-USB

This project is being merged with the tiny usb project:
https://github.com/sekigon-gonnoc/Pico-PIO-USB/pull/22
https://github.com/adafruit/Adafruit_TinyUSB_Arduino/issues/169

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...

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

DavidAlfa:
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

Simon:
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?

SiliconWizard:
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.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version