cancel
Showing results for 
Search instead for 
Did you mean: 

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

Namita
Associate II

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

5 REPLIES 5
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

 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.

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

 

Namita
Associate II

please do help 

Pavel A.
Evangelist III

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.