|
|
| Line 23: |
Line 23: |
| Concerning the availability of the serial ports (for STorM32 boards documented in this wik) one can note: | | Concerning the availability of the serial ports (for STorM32 boards documented in this wik) one can note: |
|
| |
|
| * All STorM32 boards provide the {{BOX|UART}} port.
| | The v3.x, v4.x, v6.x STorM32 boards all provide the {{BOX|USB}}, {{BOX|UART}}, {{BOX|UATRT2}}, and {{BOX|UART3}} ports. |
|
| |
|
| * The v3.3/v4.1 STorM32 boards do provide a port labeled UART1 (Rx1/Tx1), which is indeed the UART1 hardware peripheral. Some v3.3 and the v4.1 boards do also provide a physical USB connector, which is however just again the UART1 peripheral (tied together via a on-board USB-TTL adapter). The UART1 port or USB connector is accessible in the GUI as {{PARAMVALUE|usb}}, i.e., this is the {{BOX|USB}} port.
| | The {{BOX|UART3}} port is shared with two pins of the {{BOX|RC}} port, pins RC-0 and RC-1 |
| | |
| * On the STorM32 v1.x boards the {{BOX|USB}} serial is indeed the USB connector. The UART1 hardware peripheral, used e.g. for flashing firmware, is available on these boards on the {{BOX|RC}} port, as pins RC-0 and RC-1.
| |
| | |
| * On the v3.3/v4.1 STorM32 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}}). In pictures of the v1.x board one however finds it indicated as UART1 and not UARTX (on these boards {{BOX|UARTX}} is in fact the UART1 peripheral).
| |
|
| |
|
| {| class="wikitable" | | {| class="wikitable" |
| ! Gui | | ! Gui |
| ! v1.3x
| | ! v3.3/v4.1/v6.2 |
| ! v3.3/v4.1 | |
| |- | | |- |
| | {{PARAMVALUE|uart}} || {{BOX|UART}} port || {{BOX|UART}} port | | | {{PARAMVALUE|uart}} || {{BOX|UART}} port |
| |- | | |- |
| | {{PARAMVALUE|uart2}} || has no effect, {{BOX|UART2}} port not available || {{BOX|UART2}} port or on {{BOX|ESP}} port | | | {{PARAMVALUE|uart2}} || {{BOX|UART2}} port |
| |- | | |- |
| | {{PARAMVALUE|usb}} || USB connector || USB connector or UART1 port<br>is equal to UART1 | | | {{PARAMVALUE|usb}} || USB connector (is internally connected to UART1 for) |
| |- | | |- |
| | {{PARAMVALUE|uartx}} || RC-0,RC-1 pins on {{BOX|RC}} port<br>is equal to UART1, labeled UART1 || RC-0,RC-1 pins on {{BOX|RC}} port<br>labeled UARTX | | | {{PARAMVALUE|uart3}} || RC-0,RC-1 pins on {{BOX|RC}} port<br>labeled UART3 |
| |} | | |} |
| <!--
| |
|
| |
| The naming 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 names, and the available serial ports 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 {{BOX|USB}}, {{BOX|UART}}, {{BOX|UART2}}, and {{BOX|UARTX}}, and that these are accessible in the GUI as {{PARAMVALUE|usb}}, {{PARAMVALUE|uart}}, {{PARAMVALUE|uart2}}, and {{PARAMVALUE|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 {{BOX|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 {{BOX|USB}} port (accessible in the GUI as {{PARAMVALUE|usb}}). Some STorM32 v3.x boards provide in addition a physical USB connector, which is however just also UART1 (i.e. connected to UART1 with a USB-TTL adapter), with said function. On the STorM32 v1.x boards the {{BOX|USB}} port is indeed the physical USB connector, while the STM32's UART1 peripheral used for flashing firmware is available on the STorM32 {{BOX|RC}} port, pins RC-0 and RC-1.
| |
|
| |
| * 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}}). In pictures of the v1.x board it is however indicated as UART1 and not UARTX (on these boards UARTX is in fact the STM32 UART1 peripheral).
| |
| -->
| |
|
| |
|
| == Baudrate == | | == Baudrate == |
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 for the MCU serial peripherals must not be confused with the names of the serial ports of the STorM32 controller! They may or may not coincide.
For the STM32F103 chips 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 boards, 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
Concerning the availability of the serial ports (for STorM32 boards documented in this wik) one can note:
The v3.x, v4.x, v6.x STorM32 boards all provide the USB, UART, UATRT2, and UART3 ports.
The UART3 port is shared with two pins of the RC port, pins RC-0 and RC-1
| Gui
|
v3.3/v4.1/v6.2
|
| “uart” |
UART port
|
| “uart2” |
UART2 port
|
| “usb” |
USB connector (is internally connected to UART1 for)
|
| “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).
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.