Serial Ports: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
Line 17: Line 17:
* On the STorM32 v3.x boards the {{BOX|UART2}} serial is either available as an explicit {{BOX|UART2}} port or via the {{BOX|ESP}} port. The v1.x boards do not offer this serial at all (for these boards the GUI setting {{PARAMVALUE|uart2}} has no effect).
* On the STorM32 v3.x boards the {{BOX|UART2}} serial is either available as an explicit {{BOX|UART2}} port or via the {{BOX|ESP}} port. The v1.x boards do not offer this serial at all (for these boards the GUI setting {{PARAMVALUE|uart2}} has no effect).


* On all STorM32 boards the {{BOX|UARTX}} serial is available on the {{BOX|RC}} port, pins RC-0 and RC-1 (accessible in the GUI as {{PARAMVALUE|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).
* On all STorM32 boards the {{BOX|UARTX}} serial is available on the {{BOX|RC}} port, pins RC-0 and RC-1 (accessible in the GUI as {{PARAMVALUE|uartx}}). In the pictures of the v1.x board it is however indicated as UART1 and not UARTX (since on these boards UARTX is in fact the STM32 UART1 peripheral).


== Baudrate ==
== Baudrate ==

Revision as of 05:17, 7 September 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”). Some STorM32 v3.x boards provide also a physical USB connector, which is however just also UART1 (i.e. connected to UART1 with a USB-TTL adapter), with said functioning. 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 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”). In the pictures of the v1.x board it is however indicated as UART1 and not UARTX (since on these boards UARTX is in fact the STM32 UART1 peripheral).

Baudrate

The default baudrate is generally 115200 bps for all serial ports (including USB on the v3.x boards).

They can be adjusted for the serials USB, UART, UART2 in the GUI. There is no possibility to adjust the baudrate of the UARTX serial port.

Comment: The GUI per default also communicates with a baudrate of 115200 bps. It can be changed in the GUI however.

Comment: Changing the baudrate of a serial port can imply that one cannot connect to this port with the GUI anymore.