Skip to content

Commit

Permalink
drivers: ieee802154: cc13xx_cc26xx: sub-ghz support
Browse files Browse the repository at this point in the history
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 #26315

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
  • Loading branch information
cfriedt authored and jukkar committed Nov 9, 2020
1 parent 577d588 commit ec0e737
Show file tree
Hide file tree
Showing 10 changed files with 958 additions and 8 deletions.
1 change: 1 addition & 0 deletions drivers/ieee802154/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ zephyr_sources_ifdef(CONFIG_IEEE802154_MCR20A ieee802154_mcr20a.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_NRF5 ieee802154_nrf5.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_CC1200 ieee802154_cc1200.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX ieee802154_cc13xx_cc26xx.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ ieee802154_cc13xx_cc26xx_subg.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx_iface.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_DW1000 ieee802154_dw1000.c)
Expand Down
34 changes: 34 additions & 0 deletions drivers/ieee802154/Kconfig.cc13xx_cc26xx
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,37 @@ config IEEE802154_CC13XX_CC26XX_INIT_PRIO
Set the initialization priority number.

endif # IEEE802154_CC13XX_CC26XX

menuconfig IEEE802154_CC13XX_CC26XX_SUB_GHZ
bool "TI CC13xx / CC26xx IEEE 802.15.4g driver support"
select NET_L2_IEEE802154_SUB_GHZ

if IEEE802154_CC13XX_CC26XX_SUB_GHZ

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_DRV_NAME
string "TI CC13xx / CC26xx IEEE 802.15.4g driver's name"
default "IEEE802154_1"
help
This option sets the driver name.

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_NUM_RX_BUF
int "TI CC13xx / CC26xx IEEE 802.15.4g receive buffer count"
default 2
help
This option allows the user to configure the number of
receive buffers.

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_CS_THRESHOLD
int "TI CC13xx / CC26xx IEEE 802.15.4g Carrier Sense Threshold in dBm"
default -70
help
This option sets RSSI threshold for carrier sense in the CSMA/CA
algorithm.

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_INIT_PRIO
int "TI CC13xx / CC26xx IEEE 802.15.4g initialization priority"
default 80
help
Set the initialization priority number.

endif # IEEE802154_CC13XX_CC26XX_SUB_GHZ
8 changes: 5 additions & 3 deletions drivers/ieee802154/ieee802154_cc13xx_cc26xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,12 @@ static int ieee802154_cc13xx_cc26xx_stop(const struct device *dev)

RF_Stat status;

status = RF_flushCmd(drv_data->rf_handle, RF_CMDHANDLE_FLUSH_ALL, RF_ABORT_PREEMPTION);
if (!(status == RF_StatCmdDoneSuccess || status == RF_StatSuccess
status = RF_flushCmd(drv_data->rf_handle, RF_CMDHANDLE_FLUSH_ALL, 0);
if (!(status == RF_StatCmdDoneSuccess
|| status == RF_StatSuccess
|| status == RF_StatRadioInactiveError
|| status == RF_StatInvalidParamsError)) {
LOG_ERR("Failed to abort radio operations (%d)", status);
LOG_DBG("Failed to abort radio operations (%d)", status);
return -EIO;
}

Expand Down
Loading

0 comments on commit ec0e737

Please sign in to comment.