cancel
Showing results for 
Search instead for 
Did you mean: 

HID USB HOST example ported to STM32F4 Discovery: Mouse + KeyBoard

STM32 hobbyist
Associate III
Posted on September 16, 2012 at 20:51

Hi All;

For people who interested by connecting a mouse or a keyboard to the STM32F4 Discovery:

Attached a project that I have ported from the example provided in ''USB On-The-Go host and device library'' that works on STM3240G-EVAL board.

IAR 6.40 is used to compile the project. I didn't port it to other toolchains: keil, Tasking ...

When a mouse is connected:

The Blue Led should turn on.. Otherwise, desconnect the mouse or push the RESET button.

Clicking on the Left button of the mouse the green LED toggles

Clicking on the right button of the mouse the Red LED toggles

Clicking on the middle button of the mouse the orange LED toggles

moving the mose toggle the blue LED

Disconnecting the mouse from the Discovery board turns off all LEDs

When a Keyboard is connected:

The Blue Led should turn on.. Otherwise, desconnect the mouse or push the RESET button.

Hitting any key on the keyboard toggles the orange LED.

Disconnecting the mouse from the Discovery board turns off all LEDs

The port is done by:

Modifying the clock configuration: HSE clock from 25Mhz to 8Mhz

Removing all related LCD functions.

Configuring LEDs for the Discovery board. 

Deleting the polling on the user button in order to launch the HID application without waiting on user key press.

Have fun 😉

STM32
10 REPLIES 10
AAgha
Associate II

Hi

where is the file?! 🙂