This application note describes the Freescale USB Stack for Kinetis L series KL2x/KL4x devices and shows how to create a HID joystick demo.
The document introduces the USB protocol and the features of the Kinetis L USB OTG controller, which integrates a full‑speed USB controller into cost‑effective, low‑power microcontrollers. It explains the Freescale USB Stack architecture, including the driver, class, and application layers, and provides details on the HID class implementation.
A step‑by‑step HID joystick demo is presented, with instructions for adding required files, callbacks, and driver initialization. The note also lists the source files included in the stack, describes macro configuration options, and references additional user guides for deeper information.
| Supported USB speed | Full Speed (12 Mbps) |
|---|---|
| Number of USB endpoints | 16 bidirectional endpoints |
| Full‑speed USB device rate | 12 Mbps |
Kinetis L devices support the Full Speed USB rate of 12 Mbps.
The controller provides 16 bidirectional endpoints.
Compile the demo project, then follow the steps in section 5.6: tilt the board left/right or forward/backward to move the joystick axes, pull the board to adjust throttle, and slide the E1 pad to select buttons.