Skip to main content
MatthGyver
Associate II
July 21, 2020
Question

STM32F746G-Disco as HID keyboard

  • July 21, 2020
  • 3 replies
  • 1452 views

Hi,

I would like to make an application that simulates a keystroke when I press a button.

I have configured my project as shown in this article and have tried the given code to simulate a looping "hello world" message keystroke but cannot get it to work. (note that there is an error in the article between USB FS and HS)

Does anyone see where the problem is please?

Would you have any interesting links to tutorials / examples / docs on the use of the HID please?

Sorry for the stupid question, I am new to STM32

Thank you

This topic has been closed for replies.

3 replies

Pavel A.
July 21, 2020

Have you tried other USB device mode example for this board?

This?

https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32746G-Discovery/Applications/USB_Device/HID_Standalone

Make it work, then adapt to your needs.

-- pa

MatthGyver
Associate II
July 22, 2020

Thank you Pavel.

I'll try

MatthGyver
Associate II
July 25, 2020

I've found this video tutorial.

For this to work with TouchGFX:

- create a project with TouchGFX Designer

- open the .ioc file in CubeIDE - in "Project Manager> Code Genrator", uncheck "Generate peripheral initialization as a pair of ..."

- in the FreeRTOS settings, set "Stack Size" to 5120

As I begin, I defined the Stack Size of FreeRTOS a bit at random.

Do you have any advice on this point please?

Pavel A.
July 28, 2020

> Do you have any advice on this point please?

Perhaps these:

* Remember that stack size in FreeRTOS is specified in 4*bytes. So your 5120 is actually 4*5120

* FreeRTOS has a debug tweak to check stack overrun

-- pa