8000 Add 802154 support to the nrf52833 and microbit v2 by alevy · Pull Request #4225 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add 802154 support to the nrf52833 and microbit v2 #4225

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 2 commits into from
Nov 7, 2024

Conversation

alevy
Copy link
Member
@alevy alevy commented Nov 7, 2024

Pull Request Overview

This pull request ports the ieee802154 from the nrf52840 to the nrf52833 by sharing the implementation through the nrf52 crate and integrating into the the nrf52833 crate. It also adds support in the microbit_v2 board.

Testing Strategy

This pull request was tested by running both the openthread_udp_rx (which is actually slightly too big, but works) and tests/ieee802154/radio_tx_raw examples/tests from libtock-c. I didn't test with another board, so didn't confirm that packets are actually being sent/received over the air, but the apps otherwise work.

TODO or Help Wanted

  • It would be nice to test with on a real network or another device

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

alevy added 2 commits November 6, 2024 21:33
Adds the NRF's ieee802154 driver to the nrf52833 chip and moves the
implmenetation to the common nrf52 crate.
Adds support for the ieee802154 raw driver to the microbit_v2 board.
@github-actions github-actions bot added the nrf Change pertains to the nRF5x family of MCUs. label Nov 7, 2024
@tyler-potyondy
Copy link
Contributor

It would be nice to test with on a real network or another device

@alevy do you have access to an nrf52840dk?

@lschuermann
Copy link
Member

@alevy do you have access to an nrf52840dk?

https://book.treadmill.ci/treadmillci-deployment/sites/pton-srv0.html 😆

@alevy
Copy link
Member Author
alevy commented Nov 7, 2024

I have access to an nrf52840dk, and will test this morning. @lschuermann unfortunately an nrfdk in Princeton can't receive packets from the microbit on my desk

@alevy
Copy link
Member Author
alevy commented Nov 7, 2024

Tested now alongside the nrf52840dk-thread-tutorial board, running radio_tx_raw on one radio_rx on the other. Works as expected!

@alevy
Copy link
Member Author
alevy commented Nov 7, 2024

@tyler-potyondy noticed that actually the nrf52840dk board doesn't currently work with these apps. I'm guessing it works with the UDP driver, but haven't tested. I think deferring to a different discussion and PR for what to do with that exactly.

@alevy alevy added this pull request to the merge queue Nov 7, 2024
Merged via the queue into tock:master with commit 8836ded Nov 7, 2024
12 checks passed
@alevy alevy deleted the nrf/802154 branch November 7, 2024 23:32
@tyler-potyondy
Copy link
Contributor

@alevy when debugging the issues with 15.4, I was looking through the history and it seems moving this file deleted all associated history of commits from August 2023 to now (see below). Is this something we can recover since it would be nice to see for the future?

History in the original file location looks like:
git log chips/nrf52840/src/

commit 86a275a2d3244ccac651dd4c9324b5952837ef07
Author: Amit Aryeh Levy <amit@amitlevy.com>
Date:   Wed Nov 6 15:54:42 2024 -0800

    nrf52: move ieee802154 driver to common crate
    
    Adds the NRF's ieee802154 driver to the nrf52833 chip and moves the
    implmenetation to the common nrf52 crate.

commit 352e43b9fb7b45998f320e09808895d506aff1f7 (tp/dev/15.4-ack)
Author: Tyler Potyondy <77175673+tyler-potyondy@users.noreply.github.com>
Date:   Wed Jun 26 16:41:29 2024 -0700

    15.4 ACK Buffer Length: Comment updates
    
    Co-authored-by: Brad Campbell <bradjc5@gmail.com>

commit f4f367042be5190a8fada191d29e7be43f40a729 (dev/15.4-ack)
Author: Tyler Potyondy <potyondyt@gmail.com>
Date:   Wed Jun 26 10:34:53 2024 -0700

    Fix ACK buf Size
    
    The current ACK buf size for the nrf52840 15.4 radio is 6
    bytes. The 15.4 spec requires ACK frames to be 5 bytes (from
    perspective of MAC layer). The PHY layer adds a 1 byte frame length
    field (encapsulated in PSDU offset) -- total is 7 bytes.

commit 9479df27f5d290e26c49ab63d3d09fadc10684bf
Author: Brad Campbell <bradjc5@gmail.com>
Date:   Thu May 23 16:54:41 2024 -0400

    nrf52840: ieee802154: clarify buf len comment

commit 958a6a18f24c7b61e2087399d4a9c6439bb87889
Author: Brad Campbell <bradjc5@gmail.com>
Date:   Thu May 23 11:31:31 2024 -0400

    nrf52840: ieee802154: better error check on busy
    
    Co-authored-by: Tyler Potyondy <77175673+tyler-potyondy@users.noreply.github.com>

commit 37f20910ee5b7135d6dacfc72f2e442c8f64aedb
Author: Brad Campbell <bradjc5@gmail.com>
Date:   Fri May 17 18:09:03 2024 -0400

    nrf52840: 154: return error on tx if radio off
    
    This matches the HIL and the rf233

Now the history looks like:
git log chips/nrf52/src/ieee802154.rs

commit 86a275a2d3244ccac651dd4c9324b5952837ef07
Author: Amit Aryeh Levy <amit@amitlevy.com>
Date:   Wed Nov 6 15:54:42 2024 -0800

    nrf52: move ieee802154 driver to common crate
    
    Adds the NRF's ieee802154 driver to the nrf52833 chip and moves the
    implmenetation to the common nrf52 crate.

commit e4189c8c737db54c35acea7892f0f574aa7f8007
Author: Pat Pannuto <pat.pannuto@gmail.com>
Date:   Fri Aug 18 13:10:26 2023 -0700

    nrf5x: move 15.4 to 52840, 52832 doens't have
    
    This was born out of cleaning up the component for the ACK buffer,
    but grew into a slightly more substantial change :/
    
    At some point, we need to componentize the nrf52840 object creation,
    as that has a bunch of copy/paste right now, but it's only a few lines.

@lschuermann
Copy link
Member
lschuermann commented Nov 8, 2024

@tyler-potyondy try a git log --follow. Doesn't work always, but for when git detects a patch as to be a rename (the changes don't go beyond a certain threshold), it should track moves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nrf Change pertains to the nRF5x family of MCUs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0