twai:modify default gpios in esp32s3

GPIO 20 is used for USB JTAG in esp32s3. So change the default gpios for
twai in twai examples so that twai can be used without disturbing JTAG.
This commit is contained in:
bizhuangyang
2021-06-21 12:14:39 +08:00
parent 67743ac444
commit 21311ece58
8 changed files with 23 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ idf.py menuconfig
* Under `Example Configuration`, configure the pin assignments using the options `TX GPIO Number` and `RX GPIO Number` according to how the target was connected to the transceiver. By default, `TX GPIO Number` and `RX GPIO Number` are set to the following values:
* On the ESP32, `TX GPIO Number` and `RX GPIO Number` default to `21` and `22` respectively
* On the ESP32-S2, `TX GPIO Number` and `RX GPIO Number` default to `20` and `21` respectively
* On the ESP32-S3, `TX GPIO Number` and `RX GPIO Number` default to `20` and `21` respectively
* On the ESP32-S3, `TX GPIO Number` and `RX GPIO Number` default to `4` and `5` respectively
* On the ESP32-C3, `TX GPIO Number` and `RX GPIO Number` default to `2` and `3` respectively
### Build and Flash

View File

@@ -3,8 +3,9 @@ menu "Example Configuration"
config EXAMPLE_TX_GPIO_NUM
int "TX GPIO number"
default 2 if IDF_TARGET_ESP32C3
default 20 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 20 if IDF_TARGET_ESP32S2
default 21 if IDF_TARGET_ESP32
default 4 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the TX signal. Connect the
TX signal to your transceiver.
@@ -12,8 +13,9 @@ menu "Example Configuration"
config EXAMPLE_RX_GPIO_NUM
int "RX GPIO number"
default 3 if IDF_TARGET_ESP32C3
default 21 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 21 if IDF_TARGET_ESP32S2
default 22 if IDF_TARGET_ESP32
default 5 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the RX signal. Connect the
RX signal to your transceiver.

View File

@@ -55,7 +55,7 @@ idf.py menuconfig
* Under `Example Configuration`, configure the pin assignments using the options `TX GPIO Number` and `RX GPIO Number` according to how the target was connected to the transceiver. By default, `TX GPIO Number` and `RX GPIO Number` are set to the following values:
* On the ESP32, `TX GPIO Number` and `RX GPIO Number` default to `21` and `22` respectively
* On the ESP32-S2, `TX GPIO Number` and `RX GPIO Number` default to `20` and `21` respectively
* On the ESP32-S3, `TX GPIO Number` and `RX GPIO Number` default to `20` and `21` respectively
* On the ESP32-S3, `TX GPIO Number` and `RX GPIO Number` default to `4` and `5` respectively
* On the ESP32-C3, `TX GPIO Number` and `RX GPIO Number` default to `2` and `3` respectively

View File

@@ -3,8 +3,9 @@ menu "Example Configuration"
config EXAMPLE_TX_GPIO_NUM
int "TX GPIO number"
default 2 if IDF_TARGET_ESP32C3
default 20 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 20 if IDF_TARGET_ESP32S2
default 21 if IDF_TARGET_ESP32
default 4 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the TX signal. Connect the
TX signal to your transceiver.
@@ -12,8 +13,9 @@ menu "Example Configuration"
config EXAMPLE_RX_GPIO_NUM
int "RX GPIO number"
default 3 if IDF_TARGET_ESP32C3
default 21 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 21 if IDF_TARGET_ESP32S2
default 22 if IDF_TARGET_ESP32
default 5 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the RX signal. Connect the
RX signal to your transceiver.

View File

@@ -3,8 +3,9 @@ menu "Example Configuration"
config EXAMPLE_TX_GPIO_NUM
int "TX GPIO number"
default 2 if IDF_TARGET_ESP32C3
default 20 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 20 if IDF_TARGET_ESP32S2
default 21 if IDF_TARGET_ESP32
default 4 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the TX signal. Connect the
TX signal to your transceiver.
@@ -12,8 +13,9 @@ menu "Example Configuration"
config EXAMPLE_RX_GPIO_NUM
int "RX GPIO number"
default 3 if IDF_TARGET_ESP32C3
default 21 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 21 if IDF_TARGET_ESP32S2
default 22 if IDF_TARGET_ESP32
default 5 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the RX signal. Connect the
RX signal to your transceiver.

View File

@@ -3,8 +3,9 @@ menu "Example Configuration"
config EXAMPLE_TX_GPIO_NUM
int "TX GPIO number"
default 2 if IDF_TARGET_ESP32C3
default 20 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 20 if IDF_TARGET_ESP32S2
default 21 if IDF_TARGET_ESP32
default 4 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the TX signal. Connect the
TX signal to your transceiver.
@@ -12,8 +13,9 @@ menu "Example Configuration"
config EXAMPLE_RX_GPIO_NUM
int "RX GPIO number"
default 3 if IDF_TARGET_ESP32C3
default 21 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 21 if IDF_TARGET_ESP32S2
default 22 if IDF_TARGET_ESP32
default 5 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the RX signal. Connect the
RX signal to your transceiver.

View File

@@ -25,7 +25,7 @@ idf.py menuconfig
* Under `Example Configuration`, configure the pin assignments using the options `TX GPIO Number` and `RX GPIO Number` according to how the target was connected to the transceiver. By default, `TX GPIO Number` and `RX GPIO Number` are set to the following values:
* On the ESP32, `TX GPIO Number` and `RX GPIO Number` default to `21` and `22` respectively
* On the ESP32-S2, `TX GPIO Number` and `RX GPIO Number` default to `20` and `21` respectively
* On the ESP32-S3, `TX GPIO Number` and `RX GPIO Number` default to `20` and `21` respectively
* On the ESP32-S3, `TX GPIO Number` and `RX GPIO Number` default to `4` and `5` respectively
* On the ESP32-C3, `TX GPIO Number` and `RX GPIO Number` default to `2` and `3` respectively
### Build and Flash

View File

@@ -3,8 +3,9 @@ menu "Example Configuration"
config EXAMPLE_TX_GPIO_NUM
int "TX GPIO number"
default 2 if IDF_TARGET_ESP32C3
default 20 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 20 if IDF_TARGET_ESP32S2
default 21 if IDF_TARGET_ESP32
default 4 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the TX signal. Connect the
TX signal to your transceiver.
@@ -12,8 +13,9 @@ menu "Example Configuration"
config EXAMPLE_RX_GPIO_NUM
int "RX GPIO number"
default 3 if IDF_TARGET_ESP32C3
default 21 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 21 if IDF_TARGET_ESP32S2
default 22 if IDF_TARGET_ESP32
default 5 if IDF_TARGET_ESP32S3
help
This option selects the GPIO pin used for the RX signal. Connect the
RX signal to your transceiver.