// cd /blog/cmm2-usb-full-speed
Choosing full-speed USB devices for the CMM2
The Colour Maximite 2's USB socket takes a hub, so a keyboard, a mouse, gamepads and a flash drive can all be connected at once. There is one catch: a fault in the STM32 processor means a low-speed device can't be used through a hub. This article explains how to spot a full-speed keyboard, mouse or gamepad from its specifications and advertising, and how to check one you already own.
In short
- Through a hub, only full-speed devices work. A low-speed keyboard, mouse or gamepad works when it's plugged straight into the CMM2, but MMBasic refuses it on a hub with
USB low-speed device behind a hub is not supported: plug it in directly. - It's the processor, not the firmware. ST lists the fault in the STM32H743's errata, ES0392, with no workaround. It affects every revision of the chip, so it affects every CMM2.
- “USB 2.0” on the box tells you nothing. A low-speed device can be USB 2.0 too. The useful clues are a polling rate above 125 Hz, full n-key rollover, and console-controller compatibility.
- The sure test takes a few seconds. Plug the device into the hub on the CMM2 and read the message. Or check it on a PC: Linux, Windows and macOS can all show a device's speed.
On this page
Why low speed is a problem
USB 2.0 has three speeds, and every device uses one of them:
| Speed | Data rate | Typical devices |
|---|---|---|
| Low speed | 1.5 Mbit/s | Basic keyboards and mice, cheap gamepads |
| Full speed | 12 Mbit/s | Gaming keyboards and mice, console controllers, USB serial adaptors, wireless receivers |
| High speed | 480 Mbit/s | Flash drives, disks, cameras |
The CMM2's USB socket runs at full speed. A high-speed device such as a flash drive drops to full speed to work with it, and a low-speed device plugged straight into the socket works at its own speed.
A hub is different. To reach a low-speed device through one, the processor sends a short preamble packet before each low-speed packet, telling the hub to pass what follows to its slow ports. The STM32H743's USB controller can lock up right after sending a preamble. When it does, it drops the whole port, and every device on the hub disconnects. ST lists this in the processor's errata sheet, ES0392, as “Host packet transmission may hang when connecting the full speed interface through a hub to a low-speed device”. It applies to every revision of the chip, and ST gives no workaround.
So that one slow device can't take everything else down with it, MMBasic refuses a low-speed device on a hub before sending it anything. The hub and the full-speed devices on it carry on working, and the console shows:
USB low-speed device behind a hub is not supported: plug it in directly
When it matters
The CMM2 has one USB socket, so anything more than a keyboard needs a hub, and then every keyboard, mouse and gamepad on the hub has to be full speed.
| What you connect | What it needs |
|---|---|
| A keyboard on its own, plugged straight in | Any speed. No hub, so no problem. |
| A keyboard and anything else | A hub, so the keyboard, the mouse and any gamepads must all be full speed. |
| A keyboard with USB ports of its own | The keyboard must be full speed, even plugged straight in. See Keyboards with built-in ports. |
| A flash drive or a USB serial adaptor | Always fine. These are full or high speed. |
Being full speed only gets a device past the hub. It still has to be a kind MMBasic supports: the User Manual's chapter Keyboard, Mouse and Gamepad lists them.
What to look for when buying
Manufacturers rarely print “full speed” on the box. A few figures that often are printed give it away, because of two limits the USB specification puts on low-speed devices:
- A low-speed device can be read at most about every 10 ms. In practice a computer reads one 125 times a second (every 8 ms) at most, so any device that reports more often than that must be full speed.
- A low-speed device sends at most 8 bytes at a time. That is exactly a standard keyboard report: the Shift, Ctrl, Alt and Windows keys plus six other keys. Anything that needs a longer report must be full speed.
| In the specification or advert | What it tells you |
|---|---|
| A polling rate or report rate of 250, 500 or 1000 Hz, or “1 ms” | Full speed. The most reliable clue, and common on gaming mice and keyboards. A rate you can change in the maker's software counts, as long as it goes above 125 Hz. |
| “Full n-key rollover” or “NKRO” over USB | Almost always full speed. Reporting every key at once needs more than 8 bytes. “Anti-ghosting” on its own says nothing. |
| An X-input mode, or works wired on an Xbox or a PlayStation 4 | Full speed. These controllers send reports longer than 8 bytes. |
| Programmable firmware such as QMK or VIA | Almost always full speed. The chips these keyboards use have full-speed USB. |
| “USB 2.0”, “USB 1.1”, or the USB logo | Nothing. A low-speed device is a USB 2.0 device too. Only “Hi-Speed” means 480 Mbit/s, and you won't see it on a keyboard. |
| A USB-C socket, a braided cable, gold-plated plugs | Nothing. The connector doesn't set the speed. |
| “Gaming”, RGB lighting, the price | A weak hint. Gaming devices are usually full speed, but the word is used loosely. |
| 125 Hz, or no rate given | Unknown. Either speed is possible. Check it before you rely on it. |
| Built-in USB ports, “with hub”, “pass-through” | A warning. The keyboard sits behind a hub of its own. See below. |
When a listing gives no figures, reviews often do: sites that test mice and keyboards usually list the polling rate. Or ask the seller for the polling rate. A seller who knows it will know whether it is above 125 Hz.
Keyboards, mice and gamepads
Keyboards
Mechanical and gaming keyboards are usually full speed: look for a polling rate or NKRO in the specification. Plain office keyboards, and the cheap keyboard-and-mouse sets, are often low speed. A low-speed keyboard is fine on its own; it just can't share the CMM2 with anything else.
Keyboards with built-in ports
A keyboard with USB ports of its own has a hub inside it, and the keyboard is one of the devices behind that hub. So the keyboard has to be full speed even when it's plugged straight into the CMM2. The official Raspberry Pi keyboard is one that isn't: it's a low-speed keyboard behind its own hub, so it can't be used on the CMM2 at all. A keyboard with built-in ports that is full speed works, and its ports work as a hub for your other devices.
Mice
Most ordinary mice are low speed. Gaming mice are the easy choice: almost all of them advertise a polling rate of 500 or 1000 Hz, and that makes them full speed. If you want something plainer, look for a stated rate above 125 Hz, or check the mouse before you buy more than one.
Gamepads
Console controllers are full speed: the DualShock 3 and 4, the Switch Pro controller and the wired Xbox 360, One and Series controllers. So are third-party pads with an X-input mode. The cheap generic pads, including most replicas of old console pads, are usually low speed, so plug one of those straight into the CMM2, without a hub.
Wireless sets
With a wireless keyboard or mouse, the receiver is the USB device, so it's the receiver's speed that counts, not the keyboard's. Check the receiver like any other device.
Checking a device you already have
- On the CMM2. Plug the device into the hub and watch the console. A full-speed device connects as usual, for example
USB Keyboard Connected on channel 1. A low-speed one gives theUSB low-speed device behind a hub is not supportedmessage. - On Linux or a Raspberry Pi. Run
lsusb -t. The number at the end of the device's line is its speed:1.5Mis low speed,12Mfull speed and480Mhigh speed. - On Windows. Windows doesn't show the speed itself. The free USB Device Tree Viewer does: select the device and look for its speed, low, full or high.
- On a Mac. Hold Option, open the Apple menu and choose System Information, then USB. Select the device and look at Speed: “Up to 1.5 Mb/s” is low speed and “Up to 12 Mb/s” full speed.
$ lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 001: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 002: Dev 004, If 0, Class=Human Interface Device, Driver=usbhid, 12M
Here the device on port 1 is low speed and the one on port 2 is full speed. A device with several interfaces, such as a keyboard with media keys, has one line for each, all at the same speed.
Why the firmware can't fix it
The same fault is in the USB controllers of many STM32 families, so other people have tried to get round it. Some of ST's errata sheets add only that more capacitance on the data lines may make it happen less often, which reduces the problem without curing it. The developers of TinyUSB, the USB library the CMM2 uses, found a timing fix for a similar fault in Espressif's ESP32 chips. On an STM32F407 it didn't help: the port still dropped in 9 boots out of 10. Their notes are in TinyUSB's device issues page.
The one arrangement that avoids preambles altogether is a high-speed USB connection to a high-speed hub, which then does the low-speed talking itself. The STM32H743 can only do high speed with an extra chip, which the CMM2 doesn't have. So choosing full-speed devices is the answer, and with the clues above it's usually easy.