Skip to content

Update IEEE802154 support for ESP32-C6 #90823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/espressif/esp32c6_devkitc/esp32c6_devkitc_hpcore.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,ieee802154 = &ieee802154;
};

aliases {
Expand Down Expand Up @@ -75,3 +76,7 @@
&wifi {
status = "okay";
};

&ieee802154 {
status = "okay";
};
2 changes: 2 additions & 0 deletions boards/espressif/esp32c6_devkitc/esp32c6_devkitc_hpcore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ supported:
- entropy
- i2c
- i2s
- netif:openthread

testing:
ignore_tags:
- bluetooth
5 changes: 5 additions & 0 deletions boards/seeed/xiao_esp32c6/xiao_esp32c6_hpcore.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
zephyr,shell-uart = &usb_serial;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,ieee802154 = &ieee802154;
};

leds: leds {
Expand Down Expand Up @@ -80,3 +81,7 @@
&wifi {
status = "okay";
};

&ieee802154 {
status = "okay";
};
2 changes: 2 additions & 0 deletions boards/seeed/xiao_esp32c6/xiao_esp32c6_hpcore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ supported:
- xiao_i2c
- xiao_serial
- xiao_spi
- netif:openthread

testing:
ignore_tags:
- bluetooth
Expand Down
1 change: 1 addition & 0 deletions drivers/ieee802154/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ zephyr_library_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ
)
zephyr_library_sources_ifdef(CONFIG_IEEE802154_CC2520 ieee802154_cc2520.c)
zephyr_library_sources_ifdef(CONFIG_IEEE802154_DW1000 ieee802154_dw1000.c)
zephyr_library_sources_ifdef(CONFIG_IEEE802154_ESP32 ieee802154_esp32.c)
zephyr_library_sources_ifdef(CONFIG_IEEE802154_KW41Z ieee802154_kw41z.c)
zephyr_library_sources_ifdef(CONFIG_IEEE802154_MCR20A ieee802154_mcr20a.c)
zephyr_library_sources_ifdef(CONFIG_IEEE802154_MCXW ieee802154_mcxw.c ieee802154_mcxw_utils.c)
Expand Down
2 changes: 2 additions & 0 deletions drivers/ieee802154/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ source "drivers/ieee802154/Kconfig.rf2xx"

source "drivers/ieee802154/Kconfig.dw1000"

source "drivers/ieee802154/Kconfig.esp32"

source "drivers/ieee802154/Kconfig.uart_pipe"

config IEEE802154_CSL_ENDPOINT
Expand Down
185 changes: 185 additions & 0 deletions drivers/ieee802154/Kconfig.esp32
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# Espressif ESP32 802.15.4 configuration options

# Copyright (c) 2024 A Labs GmbH
# SPDX-License-Identifier: Apache-2.0

menuconfig IEEE802154_ESP32
bool "ESP32 series IEEE 802.15.4 Driver"
default y
depends on DT_HAS_ESPRESSIF_ESP32_IEEE802154_ENABLED

if IEEE802154_ESP32

config IEEE802154_ESP32_INIT_PRIO
int "ESP32 IEEE 802.15.4 initialization priority"
default 80
help
Set the initialization priority number. Do not mess with it unless
you know what you are doing.

# Kconfigs copied from Espressif HAL module (ESP-IDF) below

config IEEE802154_ESP32_RX_BUFFER_SIZE
int "Number of 802.15.4 receive buffers"
default 20
range 2 100
help
The number of 802.15.4 receive buffers.

This config is used in the Espressif HAL module.

choice IEEE802154_ESP32_CCA_MODE
prompt "Clear Channel Assessment (CCA) mode"
default IEEE802154_ESP32_CCA_ED
help
Configure the CCA mode

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_CCA_CARRIER
bool "Carrier sense only"
help
Configure the CCA mode to Carrier sense only

config IEEE802154_ESP32_CCA_ED
bool "Energy above threshold"
help
Configure the CCA mode to Energy above threshold

config IEEE802154_ESP32_CCA_CARRIER_OR_ED
bool "Carrier sense OR energy above threshold"
help
Configure the CCA mode to Carrier sense OR energy above threshold

config IEEE802154_ESP32_CCA_CARRIER_AND_ED
bool "Carrier sense AND energy above threshold"
help
Configure the CCA mode to Carrier sense AND energy above threshold

endchoice # IEEE802154_CCA_MODE

config IEEE802154_ESP32_CCA_MODE
int
default 0 if IEEE802154_ESP32_CCA_CARRIER
default 1 if IEEE802154_ESP32_CCA_ED
default 2 if IEEE802154_ESP32_CCA_CARRIER_OR_ED
default 3 if IEEE802154_ESP32_CCA_CARRIER_AND_ED

config IEEE802154_ESP32_CCA_THRESHOLD
int "CCA detection threshold"
range -120 0
default -60
help
Set the CCA threshold, in dB.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_PENDING_TABLE_SIZE
int "Pending table size"
range 1 100
default 20
help
set the pending table size

config IEEE802154_ESP32_MULTI_PAN_ENABLE
bool "Multi-pan feature for frame filter"
help
Enable IEEE802154 multi-pan

This config is used in the Espressif HAL module.

menuconfig IEEE802154_ESP32_DEBUG
bool "IEEE802154 Debug"
help
Enabling this option allows different kinds of IEEE802154 debug output.
All IEEE802154 debug features increase the size of the final binary.

config IEEE802154_ESP32_ASSERT
bool "Enrich the assert information with IEEE802154 state and event"
depends on IEEE802154_ESP32_DEBUG
default n
help
Enabling this option to add some probe codes in the driver, and this information
will be printed when assert.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_RECORD_EVENT
bool "Record event information for debugging"
depends on IEEE802154_ESP32_DEBUG
help
Enabling this option to record event, when assert, the recorded event will be printed.

config IEEE802154_ESP32_RECORD_EVENT_SIZE
int "Record event table size"
depends on IEEE802154_ESP32_RECORD_EVENT
range 1 50
default 30
help
Set the record event table size

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_RECORD_STATE
bool "Record state information for debugging"
depends on IEEE802154_ESP32_DEBUG
help
Enabling this option to record state, when assert, the recorded state will be printed.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_RECORD_STATE_SIZE
int "Record state table size"
depends on IEEE802154_ESP32_RECORD_STATE
range 1 50
default 10
help
Set the record state table size.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_RECORD_CMD
bool "Record command information for debugging"
depends on IEEE802154_ESP32_DEBUG
help
Enable this option to record the command information.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_RECORD_CMD_SIZE
int "Record command table size"
depends on IEEE802154_ESP32_RECORD_CMD
range 1 50
default 10
help
Set the record command table size.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_RECORD_ABORT
bool "Record abort information for debugging"
depends on IEEE802154_ESP32_DEBUG
help
Enable this option to record abort information.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_RECORD_ABORT_SIZE
int "Record abort table size"
depends on IEEE802154_ESP32_RECORD_ABORT
range 1 50
default 10
help
Set the record abort table size.

This config is used in the Espressif HAL module.

config IEEE802154_ESP32_TXRX_STATISTIC
bool "Record tx/rx packet information for debugging"
depends on IEEE802154_ESP32_DEBUG
help
Enable this option to record tx and rx packet information.

This config is used in the Espressif HAL module.

endif # IEEE802154_ESP32
Loading
Loading