cancel
Showing results for 
Search instead for 
Did you mean: 

PC host <-> STM32 communication, looking for advices

smiermont
Associate
Posted on November 23, 2012 at 13:52

Hi

For future projects, I'm looking for the most easy to deploy and foolproof way to communicate between a STM32-based system (mostly L1, some F1) and a PC host.

There seems to be 4 ways (Ethernet is not available on L1s):

  1. virtual COM port on USB required specific drivers on the host (lots of issues, specifically on systems that require signed drivers), but communication speed is Ok.
  2. build-in UART, but most modern PC have no serial port, and a serial to USB adapter have the same issues as the previous solution.
  3. Mass storage on USB (put config as a file, read results as a file), fast, does not require drivers, and file access routines tend to be totally system-independent. For some applications, you don't even need a specific host software, a simple text editor will be enough. But implementation on the STM32, including FAT-style file system, doesn't seems to be straightforward, and will be a nightmare to debug (no way to put breakpoints when the PC is trying to access some blocks).
  4. lastly, HID on USB does not require drivers, but I'm not sure what the practical throughput is, and if the host software can be made reasonably platform-independent, or will depend on lots of low-level system calls.
My questions are very open-ended (I hope it's ok): what technique is a never-ending debugging nightmare (on the µC or the PC) and should be avoided? What technique is the most flexible and easy to support if you intent to deploy on a large diversity of host hardware and don't want to develop a specific driver?

If you seen any other way to achieve the same goals (reliability+portability), I'm interested. Thanks.

S.
0 REPLIES 0