-
USB from Scratch — What and Why
7 Lessons-
PreviewIntroduction
-
StartWhat is USB and why it took over
-
StartUSB versions, speeds, and connectors: what is the difference
-
StartActivity: Create your first USB project
-
PreviewThe host-controls-everything model and why it matters
-
StartActivity: Exploring the USB tree on a PC: host controller, root hub, devices, and the STM32 board
-
StartHow to navigate the USB documents without getting lost
-
-
USB Physical and Electrical Layer
8 Lessons-
StartDP and DM: how USB sends a single bit on two wires
-
StartUSB connectors and cables: Type-A, Type-B, Type-C, micro, mini
-
PreviewNRZI encoding, bit stuffing, and the sync field
-
StartThe pull-up trick: how the host knows your device's speed
-
PreviewJ state, K state, SE0, reset, and end of packet
-
PreviewVBUS power and current limits
-
StartSelf-powered vs bus-powered devices
-
PreviewUSB clock accuracy and what happens when it is wrong
-
-
USB Protocol Concepts
8 Lessons-
StartUSB topology: the tiered star (host, root hub, tiers, upstream/downstream ports, compound devices)
-
StartSee the topology on your own machine — hubs, the device tree, and the 127-address limit
-
StartThe four transfer types and when each is used
-
StartPacket, transaction, transfer, frame: what contains what
-
StartUSB packet types: Token, Data, Handshake
-
StartCapture real USB traffic on your own machine (Wireshark + USBPcap)
-
StartEndpoints and pipes: the channels inside a USB device
-
StartDescriptors at a glance: the device's passport
-
-
Enumeration, Descriptors, and First Detection
8 Lessons-
StartThe enumeration handshake: what happens in the first 100 ms
-
StartReading the enumeration handshake in Wireshark
-
StartSetup packets and the control transfer flow
-
StartDescriptors deep-dive: device, configuration, interface, endpoint, string
-
StartRead a real device's descriptors (USB Device Tree Viewer / lsusb -v)
-
StartVID/PID assignment: where you actually get one
-
StartSTM32F303CC USB peripheral overview
-
StartPull-up GPIO control: runtime attach and detach
-
