cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 and USB HID in C#

PSEBA.1
Associate II

Hello,

Wich STM32 can i use for a USB HID connection with C# sotware ?

Best regards.

 

4 REPLIES 4
ahsrabrifat
Senior II

You can consider STM32F103. It is basic HID supported via ST USB FS device library or libopencm3. 

Andrew Neil
Super User

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

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
Super User

C# is not a standard language on microcontrollers. This will be an uphill battle.

If you feel a post has answered your question, please click "Accept as Solution".

@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://nanoframework.net/

https://www.mountaineer.org/www.mountaineer.org/netmf-for-stm32/index.html

https://community.st.com/t5/stm32-mcus-embedded-software/how-to-programming-a-stm32-microcontroller-with-c/td-p/642720

https://community.st.com/t5/stm32-mcus-boards-and-hardware/stm32f446re-with-c/td-p/651603 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.