Skip to content
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

drivers: ieee802154: cc13xx_cc26xx: sub-ghz support #29598

Merged
merged 1 commit into from
Nov 9, 2020
Merged

drivers: ieee802154: cc13xx_cc26xx: sub-ghz support #29598

merged 1 commit into from
Nov 9, 2020

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Oct 28, 2020

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

@cfriedt
Copy link
Member Author

cfriedt commented Oct 28, 2020

Notes:

  • will likely require a small fixup in power.c and possibly some Kconfig files once drivers: ieee802154: cc13xx_cc26xx: adopt hal/ti rf driverlib #26316 is merged.
  • will need to undo edits to some of the sample applications as well, that I had originally hard-coded to demonstrate SubGHz support
  • Also note, this is 802.15.4g and does not provide the BPSK PHY - just the SUN 2-FSK PHY.

@cfriedt
Copy link
Member Author

cfriedt commented Oct 28, 2020

Furthermore, it requires zephyrproject-rtos/hal_ti#22 in order to pull in the multi-protocol RF backend.

Will likely also require some whitespace corrections

jukkar
jukkar previously requested changes Oct 28, 2020
drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c Outdated Show resolved Hide resolved
drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c Outdated Show resolved Hide resolved
drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c Outdated Show resolved Hide resolved
drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c Outdated Show resolved Hide resolved
drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.h Outdated Show resolved Hide resolved
include/net/ieee802154_radio.h Show resolved Hide resolved
samples/hello_world/prj.conf Outdated Show resolved Hide resolved
samples/net/sockets/echo_client/overlay-802154.conf Outdated Show resolved Hide resolved
@cfriedt
Copy link
Member Author

cfriedt commented Oct 28, 2020

Until #29750 is resolved, SubGHz and 2.4 GHz cannot be used simultaneously, so to test this, please use the following:

server:

west build \
    -p always \
    -b cc1352r1_launchxl \
    samples/net/sockets/echo_server \
    -- \
    -DOVERLAY_CONFIG=overlay-802154-subg.conf \
    -DCONFIG_NET_CONFIG_IEEE802154_DEV_NAME="\"IEEE802154_1\"" \
    -DCONFIG_IEEE802154_CC13XX_CC26XX=n \
    -DCONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ=y

client:

west build \
    -p always \
    -b cc1352r1_launchxl \
    samples/net/sockets/echo_client \
    -- \
    -DOVERLAY_CONFIG=overlay-802154-subg.conf \
    -DCONFIG_NET_CONFIG_IEEE802154_DEV_NAME="\"IEEE802154_1\"" \
    -DCONFIG_IEEE802154_CC13XX_CC26XX=n \
    -DCONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ=y

@cfriedt cfriedt requested a review from jukkar October 28, 2020 19:25
@cfriedt
Copy link
Member Author

cfriedt commented Oct 28, 2020

So odd that checkpatch.pl doesn't catch some long lines. I don't understand... was the 80-character limit silently extended?

vanti
vanti previously requested changes Oct 30, 2020
drivers/ieee802154/Kconfig.cc13xx_cc26xx Outdated Show resolved Hide resolved
drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c Outdated Show resolved Hide resolved
drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@tbursztyka tbursztyka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small changes requested

drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c Outdated Show resolved Hide resolved
include/net/ieee802154_radio.h Show resolved Hide resolved
@cfriedt cfriedt requested a review from vanti November 2, 2020 20:03
@cfriedt cfriedt dismissed stale reviews from vanti and jukkar November 3, 2020 13:48

changes implemented

@cfriedt
Copy link
Member Author

cfriedt commented Nov 3, 2020

@vanti - I've defaulted IEEE802154_CC13XX_CC26XX_SUB_GHZ to `n' for 2 reasons:

  1. It will simplify integration / regression checks with simplelink: rf: use multi-protocol patch hal_ti#22 (required for SubGHz to run) and
  2. There is still an issue with multiple concurrent IPv6 / IPv4 network interfaces (described in net: config: handle autoconfiguration of multiple interfaces #29750)

For the second item, we're seeing things like the following:

*** Booting Zephyr OS build zephyr-v2.4.0-1206-g98490c598ed7  ***
[00:00:00.001,983] <wrn> net_if: You have 1 IPv6 net_if addresses but 2 network interfaces
[00:00:00.002,014] <wrn> net_if: Consider increasing CONFIG_NET_IF_MAX_IPV6_COUNT value.
[00:00:00.010,650] <err> net_config: Cannot setup IEEE 802.15.4 interface (-22)
[00:00:00.010,650] <inf> net_config: Initializing network
[00:00:00.010,650] <inf> net_config: Waiting interface 1 (0x20001438) to be up...

Tried increasing CONFIG_NET_IF_MAX_IPV6_COUNT, but there is still no way to configure more than 1 IPv6 network interface. See #29750 for details.

@cfriedt
Copy link
Member Author

cfriedt commented Nov 4, 2020

Looks like the fix for this is in zephyrproject-rtos/hal_nxp#66 and #29797

Is there anything I can do to sidestep that at the moment, or am I blocked until that fix is merged into hal/nxp & zephyr?

@MaureenHelm
Copy link
Member

Is there anything I can do to sidestep that at the moment, or am I blocked until that fix is merged into hal/nxp & zephyr?

It's been merged now, can you rebase?

@cfriedt
Copy link
Member Author

cfriedt commented Nov 7, 2020

Looks like someone has already filed an issue for this at #29853

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 <[email protected]>
@jukkar jukkar merged commit ec0e737 into zephyrproject-rtos:master Nov 9, 2020
@cfriedt cfriedt deleted the issue/26315/ieee802154-cc13xx-cc26xx-sub-ghz-support branch November 11, 2020 01:08
@akshaymishra
Copy link

Hello, does this support mean one can use zephyr 6lowpan with CC1310?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ieee802154: cc13xx_cc26xx: sub_ghz support
6 participants