#TinyUSB

STM32Worldstm32world
2026-01-20

STM32 Tutorial #81 - AMAZING TinyUSB Library

In this video we will use the TinyUSB library with STM32CubeMX, STM32CubeIDE and HAL to create a composite USB CDC (communication device class) and MSC (mass storage class) device on a STM32H562.

youtube.com/watch?v=ZywYPsIohcw

EmbeddedJourneysEmbeddedJourneys
2025-12-27

Spent some time getting a usb bulk data stream working on a Raspberry Pico 2W using TinyUSB.

Biggest hurdles were device/configuration descriptor and realizing tud_task() needs to be called frequently.

embeddedjourneys.com/blog/firs

EmbeddedJourneysEmbeddedJourneys
2025-12-21

Getting up to speed regarding USB's states, enumeration process... helps to get a better grasp on tinyUSB's USB stack!

RevK :verified_r:revk@toot.me.uk
2025-11-30

My native #tinyusb lessons published: revk.uk/2025/11/native-tinyusb

And work is progressing well.

RevK :verified_r:revk@toot.me.uk
2025-11-27

OK, the support from there #tinyusb project is not that bad, thank you.

There seems to be a mechanism for adding a custom "driver" for any specific class you want.

Basically I can copy an existing driver, tweak a few bits, put in my project, and make the tinyusb see that as a valid driver and use it.

So that is next step, making a tinyusb CCID driver. Maybe then donate it to the tinyusb project.

RevK :verified_r:revk@toot.me.uk
2025-11-27

More on USB

So "vendor" is not generic, it is specifically class 0xFF, and checks that. Removing that check from #tinyusb allows me to get as far as bulk in working, but not bulk out. I think "vendor" does not have bulk out.

It seems all existing drivers are very class specific, and even though SMART CARD is an enumerated class there is no driver.

What I would love is a generic driver, that does not care what the class code is but adds a bulk in and out, and has callbacks for that.

RevK :verified_r:revk@toot.me.uk
2025-11-27

Of course, the second I say that I have a brainwave, and now have #tinyusb (not esp_tinyusb) getting as far as my Mac trying to "enumerate" it and failing, calling the config request 5 times, so clearly it does not like my config. This is massive progress!

I did manage an hour in the hot tub, a coffee, and a sausage roll, so maybe that did the trick.

RevK :verified_r:revk@toot.me.uk
2025-11-27

I am not defeated by #tinyusb yet, but I am pulling my hair out.

At the stage of taking a break for a bit. This is almost unheard of in the way I usually work. But it is so frustrating.

So I'll try and get back to it in the morning.

I may even have to use the source, Luke, and read the actual library code.

Geoff WinklessGeoff@mastodon.cloud
2025-11-19

And it finally works, after much head-scrstching,.many (many!) dry joints, a few broken wires and having to switch GPIOs because #tinyusb seemed to want to hold on to gpio1+2 despite my best efforts, my #MGT #SamCoupe USB-HID mouse adaptor prototype (based loosely on the #RP2040Mouse project) is working

#ReteoComputing #RP2040 #RaspberryPiPico

Stuart Longland (VK4MSL)stuartl@longlandclan.id.au
2025-06-24

Had my first encounter with a Raspberry Pi Pico today.

I needed a MCU that could enumerate two USB serial ports to a host, have a UART interface for an external device, and control a heap of GPIOs. The RPi Pico was a little light on GPIOs, but add a couple of I²C expanders, and we were in business. The idea was one USB serial interface (call it port 1) would be for control commands, and serial traffic on the other (port 2).

The UART on the thing is hooked up to a multiplexing circuit with two RS-485 transceivers and a TTL buffer, so via port 1, I can put port 2 into any of: TTL serial, RS-485 (via either transceiver), or RS-422 (both transceivers, using one for receive and the other for transmit). The GPIOs sense things through optical isolators and tickle devices via reed relays.

Haven't wired the thing up yet, but TinyUSB has a dual CDC-ACM example that was a doddle to get going on the Pico… so I don't expect it to be a big job.

Not sure if this can be done in #MicroPython … I think I'll be using C, but that's fine, C will get the job done.

Tomorrow should be interesting.

#RaspberryPi #RaspberryPiPico #TinyUSB

2024-09-06

I could really use some experts opinion on getting this function faster. The round trip takes 100~200 uS and is just too slow, but async read causes race conditions.
A single write takes 30 uS (async). Ive already removed all overhead on the device side code but the time stays the same.

via @loudfpv

mastodon.social/@loudfpv/11308

code poop
diyelectromusicdiyelectromusic
2024-02-16

And I've now made some more notes on my blog.

I wasn't going to bother but seeing as I've had to work through its MIDI support, SysEx parsing and now the difference between the USB packet and stream modes of TinyUSB, I thought I perhaps ought to make a few notes before I forget it all!

diyelectromusic.wordpress.com/

This is probably going to be my last blog post on this topic for a while now though. Although I'll keep tinkering with the code :)

2024-02-04

The tricky part was that the latest version of the #tinyusb (v2.4.1) stack wasn't working for me, so I had to revert to v2.3.0

2024-01-12

@gameboyscene @ganonmaster @DiConX @ferrantecrafts They arrived today and both seem to work at least USB-wise. No Gameboy here for testing though.
(I can run the firmware on a plain RP2040 which is also recognized as USB video device, however it does not stream the idle screen. Probably because it's not running the TinyUSB task properly then.)

#gbinterceptor #tinyusb #rp2040 #raspberrypi #37c3

VLC video stream with an idle screen reading "GB Interceptor 1.2.0" and "The Game Boy is turned off"The GB Interceptor in a nice orange case with black screws in a cardboardThe GB Interceptor PCB in a nice orange case opened up

I just managed to get my #tinyusb setup, (which speaks, HID keyboard, and CDC), to a point where it is usb spec compliant enough to work with in the bios and on windows (it already worked under linux).

It took me a few full days, and a lot of headaches. I now also know a lot more about #usb, and I am not sure if the things I have learnt make me happy.

It really helped that I had already gone through the process once before, just that, I only managed to get it to work on Linux that time.

tobozotobozo
2023-08-15

and Hardware cable based on microcontroller by @joelsernamoreno



Type-C (available now) and MicroUSB (coming soon)

🛠️ github.com/joelsernamoreno/Evi
🎬 youtube.com/watch?v=VTjJ4ayRw1Q
🧺 🇪🇺 coming soon
🧺 🌏 aliexpress.com/item/1005005951

2023-03-22

Hab mir nun n Nullmodem-Kabel mit einem #RPiPico und #TinyUSB gebaut:
#Arduino Example github.com/adafruit/Adafruit_T leicht modifiziert (Debugmeldungen, tolower/toupper entfernt)

Warum einfach, wenn's auch kompliziert geht?

Alberto Gonzalez :mastodon:agonzalez
2023-02-10

I'm having trouble getting started with on a . 😔

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst