Some RP2040 examples are not working on Tiny2040

Hi all, I am trying to run some of the examples for RP2040 found here:

and here

to turn Tiny2040 into an usb-host but without any luck. I tried some other basic examples non usb related and they seemed to work fine but I could not make work the others especially

Has anyone tried these examples on Tiny2040 before?

What error messages are you getting, if any?
What uf2 file did you flash it with?

I cannot see any error. These are the uf2 files generated and used from the project “sekigon”:

./host_hid_to_device_cdc/host_hid_to_device_cdc.uf2
./capture_hid_report/capture_hid_report.uf2
./usb_device/usb_device.uf2

Are those maybe written for the other Tiny?
The ESP32 version, not a Tiny2040?
TinyPICO ESP32 Development Board with USB-C : ID 5028 : $21.95 : Adafruit Industries, Unique & fun DIY electronics and kits

My understanding is that they should work for PCBs based on RP2040. Also does it make any difference using a usb host female cable like for example: USB Host Cable versus a male breakout like https://www.amazon.co.uk/dp/B07TFSZ3ZP?psc=1&ref=ppx_yo2ov_dt_b_product_details?

Ok, just wanted to make sure it was RP2040 compatible software.
The cable would be how I would go.
That male breakout is a “Serial Converter”, which I believe connects to the UART?
This isn’t something I have ever tried, just so you know.

Yes I connected the male breakout to the relative UART pins of Tiny2040. I tried running a simple CircuitPython script to print out the UART input coming from the connected USB device (mouse, keyboard, etc) but nothing. So I tried the examples above to see if something changes. I am a beginner so I am following a trail & error approach to get some high level understanding how different components work. I was thinking about a female port as I saw for Teensy 4.1 (which will be the next PCB to try if I cannot make it work with Tiny2040).

Thats about how things go with me, when I try something I’ve never done before. I really hope you figure it out.

The Tiny2040 exposes only a subset of the RP2040 pins. Have a look at the source-code of sekigon and you will see it uses some RP2040 GPIOs not available on the Tiny2040 (they are available on the processor, but not to anything outside).

1 Like

Actually I got to a similar conclusion when I tried to use ESP32-S3 by Adafruit as usb host, using some examples for the original ESP-IDF and noticed that GP19 and GP20 were not mapped on the Adafruit but I could not see the same info in the sekigon code and I have been using the GP0 and GP1 mainly (but I tried a few other random GP pins too).