2015-11-27 12:34 AM
Hi,
I got the Cube firmware from ST, and I cannot found the USB sample code for test purpose. The current demo codes are complicated, I have to put App, middleware and driver to make the USB work, and it is not good to my user case. What I needed is just a very simple sample code which may act as a mouse, so that I can refer its init and IRQ process. Is there any one who has that source code? BTW, I'm using STM32F439,. #usb2015-11-27 02:27 AM
Hi gu.jeff,
“What I needed is just a very simple sample code which may act as a mouse�?Have a look to the USB_Device\HID_Standalone example under STM32Cube F4 package, it may be very helpful in your case .In fact it is a typical application on how to use the STM32F4xx USB OTG Device peripheral where the STM32 MCU is enumerated as a HID device using the native PC Host HID driver to which the STM324x9I-EVAL board is connected, in order to emulate the Mouse directions using Joystick buttons mounted on the STM324x9I-EVAL board.STM32Cube_FW_F4_V1.9.0\Projects\STM324x9I_EVAL\Applications\USB_Device\HID_Standalone-Syrine-2015-11-27 02:54 AM
USB is a relatively complicated protocol, you're not going to find something a simple as you would a USART or LED example, where 20 lines does all the work.
2015-11-28 05:08 PM
Syrine,
Thank you so much for your comment. I read that sample code, however, it is really too complicated to my application case. For example, the GPIO init, well, My understanding is that this init can be done in 10lines at most, actually the code exceeds 100line as it is designed for common usage. What I wanted is an abstract sample code, but not the code with a powerful but sophisticated design. Jeff