Serial Ports

From STorM32-BGC Wiki
Revision as of 05:45, 21 August 2021 by OlliW (talk | contribs) (Created page with "The topic of the STorM32's serial ports can be confusing. This article aims at providing some clarification. Generally one has to distinguish between the hardware peripherals...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The topic of the STorM32's serial ports can be confusing. This article aims at providing some clarification.

Generally one has to distinguish between the hardware peripherals provided by the STM32 micro-controller and their naming, and the serial ports exposed on the STorM32 boards to the user and their naming. Unfortunately, there is some overlap in the naming, which certainly contributes to the confusion. Furthermore, some STorM32 serials may not be found on ports which are named accordingly, but on "other" ports. This mess is certainly unfortunate, but reflects the efforts to continually increase the STorM32's capabilities and satisfy user demands while keeping some backwards compatibility.

The hardware peripherals are generally called UARTx or USARTx, where x goes from 1 to 5 for e.g. STM32F103 chips. We will not distinguish between UART or USART but just call them UARTx.

Concerning the STorM32's serials, the general rule is that they are named USB, UART, UART2, and UARTX, and that these are accessible in the GUI as “usb”, “uart”, “uart2”, and “uartx”). Importantly, these must not be confused with the STM32's peripherals UART1, UART2, UART3, and so on.

Concerning the availability of the serials, one can note:

  • All STorM32 boards provide the UART port.
  • The STorM32 v3.x boards do provide a port labeled UART1, which is indeed the STM32 UART1 peripheral, and can be used for flashing firmware, but to the STorM32 firmware it is the USB port (accessible in the GUI as “usb”). On the STorM32 v1.x boards the USB port is indeed the physical USB connector, while the STM32's UART1 peripheral used for flashing firmware is available on the STorM32 RC port, pins RC-0 and RC-1.
  • On the STorM32 v3.x boards the UART2 serial is either available as an explicit UART2 port, or available via the ESP port. The v1.x boards do not offer this serial at all (for these boards the GUI setting “uart2” has no effect).
  • On all STorM32 boards the UARTX serial is available on the RC port, pins RC-0 and RC-1 (accessible in the GUI as “uartx”). For the v1.x board it is however indicated in the pictures of the board as UART1 (which is the STM32 peripheral it is connected to on these boards).