Skip to main content
Namita
Associate III
June 4, 2023
Question

can anyone help me to get example code for USB_HID code?

  • June 4, 2023
  • 3 replies
  • 2234 views

Hi,i working on USB protocol using STM32L496ZG Nucleo board.On board Vbus is showing 0v though i applied through the code.USB device(mouse interfacing) is not detecting from STM32L496ZG Nucleo board

This topic has been closed for replies.

3 replies

Technical Moderator
June 5, 2023

Hello @Namita​,

You can review the following article that will cover the basic steps to develop an application using the USB Custom HID Class on an STM32 as a Device:

Hope this helps you!

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Namita
NamitaAuthor
Associate III
June 17, 2023

 Hi @Imen.D  ,I follow the steps as you given by link for STM32L496ZG ,but in SimpleHIDWrite tool stm32 custom human device is not detecting.

Kindly reply.

Namita
NamitaAuthor
Associate III
June 17, 2023

hUsbDeviceFS->pClassData is getting null.please guide me for initialization

 

Namita
NamitaAuthor
Associate III
July 22, 2023

please do help 

Pavel A.
Super User
July 22, 2023

So you need a HID host, not device. Here is a USB host example for Nucleo L4:

https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Projects/NUCLEO-L4R5ZI/Applications/USB_Host/HID_Standalone

You can also get it from the CubeL4 package installed on your machine by CubeIDE or CubeMX.

You will need to port this example to Nucleo STM32L496ZG.