CLIENT

TestAir LLC

GOALS

The main difference of the discussing USB/HID ⟷ UART converter against typical USB⟷UART converters (including FTDI FT232RL, Microchip MCP2200, Prolific PL2303) is the way it's determined in the system where it's plugged in. On the contrary with mentioned above converters which are determined as serial ports (Virtual COM port) and require specific driver to work in each case, this device is supposed to be determined as a USB HID device and consequently not to require any driver to work.
The goals include system's hardware and firmware design and prototyping.

SOLUTION

The STMicroelectronics's STM32F042 MCU in SSOP20 package was chosen as a heart of the system. One of the prominent feature of this MCU is it doesn't require any external crystal resonator to allow USB-subsystem work - the clock synchronization with USB host is already performed by it's CRS (clock recovery system). The final PCB's dimensions become really tiny and the final BOM is also really short in this case. As it was mentioned above the device is determined as "Custom USB-HID device" in any operating system (including Microsoft Windows, Linux), that's why the most part of the work to provide bidirectional data exchange in here comes to desktop software programmer. It becomes required:

  • to determine the plugged in USB/HID ⟷ UART converter and to open it right after that;
  • to do polling of the plugged in device in infinite loop to send/receive any out/incoming data;
  • the maximum report size for USB2.0 FS device is 8 bytes - and this should be taken into account when the bigger data volumes are send/received, i.e. the data de-/fragmentation algorithms must be implemented on both sides.

The prototype's PCB topology was designed with using of KiCAD free software.
The device's firmware was developed with the following toolset:

  • IDE - Eclipse
  • C/C++ - ARM GCC toolchain supplied by Mentor Graphics/CodeSourcery;
  • VCS - git;
  • additional dependencies:
    • STM32F0 Standard peripheral library;
    • STM32F0 USB Full speed device library;
  • ST-Link as programmer+debugger;

The desktop software was developed in C++ with libusb library being used as USB/HID functionaly provider.

RESULTS

The developed USB⟷UART became an indispensable part of some devices that are being developed and supplied by the Client. Its behaviour can be characterized as stable.

© "Control-V" 2012 - 2019