This was written from scratch using the datasheet and tested on a SAMD21 (using SparkFun SAMD21 Mini Breakout).
However, it should also work with SAMD51 boards, I don't have one for testing though.
USB Hub Issue
For some reason, when compiling the host/hid_controller example from tinyusb (modified by setting CFG_TUH_HUB to 1), GET_DESCRIPTOR times out when connecting devices via USB hub.
When I use tinyusb within my platformio project (which uses framework-arduino-samd for device initialization), devices connected via HUBs work without any issues.
I've compared the runtime values of all registers that should matter for USB, but could not find any meaningful difference.
Nevertheless, I must have missed one or some, because HUB connections are always working with the arduino samd framework but never with the tinyusb example.
This was written from scratch using the datasheet and tested on a SAMD21 (using SparkFun SAMD21 Mini Breakout). However, it should also work with SAMD51 boards, I don't have one for testing though.
USB Hub Issue
For some reason, when compiling the host/hid_controller example from tinyusb (modified by setting
CFG_TUH_HUB
to1
),GET_DESCRIPTOR
times out when connecting devices via USB hub. When I use tinyusb within my platformio project (which uses framework-arduino-samd for device initialization), devices connected via HUBs work without any issues.I've compared the runtime values of all registers that should matter for USB, but could not find any meaningful difference. Nevertheless, I must have missed one or some, because HUB connections are always working with the arduino samd framework but never with the tinyusb example.