Skip to content
Back to skills

Tinyusb Integration

ASecurity

Use when integrating, porting, configuring, or debugging TinyUSB device, host, CDC, MSC, HID, MIDI, vendor class, descriptors, DCD, or USB enumeration issues

  • 31 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
data-aidebugging

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add easyzoom/aix-skills --skill tinyusb-integration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tinyusb Integration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tinyusb Integration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/easyzoom-tinyusb-integration/badge)](https://www.skillsdirectory.com/skills/easyzoom-tinyusb-integration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tinyusb-integration
description: Use when integrating, porting, configuring, or debugging TinyUSB device, host, CDC, MSC, HID, MIDI, vendor class, descriptors, DCD, or USB enumeration issues
---

# TinyUSB Integration

## Overview

Use this skill to integrate TinyUSB by separating board support, USB controller driver, descriptors, class drivers, interrupts, clocks, and endpoint buffers. USB bugs are often descriptor or controller-state problems before application logic.

## When To Use

Use this skill when:

- The user wants to add or debug TinyUSB on an MCU.
- The issue involves USB enumeration, CDC serial, MSC, HID, MIDI, vendor class, device/host mode, descriptors, endpoints, DCD/HCD, or TinyUSB tasks.
- The target needs a new MCU/board port or custom USB class configuration.

Do not use this skill when board power, USB D+/D- wiring, or clock source is unverified. Use `hardware-interface-debug` first.

## First Questions

Ask for:

- MCU/board, USB controller, device/host mode, and TinyUSB version.
- USB class: CDC, MSC, HID, MIDI, vendor, composite, or host stack.
- RTOS/bare-metal runtime and where `tud_task`/host task runs.
- USB clock source, VBUS detect, pull-up control, and interrupt routing.
- Descriptors and `tusb_config.h`.
- Host OS symptoms: no enumeration, code 10, repeated reset, missing COM port, wrong VID/PID, or transfer failure.

## Integration Checklist

1. Prove hardware prerequisites.
   USB clock, D+/D- wiring, VBUS, pull-up, ESD/protection, and connector orientation must be correct.

1. Configure `tusb_config.h`.
   Enable only needed roles/classes and set endpoint buffer sizes within RAM limits.

1. Verify descriptors.
   Device, configuration, interface, endpoint, string, VID/PID, class/subclass/protocol, and composite descriptors must agree.

1. Run TinyUSB task regularly.
   In bare metal or RTOS, ensure device/host task and interrupt handling are scheduled correctly.

1. Check class-specific behavior.
   CDC needs line coding/control; MSC needs safe block device hooks; HID needs report descriptors and polling interval.

1. Capture host evidence.
   Use OS device manager, `lsusb`, USB logs, or protocol analyzer when enumeration fails.

## Common Failures

- USB clock is not exactly valid for the controller.
- Descriptors report endpoint sizes or counts inconsistent with class config.
- `tud_task` is not called regularly.
- Composite descriptors have wrong interface association.
- CDC appears but no data flows because callbacks are not handled.
- MSC exposes a block device without safe read/write/sync policy.

## Verification

Before claiming TinyUSB works:

- State MCU, role, class, TinyUSB version, USB clock, and task/interrupt model.
- Confirm host enumeration with VID/PID and class.
- Confirm one class-specific transfer: CDC echo, HID report, MSC read/write, or vendor transfer.
- Confirm descriptor consistency and endpoint allocation.
- For MSC or firmware update classes, state data-loss safeguards.

## Example

User:

```text
TinyUSB CDC 插上电脑没有串口。
```

Agent:

1. Asks for MCU, TinyUSB config, descriptors, USB clock, interrupt setup, and host OS logs.
1. Checks enumeration and descriptor consistency before CDC callbacks.
1. Verifies `tud_task` schedule and a CDC echo transfer.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.