uart: update register headers and examples for S3
This commit is contained in:
@@ -9,23 +9,23 @@ configured UART.
|
||||
|
||||
### Hardware Required
|
||||
|
||||
The example can be run on any ESP32 or ESP32-S2 based development board connected to a PC with a single USB cable for flashing and
|
||||
The example can be run on any ESP32, ESP32-S and ESP32-C series based development board connected to a computer with a single USB cable for flashing and
|
||||
monitoring. The external interface should have 3.3V outputs. You may use e.g. 3.3V compatible USB-to-Serial dongle.
|
||||
|
||||
### Setup the Hardware
|
||||
|
||||
Connect the external serial interface to the ESP32(S2) board as follows.
|
||||
|
||||
Connect the external serial interface to the board as follows.
|
||||
|
||||
```
|
||||
---------------------------------------------------------------------------------------
|
||||
| Target chip Interface | #define | Default ESP32(S2) Pin| External UART Pin |
|
||||
| Target chip Interface | #define | Default ESP Pin | External UART Pin |
|
||||
| ----------------------|------------------|----------------------|--------------------
|
||||
| Transmit Data (TxD) | EXAMPLE_UART_TXD | GPIO4 | RxD |
|
||||
| Receive Data (RxD) | EXAMPLE_UART_RXD | GPIO5 | TxD |
|
||||
| Ground | n/a | GND | GND |
|
||||
---------------------------------------------------------------------------------------
|
||||
```
|
||||
Note: The GPIO22 - GPIO25 can not be used with ESP32-S2 chip because they are reserved for internal use. Please refer to UART documentation for selected target.
|
||||
Note: Some GPIOs can not be used with certain chips because they are reserved for internal use. Please refer to UART documentation for selected target.
|
||||
|
||||
Optionally, you can set-up and use a serial interface that has RTS and CTS signals in order to verify that the
|
||||
hardware control flow works. Connect the extra signals according to the following table, configure both extra pins in
|
||||
@@ -35,7 +35,7 @@ UART1 driver to use the hardware flow control by setting `.flow_ctrl = UART_HW_F
|
||||
|
||||
```
|
||||
--------------------------------------------------------------------------------------
|
||||
| Target chip Interface | #define | Default ESP32(S2) Pin| External UART Pin |
|
||||
| Target chip Interface | #define | Default ESP Pin | External UART Pin |
|
||||
| ----------------------|-----------------|----------------------|--------------------
|
||||
| Transmit Data (TxD) | ECHO_TEST_RTS | GPIO18 | CTS |
|
||||
| Receive Data (RxD) | ECHO_TEST_CTS | GPIO19 | RTS |
|
||||
@@ -65,8 +65,7 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui
|
||||
|
||||
## Example Output
|
||||
|
||||
Type some characters in the terminal connected to the external serial interface. As result you should see echo in the
|
||||
terminal which is used for flashing and monitoring. You can verify if the echo indeed comes from ESP32(S2) board by
|
||||
Type some characters in the terminal connected to the external serial interface. As result you should see echo in the same terminal which you used for typing the characters. You can verify if the echo indeed comes from ESP board by
|
||||
disconnecting either `TxD` or `RxD` pin: no characters will appear when typing.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
@@ -2,9 +2,9 @@ menu "Echo Example Configuration"
|
||||
|
||||
config EXAMPLE_UART_PORT_NUM
|
||||
int "UART port number"
|
||||
range 0 2 if IDF_TARGET_ESP32
|
||||
range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
|
||||
range 0 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3
|
||||
default 2 if IDF_TARGET_ESP32
|
||||
default 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
|
||||
default 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3
|
||||
help
|
||||
UART communication port number for the example.
|
||||
@@ -20,7 +20,7 @@ menu "Echo Example Configuration"
|
||||
config EXAMPLE_UART_RXD
|
||||
int "UART RXD pin number"
|
||||
range 0 34 if IDF_TARGET_ESP32
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
|
||||
range 0 19 if IDF_TARGET_ESP32C3
|
||||
default 5
|
||||
help
|
||||
@@ -30,7 +30,7 @@ menu "Echo Example Configuration"
|
||||
config EXAMPLE_UART_TXD
|
||||
int "UART TXD pin number"
|
||||
range 0 34 if IDF_TARGET_ESP32
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
|
||||
range 0 19 if IDF_TARGET_ESP32C3
|
||||
default 4
|
||||
help
|
||||
|
||||
Reference in New Issue
Block a user