2025-06-06 12:04 AM - last edited on 2025-06-06 1:03 AM by Andrew Neil
Hello,
Wich STM32 can i use for a USB HID connection with C# sotware ?
Best regards.
2025-06-06 12:24 AM
You can consider STM32F103. It is basic HID supported via ST USB FS device library or libopencm3.
2025-06-06 1:00 AM - edited 2025-06-06 1:07 AM
The whole point if standards like USB is that they are independent of the particular hardware implementation.
So an USB HID is a USB HID - irrespective of what microcontroller is used in it.
So real the question is simply, "Can I use a USB HID connection with C# software?"
And that is a question for your C# documentation and/or a C# forum - nothing to do with ST or STM32
eg, https://learn.microsoft.com/en-us/samples/microsoft/windows-universal-samples/customhiddeviceaccess/
via: https://www.google.com/search?q=C%23+HID
And, as the above shows, on high-level platforms this is all abstracted by the OS - so even the choice of language is (largely) irrelevant.
PS:
So, conversely, the language you use on your host is entirely irrelevant to which STM32 you choose.
You just need to use any STM32 which supports USB HID:
https://www.st.com/content/st_com/en/stm32-mcu-product-selector.html
https://www.st.com/en/development-tools/st-mcu-finder-pc.html
https://www.st.com/en/development-tools/stm32-finder.html
2025-06-06 5:34 AM
C# is not a standard language on microcontrollers. This will be an uphill battle.
2025-06-06 6:15 AM - edited 2025-06-06 6:20 AM
@TDK wrote:C# is not a standard language on microcontrollers.
Indeed.
@PSEBA.1 did you mean that you actually want to use C# on the microcontroller itself?
For that, you'd have to look into the .NET micro (or is it nano ?) framework; eg,
https://www.ghielectronics.com/netmf/
https://www.mountaineer.org/www.mountaineer.org/netmf-for-stm32/index.html
https://community.st.com/t5/stm32-mcus-boards-and-hardware/stm32f446re-with-c/td-p/651603