Merge branch 'feature/modbus_add_esp32c2_esp32c6_targets' into 'master'

examples: modbus add esp32c2 esp32c6 targets

See merge request espressif/esp-idf!22017
This commit is contained in:
Ivan Grokhotkov
2023-01-28 00:45:47 +08:00
7 changed files with 32 additions and 30 deletions

View File

@@ -129,9 +129,11 @@ examples/protocols/mdns:
examples/protocols/modbus: examples/protocols/modbus:
disable: disable:
- if: IDF_TARGET in ["esp32c2", "esp32c6", "esp32h2"] - if: IDF_TARGET in ["esp32h2"]
disable_test:
- if: IDF_TARGET != "esp32"
temporary: true temporary: true
reason: target(s) not supported yet reason: lack of runners
examples/protocols/mqtt/ssl: examples/protocols/mqtt/ssl:
disable: disable:

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# Modbus Master Example # Modbus Master Example
@@ -96,8 +96,8 @@ Define the communication mode parameter for master and slave in Kconfig - CONFIG
Configure the slave address for each slave in the Modbus segment (the CONFIG_MB_SLAVE_ADDR in Kconfig). Configure the slave address for each slave in the Modbus segment (the CONFIG_MB_SLAVE_ADDR in Kconfig).
``` ```
-------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------
| UART Interface | #define | Default ESP32 Pin | Default pins for | External RS485 Driver Pin | | UART Interface | #define | Default pins for | Default pins for | External RS485 Driver Pin |
| | | | ESP32-S2(S3, C3) | | | | | ESP32 (C6) | ESP32-S2 (S3, C3, C2) | |
| ----------------------|--------------------|-----------------------|-----------------------|---------------------------| | ----------------------|--------------------|-----------------------|-----------------------|---------------------------|
| Transmit Data (TxD) | CONFIG_MB_UART_TXD | GPIO23 | GPIO9 | DI | | Transmit Data (TxD) | CONFIG_MB_UART_TXD | GPIO23 | GPIO9 | DI |
| Receive Data (RxD) | CONFIG_MB_UART_RXD | GPIO22 | GPIO8 | RO | | Receive Data (RxD) | CONFIG_MB_UART_RXD | GPIO22 | GPIO8 | RO |

View File

@@ -6,8 +6,8 @@ menu "Modbus Example Configuration"
int "UART port number" int "UART port number"
range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3 range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3 default 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
range 0 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 range 0 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C6
default 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 default 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C6
help help
UART communication port number for Modbus example. UART communication port number for Modbus example.
@@ -21,8 +21,8 @@ menu "Modbus Example Configuration"
config MB_UART_RXD config MB_UART_RXD
int "UART RXD pin number" int "UART RXD pin number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 22 if IDF_TARGET_ESP32 default 22 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C6
default 8 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 default 8 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
help help
GPIO number for UART RX pin. See UART documentation for more information GPIO number for UART RX pin. See UART documentation for more information
about available pin numbers for UART. about available pin numbers for UART.
@@ -30,8 +30,8 @@ menu "Modbus Example Configuration"
config MB_UART_TXD config MB_UART_TXD
int "UART TXD pin number" int "UART TXD pin number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23 if IDF_TARGET_ESP32 default 23 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C6
default 9 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 default 9 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
help help
GPIO number for UART TX pin. See UART documentation for more information GPIO number for UART TX pin. See UART documentation for more information
about available pin numbers for UART. about available pin numbers for UART.
@@ -39,8 +39,8 @@ menu "Modbus Example Configuration"
config MB_UART_RTS config MB_UART_RTS
int "UART RTS pin number" int "UART RTS pin number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18 if IDF_TARGET_ESP32 default 18 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C6
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
help help
GPIO number for UART RTS pin. This pin is connected to GPIO number for UART RTS pin. This pin is connected to
~RE/DE pin of RS485 transceiver to switch direction. ~RE/DE pin of RS485 transceiver to switch direction.

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# Modbus Slave Example # Modbus Slave Example
@@ -46,8 +46,8 @@ Select Modbus Example Configuration menu item.
Configure the UART pins used for modbus communication using the command and table below. Configure the UART pins used for modbus communication using the command and table below.
``` ```
-------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------
| UART Interface | #define | Default ESP32 Pin | Default pins for | External RS485 Driver Pin | | UART Interface | #define | Default pins for | Default pins for | External RS485 Driver Pin |
| | | | ESP32-S2(S3, C3) | | | | | ESP32 (C6) | ESP32-S2 (S3, C3, C2) | |
| ----------------------|--------------------|-----------------------|-----------------------|---------------------------| | ----------------------|--------------------|-----------------------|-----------------------|---------------------------|
| Transmit Data (TxD) | CONFIG_MB_UART_TXD | GPIO23 | GPIO9 | DI | | Transmit Data (TxD) | CONFIG_MB_UART_TXD | GPIO23 | GPIO9 | DI |
| Receive Data (RxD) | CONFIG_MB_UART_RXD | GPIO22 | GPIO8 | RO | | Receive Data (RxD) | CONFIG_MB_UART_RXD | GPIO22 | GPIO8 | RO |

View File

@@ -6,8 +6,8 @@ menu "Modbus Example Configuration"
int "UART port number" int "UART port number"
range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3 range 0 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3 default 2 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
range 0 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 range 0 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C6
default 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 default 1 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C6
help help
UART communication port number for Modbus example. UART communication port number for Modbus example.
@@ -21,8 +21,8 @@ menu "Modbus Example Configuration"
config MB_UART_RXD config MB_UART_RXD
int "UART RXD pin number" int "UART RXD pin number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 22 if IDF_TARGET_ESP32 default 22 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C6
default 8 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 default 8 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
help help
GPIO number for UART RX pin. See UART documentation for more information GPIO number for UART RX pin. See UART documentation for more information
about available pin numbers for UART. about available pin numbers for UART.
@@ -30,8 +30,8 @@ menu "Modbus Example Configuration"
config MB_UART_TXD config MB_UART_TXD
int "UART TXD pin number" int "UART TXD pin number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 23 if IDF_TARGET_ESP32 default 23 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C6
default 9 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 default 9 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
help help
GPIO number for UART TX pin. See UART documentation for more information GPIO number for UART TX pin. See UART documentation for more information
about available pin numbers for UART. about available pin numbers for UART.
@@ -39,8 +39,8 @@ menu "Modbus Example Configuration"
config MB_UART_RTS config MB_UART_RTS
int "UART RTS pin number" int "UART RTS pin number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18 if IDF_TARGET_ESP32 default 18 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C6
default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
help help
GPIO number for UART RTS pin. This pin is connected to GPIO number for UART RTS pin. This pin is connected to
~RE/DE pin of RS485 transceiver to switch direction. ~RE/DE pin of RS485 transceiver to switch direction.

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# Modbus TCP Master Example # Modbus TCP Master Example

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# Modbus Slave Example # Modbus Slave Example