-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
IEEE 802.15.4 support for ESP32-C6 #82876
base: main
Are you sure you want to change the base?
Changes from all commits
f9bce7e
1a5930d
3a3f057
627c41e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
zephyr,shell-uart = &uart0; | ||
zephyr,flash = &flash0; | ||
zephyr,code-partition = &slot0_partition; | ||
zephyr,ieee802154 = &ieee802154; | ||
}; | ||
|
||
aliases { | ||
|
@@ -71,3 +72,7 @@ | |
&wdt0 { | ||
status = "okay"; | ||
}; | ||
|
||
&ieee802154 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This 'enable' should go into a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I don't think so. It is also enabled in the board file of |
||
status = "okay"; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ supported: | |
- counter | ||
- entropy | ||
- i2c | ||
- netif:openthread |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ supported: | |
- spi | ||
- entropy | ||
- i2c | ||
- netif:openthread | ||
testing: | ||
ignore_tags: | ||
- tracing | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
# 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_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_CCA_MODE | ||
prompt "Clear Channel Assessment (CCA) mode" | ||
default IEEE802154_CCA_ED | ||
help | ||
Configure the CCA mode | ||
|
||
This config is used in the Espressif HAL module. | ||
|
||
config IEEE802154_CCA_CARRIER | ||
bool "Carrier sense only" | ||
help | ||
Configure the CCA mode to Carrier sense only | ||
|
||
config IEEE802154_CCA_ED | ||
bool "Energy above threshold" | ||
help | ||
Configure the CCA mode to Energy above threshold | ||
|
||
config IEEE802154_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_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_CCA_MODE | ||
int | ||
default 0 if IEEE802154_CCA_CARRIER | ||
default 1 if IEEE802154_CCA_ED | ||
default 2 if IEEE802154_CCA_CARRIER_OR_ED | ||
default 3 if IEEE802154_CCA_CARRIER_AND_ED | ||
|
||
config IEEE802154_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_PENDING_TABLE_SIZE | ||
int "Pending table size" | ||
range 1 100 | ||
default 20 | ||
help | ||
set the pending table size | ||
|
||
config IEEE802154_MULTI_PAN_ENABLE | ||
bool "Multi-pan feature for frame filter" | ||
help | ||
Enable IEEE802154 multi-pan | ||
|
||
This config is used in the Espressif HAL module. | ||
|
||
config IEEE802154_TIMING_OPTIMIZATION | ||
bool "Throughput optimization" | ||
help | ||
Enabling this option increases throughput by ~5% at the expense of ~2.1k | ||
IRAM code size increase. | ||
|
||
This config is used in the Espressif HAL module. | ||
|
||
config IEEE802154_SLEEP_ENABLE | ||
# Todo: Remove when support safe power-down of the power domain (IDF-7317) | ||
bool "IEEE802154 light sleep" | ||
depends on PM | ||
help | ||
Enabling this option allows the IEEE802.15.4 module to be powered down during automatic | ||
light sleep, which reduces current consumption. | ||
|
||
This is currently untested in Zephyr. Use with caution. | ||
|
||
This config is used in the Espressif HAL module. | ||
|
||
menuconfig IEEE802154_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_ASSERT | ||
bool "Enrich the assert information with IEEE802154 state and event" | ||
depends on IEEE802154_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_RECORD_EVENT | ||
bool "Record event information for debugging" | ||
depends on IEEE802154_DEBUG | ||
help | ||
Enabling this option to record event, when assert, the recorded event will be printed. | ||
|
||
config IEEE802154_RECORD_EVENT_SIZE | ||
int "Record event table size" | ||
depends on IEEE802154_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_RECORD_STATE | ||
bool "Record state information for debugging" | ||
depends on IEEE802154_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_RECORD_STATE_SIZE | ||
int "Record state table size" | ||
depends on IEEE802154_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_RECORD_CMD | ||
bool "Record command information for debugging" | ||
depends on IEEE802154_DEBUG | ||
help | ||
Enable this option to record the command information. | ||
|
||
This config is used in the Espressif HAL module. | ||
|
||
config IEEE802154_RECORD_CMD_SIZE | ||
int "Record command table size" | ||
depends on IEEE802154_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_RECORD_ABORT | ||
bool "Record abort information for debugging" | ||
depends on IEEE802154_DEBUG | ||
help | ||
Enable this option to record abort information. | ||
|
||
This config is used in the Espressif HAL module. | ||
|
||
config IEEE802154_RECORD_ABORT_SIZE | ||
int "Record abort table size" | ||
depends on IEEE802154_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_TXRX_STATISTIC | ||
bool "Record tx/rx packet information for debugging" | ||
depends on IEEE802154_DEBUG | ||
help | ||
Enable this option to record tx and rx packet information. | ||
|
||
This config is used in the Espressif HAL module. | ||
|
||
endif # IEEE802154_ESP32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably go to the sample overlay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't thinks so. See previous comment.