Serial Ports: Difference between revisions
| Line 49: | Line 49: | ||
| {{PARAMVALUE|usb}} || USB connector || USB connector or UART1 port<br>is equal to UART1 || USB connector | | {{PARAMVALUE|usb}} || USB connector || USB connector or UART1 port<br>is equal to UART1 || USB connector | ||
|- | |- | ||
| {{PARAMVALUE|uartx}} || RC-0,RC-1 pins on {{BOX|RC}} port<br>is equal to | | {{PARAMVALUE|uartx}} || RC-0,RC-1 pins on {{BOX|RC}} port<br>labeled UART1, is equal to UART1 || RC-0,RC-1 pins on {{BOX|RC}} port<br>labeled UARTX || RC-0,RC-1 pins on {{BOX|RC}} port<br>labeled UARTX | ||
|} | |} | ||
<!-- | <!-- | ||
Latest revision as of 19:34, 21 November 2025
This article aims at providing some clarification concerning the STorM32's serial ports.
Ports
The naming of the STorM32 serial ports may appear confusing at first. However, it is in fact pretty consistent, across all boards - with one (unfortunate) exception: UART1.
Generally, the STorM32 port naming follows this scheme: The name of a port is simply the type of the port, plus a number (or symbol) for the 2nd port of that type, and so on. Example: RC and RC2. The STorM32 serial ports are named USB, UART, UART2, and UARTX, and are accessible in the GUI as “usb”, “uart”, “uart2”, and “uartx”. The pins corresponding to, e.g., the ports UART and UART2 are labelled accordingly as Rx/Tx and Rx2/Tx2.
UART1 is different. It is not a port like UART or UART2, and you won't find any parameter with the option “uart1” in the GUI, yet the name "UART1" appears in various places, e.g. as Rx1/Tx1 labels on boards, or in pin descriptions, or in documentary.
MCU Peripherals and Special Role of UART1 on v1.x, v3.3 Boards
The microcontroller (MCU) which is used in the STorM32 controllers (STM32F103 or STM323H7A3) offers a number of hardware peripherals, among them the serial peripherals. These are generally called UARTx or USARTx, where x goes from 1 to 5 for e.g. the STM32F103RC chip (we will not distinguish between UARTx or USARTx but just call them UARTx). Note: This naming convention is a choice of the chip manufacturer, not ours.
The names for the serial hardware peripherals must not be confused with the names of the serial ports of the STorM32 controller!
For instance, on the v1.3x boards the serial port UART is the hardware peripheral UART3, while on the v3.3 and v4.1 boards it is the hardware peripheral UART5. From a user perspective this is however irrelevant, since all the user needs to know is that there is a serial port UART which can be selected in the GUI as “uart”.
The hardware peripheral UART1 is special, since it allows us to flash the firmware into the microcontroller of the v1.x and v3.3 boards, and it is used by STorM32 for exactly this purpose. Therefore, this peripheral is exposed on these STorM32 boards so we can flash the firmware using it, which is the reason for why one finds a UART1 port (or Rx1/Tx1 labels) on the v1.x and v3.3 boards.
Unfortunately, the number of serial ports provided by v1.3x STorM32 boards is not sufficient for some applications. Therefore, on v1.3x boards one can use also the peripheral UART1 to fullfill the user's needs. In the STorM32 software, this is made possible, for some features, as UARTX port.
Availability
Concerning the availability of the serial ports (for STorM32 boards documented in this wik) one can note:
- All STorM32 boards provide a UART port.
- All "full-size" STorM32 boards provide a USB port (exception are some special designs such as micro boards). On the v1.3x and v6.x1 boards the USB connector is tied to the MCU's USB peripheral, whereas for the v3.3 and v4.1 boards it is connected via a on-board USB-TTL adapter to the UART1 peripheral.
- The v3.3/v4.1/v6.x STorM32 boards provide a UART2 serial on the UART2 port or ESP port. The v1.x boards do not offer this serial (here the GUI setting “uart2” has no effect).
- All STorM32 boards provide the UARTX serial. It is found on the RC port, pins RC-0 and RC-1, and is accessible in the GUI as “uartx”. In pictures of the v1.x board it is however labelled as UART1 and not UARTX.
- On the v3.3 STorM32 board, the UART1 hardware peripheral is available as extra UART1 (Rx1/Tx1) port. On the v1.3x boards this peripheral is on the RC port, pins RC-0 and RC-1.
| Gui | v1.3x | v3.3/v4.1 | v6.2/v6.3 |
|---|---|---|---|
| “uart” | UART port | UART port | UART port |
| “uart2” | has no effect, UART2 port not available | UART2 port or on ESP port | UART2 port |
| “usb” | USB connector | USB connector or UART1 port is equal to UART1 |
USB connector |
| “uartx” | RC-0,RC-1 pins on RC port labeled UART1, is equal to UART1 |
RC-0,RC-1 pins on RC port labeled UARTX |
RC-0,RC-1 pins on RC port labeled UARTX |
Baudrate
The default baudrate is generally 115200 bps for all serial ports (including USB on the v3.3 and v4.1 boards).
They can be adjusted for the USB, UART, UART2 serial ports 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.
Comment: Changing the baudrate of a serial port can imply that one cannot connect to this port with the GUI anymore.