Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

STM32 Short #9 – Custom USB HID

2.8K views on YouTube

In this video we will drive into Customer USB HID device. This video has been a long time in the making. USB is a complex topic so this is a soft start 😉

Bidirectional communication is covered in this video: https://www.youtube.com/watch?v=EQKnW47atDU

STM32World Wiki: https://stm32world.com/wiki
STM32World USB Custom HID page: https://stm32world.com/wiki/STM32_USB_Custom_HID
Github repository: https://github.com/STM32World/stm32fun

Custom USB DFU bootloader: https://www.youtube.com/watch?v=O6oslbgkjq8

Join our Discord server here: https://discord.gg/rBMqP37Ek7

The hidapitester tool on Github: https://github.com/todbot/hidapitester

#STM32 #Tutorial #STM32CubeMX #STM32CubeIDE #USB #HID #CustomHID #STM32World

00:00 Intro
01:00 Please like, subscribe and comment below
01:25 The base project
03:25 USB Config in STM32CubeMX
04:55 USB Classes explained
07:35 The Custom USB HID Device configuration
08:00 Understanding the confusing OUT/IN from Host point of view
09:15 The device descriptor
10:00 Changes to the code
11:05 A few necessary defines in main.h
11:40 The USB power request – default to 100 mA
13:15 Asking for 500 mA and enabling report buffer events
15:40 Adding header definition of our customer report handler
17:00 Changing the source file
18:50 The BUG in ST’s code!!! And the workaround a naughty typecast.
21:50 Adding our real report handler in main.c
22:50 Running and testing the code with hidapitester
25:35 Adding more functionality
26:52 Running the new version
29:55 Summary and outtro