2015-10-16 02:37 AM
We are using STM32L053 in our project. We evaluated the USB data transfer using CDC(Virtual COM port) and USB composite device. However, both of them require specific ST drivers for the PC to recognize the USB device. We are looking at options to avoid this. In the example applications provided for L053, there is a HID example which we tested. This one configures the device as a �mouse� and does not need any specific drivers. However, we do not need the mouse functionality. Is it possible that we modify the HID example to configure the device as a generic HID device so that data can be sent/received without needing any specific drivers? If this is possible, are there freely available PC applications that can receive(log)/send data from/to HID devices?
In our application, we have a requirement to read the data stored in EEPROM and transfer that to the PC. Hence, a maximum of few kilobytes of data will be transferred. Also, they are not sent all at once, they are sent in packets and this size can be well within 64 bytes. We also do not need a very high data transfer rate. In addition, we would also like to send some data from the PC to the device (bidirectional). We intend to send the data to the PC in a readable ASCII format and would like to log that in excel.(We have tested this using Hercules application with USB CDC. We want to know if there is something similar for HID)
In fact, in one of the forums
indicates that it is possible to use HID to log the ASCII data in Excel. How can the USB HID descriptors have to be modified so that we can use HID for generic USB send/receive functionality? #stm32 #usb #hid2015-10-16 02:57 AM
You need a Custom HID class.
https://github.com/hansfbaier/stm32f1-custom-usbhid
2015-10-16 03:23 AM
2015-10-16 03:31 AM
I can't find examples for L0. The project at the first link is based on HAL which is very portable. It should be straightforward to adapt the F1 code to you L0 board.
2015-10-16 05:04 AM
Yeah..I ported the code in the first link for L0. Now, when I run it on the system, Windows identifies it as USB Input device. In addition, a HID-compliant Mouse also appears in the device manager but there is a warning icon that this cannot start . Is this the expected enumeration for the Custom HID example?
Also, which application do I use on the PC to test data transfer with the USB input device?Regards,Aravinda2015-10-16 06:01 AM
Did you change the VID/PID/Serial Number of your device? Change at least the serial number so Windows can re-run the device registration/recognition.
> Also, which application do I use on the PC to test data transfer with the USB input device?2015-10-19 03:42 AM