Hi Adafruit team,
I've created a community port that adds STM32F4 support to the Adafruit TinyUSB Arduino library. The port follows the same structure as the existing platform implementations (SAMD, RP2040, CH32, etc.) and is currently working well on STM32F411 BlackPill boards.
Repository: https://github.com/code-fiasco/TinyUSB-Arduino-STM32
What's Working:
✅ USB MIDI
✅ USB CDC (Virtual Serial Port)
✅ USB HID
✅ USB MSC
✅ Multiple device classes simultaneously
Implementation Details:
Targets STM32F4 series using the OTG_FS peripheral
Works with the official STM32duino core
Follows existing port structure with platform-specific .cpp and config header
Key fix: Disables VBUS sensing for proper bus-powered enumeration
Minimal modifications required to library (just adding the conditional include)
Testing:
Currently tested and confirmed working on STM32F411. Should work on other STM32F4 variants (F401, F405, F407, F446, etc.) as they share the same USB peripheral, though this hasn't been verified yet.
Would you be interested in incorporating this into the official library? I'm happy to:
Submit a proper pull request if desired
Add additional testing on other STM32F4 boards
Make any changes needed to meet your code standards
Update documentation
Alternatively, if you'd prefer to keep this as a community port, I'm fine with maintaining it separately and just wanted to make you aware it exists for anyone searching.
Thanks for the great library - TinyUSB is excellent to work with!
Hi Adafruit team,
I've created a community port that adds STM32F4 support to the Adafruit TinyUSB Arduino library. The port follows the same structure as the existing platform implementations (SAMD, RP2040, CH32, etc.) and is currently working well on STM32F411 BlackPill boards.
Repository: https://github.com/code-fiasco/TinyUSB-Arduino-STM32
What's Working:
✅ USB MIDI
✅ USB CDC (Virtual Serial Port)
✅ USB HID
✅ USB MSC
✅ Multiple device classes simultaneously
Implementation Details:
Targets STM32F4 series using the OTG_FS peripheral
Works with the official STM32duino core
Follows existing port structure with platform-specific .cpp and config header
Key fix: Disables VBUS sensing for proper bus-powered enumeration
Minimal modifications required to library (just adding the conditional include)
Testing:
Currently tested and confirmed working on STM32F411. Should work on other STM32F4 variants (F401, F405, F407, F446, etc.) as they share the same USB peripheral, though this hasn't been verified yet.
Would you be interested in incorporating this into the official library? I'm happy to:
Submit a proper pull request if desired
Add additional testing on other STM32F4 boards
Make any changes needed to meet your code standards
Update documentation
Alternatively, if you'd prefer to keep this as a community port, I'm fine with maintaining it separately and just wanted to make you aware it exists for anyone searching.
Thanks for the great library - TinyUSB is excellent to work with!