Serial Ports: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
The topic of the STorM32's serial ports can be confusing. This article aims at providing some clarification.
The topic of the STorM32's serial ports can be confusing. This article aims at providing some clarification.


== Serial Ports ==
== Ports ==


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.
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.

Revision as of 07:22, 28 August 2021

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

Ports

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”. 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).

Baudrate