Serial Ports
This article provides clarification regarding the STorM32's serial ports.
Ports
Generally, the STorM32 port naming follows this scheme: The name of a port is simply the type of the port, plus a number for a 2nd port of that type, and so on. Example: RC and RC2. The STorM32 serial ports are named USB, UART, UART2, and UART3, and are accessible in the GUI as “usb”, “uart”, “uart2”, and “uart3”. The pins corresponding to these serial ports are labelled as Rx/Tx.
There is one exception, found on the the v3.3 board: UART1. It is not a port like UART or UART2, and you won't find any parameter option “uart1” in the GUI.
Comment: The naming scheme may be confusing to those coming from the FPV-world, since in that world it has become common to name the UART ports by the MCU peripheral name. STorM32 doesn't follow that scheme (STorM32 is older than the FPV scheme in fact LOL), it rather follows the PX4/ArduPilot approach.
MCU Peripherals and Special Role of UART1
Few words on microcontroller (MCU) peripherals. STorM32 uses the STM32 series of chips. The STM32's serial peripherals are 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 of the STorM32 serial ports must not be confused with the names of the MCU serial peripherals! They may or may not coincide.
For the STM32F103 chip used by the v3.3 board, the hardware peripheral UART1 is special, since it allows us to flash firmware into the microcontroller, and this is exploited by STorM32. On the v3.3 board, the pins for the hardware peripheral are exposed, and this is the reason for why one finds a UART1 port (or Rx1/Tx1 labels) on this board.
Availability
The v3.x, v4.x, v6.x STorM32 boards all provide the USB, UART, UATRT2, and UART3 ports.
The UART3 port is shared with RC-0 and RC-1 pins of the RC port.
Gui | v3.x, v4.x, v6.x Boards |
---|---|
“uart” | UART port |
“uart2” | UART2 port |
“usb” | USB connector (internally connected to UART1 for v3.x, v4.x) |
“uart3” | RC-0,RC-1 pins on RC port, labeled UART3 |
Baudrate
The default baudrate is generally 115200 bps for all serial ports (including USB on the v3.3 and v4.1 boards).
It can be adjusted for all serial ports in the GUI (the USB baudrate setting is irrelevant for the the v6.x boards, as these provide native USB functionality).
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.