You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/api/serial.rst
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,15 @@ ESP32-P4 5 1
45
45
* HP (High-Performance) UARTs are the standard UART peripherals
46
46
* LP (Low-Power) UARTs are available on some SoCs for ultra-low power applications
47
47
* UART0 is typically used for programming and debug output (Serial Monitor)
48
-
* Additional UARTs (Serial1, Serial2, etc.) are available for general-purpose communication
48
+
* Additional UARTs (Serial1, Serial2, etc.) are available for general-purpose communication, including LP UARTs when available. The ESP32 Arduino Core automatically creates HardwareSerial objects for all available UARTs:
49
+
50
+
* ``Serial0`` (or ``Serial``) - UART0 (HP UART, typically used for programming and debug output)
51
+
* ``Serial1``, ``Serial2``, etc. - Additional HP UARTs (numbered sequentially)
52
+
* Additional Serial objects - LP UARTs, when available (numbered after HP UARTs)
53
+
54
+
**Example:** The ESP32-C6 has 2 HP UARTs and 1 LP UART. The Arduino Core creates ``Serial0`` and ``Serial1`` (HP UARTs) plus ``Serial2`` (LP UART) HardwareSerial objects.
55
+
56
+
**Important:** LP UARTs can be used as regular UART ports, but they have fixed GPIO pins for RX, TX, CTS, and RTS. It is not possible to change the pins for LP UARTs using ``setPins()``.
49
57
50
58
Arduino-ESP32 Serial API
51
59
------------------------
@@ -61,8 +69,7 @@ Initializes the Serial port with the specified baud rate and configuration.
61
69
62
70
* ``baud`` - Baud rate (bits per second). Common values: 9600, 115200, 230400, etc.
63
71
64
-
**Special value:** ``0`` enables baud rate detection (ESP32, ESP32-S2 only). The function will attempt to detect the baud rate for up to ``timeout_ms`` milliseconds.
65
-
72
+
**Special value:** ``0`` enables baud rate detection (ESP32, ESP32-S2 only). The function will attempt to detect the baud rate for up to ``timeout_ms`` milliseconds. See the :ref:`Baud Rate Detection Example <baud-rate-detection-example>` for usage details.
66
73
* ``config`` - Serial configuration (data bits, parity, stop bits):
67
74
68
75
* ``SERIAL_8N1`` - 8 data bits, no parity, 1 stop bit (default)
0 commit comments