Skip to content

Commit ec0e737

Browse files
cfriedtjukkar
authored andcommitted
drivers: ieee802154: cc13xx_cc26xx: sub-ghz support
This change adds IEEE 802.15.4g (Sub GHz) support for the cc1352r. The 2.4 GHz radio and the Sub GHz radio are capable of operating simultaneously. Fixes zephyrproject-rtos#26315 Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
1 parent 577d588 commit ec0e737

File tree

10 files changed

+958
-8
lines changed

10 files changed

+958
-8
lines changed

drivers/ieee802154/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ zephyr_sources_ifdef(CONFIG_IEEE802154_MCR20A ieee802154_mcr20a.c)
77
zephyr_sources_ifdef(CONFIG_IEEE802154_NRF5 ieee802154_nrf5.c)
88
zephyr_sources_ifdef(CONFIG_IEEE802154_CC1200 ieee802154_cc1200.c)
99
zephyr_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX ieee802154_cc13xx_cc26xx.c)
10+
zephyr_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ ieee802154_cc13xx_cc26xx_subg.c)
1011
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx.c)
1112
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx_iface.c)
1213
zephyr_sources_ifdef(CONFIG_IEEE802154_DW1000 ieee802154_dw1000.c)

drivers/ieee802154/Kconfig.cc13xx_cc26xx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,37 @@ config IEEE802154_CC13XX_CC26XX_INIT_PRIO
2121
Set the initialization priority number.
2222

2323
endif # IEEE802154_CC13XX_CC26XX
24+
25+
menuconfig IEEE802154_CC13XX_CC26XX_SUB_GHZ
26+
bool "TI CC13xx / CC26xx IEEE 802.15.4g driver support"
27+
select NET_L2_IEEE802154_SUB_GHZ
28+
29+
if IEEE802154_CC13XX_CC26XX_SUB_GHZ
30+
31+
config IEEE802154_CC13XX_CC26XX_SUB_GHZ_DRV_NAME
32+
string "TI CC13xx / CC26xx IEEE 802.15.4g driver's name"
33+
default "IEEE802154_1"
34+
help
35+
This option sets the driver name.
36+
37+
config IEEE802154_CC13XX_CC26XX_SUB_GHZ_NUM_RX_BUF
38+
int "TI CC13xx / CC26xx IEEE 802.15.4g receive buffer count"
39+
default 2
40+
help
41+
This option allows the user to configure the number of
42+
receive buffers.
43+
44+
config IEEE802154_CC13XX_CC26XX_SUB_GHZ_CS_THRESHOLD
45+
int "TI CC13xx / CC26xx IEEE 802.15.4g Carrier Sense Threshold in dBm"
46+
default -70
47+
help
48+
This option sets RSSI threshold for carrier sense in the CSMA/CA
49+
algorithm.
50+
51+
config IEEE802154_CC13XX_CC26XX_SUB_GHZ_INIT_PRIO
52+
int "TI CC13xx / CC26xx IEEE 802.15.4g initialization priority"
53+
default 80
54+
help
55+
Set the initialization priority number.
56+
57+
endif # IEEE802154_CC13XX_CC26XX_SUB_GHZ

drivers/ieee802154/ieee802154_cc13xx_cc26xx.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,12 @@ static int ieee802154_cc13xx_cc26xx_stop(const struct device *dev)
447447

448448
RF_Stat status;
449449

450-
status = RF_flushCmd(drv_data->rf_handle, RF_CMDHANDLE_FLUSH_ALL, RF_ABORT_PREEMPTION);
451-
if (!(status == RF_StatCmdDoneSuccess || status == RF_StatSuccess
450+
status = RF_flushCmd(drv_data->rf_handle, RF_CMDHANDLE_FLUSH_ALL, 0);
451+
if (!(status == RF_StatCmdDoneSuccess
452+
|| status == RF_StatSuccess
453+
|| status == RF_StatRadioInactiveError
452454
|| status == RF_StatInvalidParamsError)) {
453-
LOG_ERR("Failed to abort radio operations (%d)", status);
455+
LOG_DBG("Failed to abort radio operations (%d)", status);
454456
return -EIO;
455457
}
456458

0 commit comments

Comments
 (0)