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

feat: add basic support for nRF51 chips to embassy-nrf #2469

Merged
merged 27 commits into from
Jan 31, 2024

Conversation

lulf
Copy link
Member

@lulf lulf commented Jan 20, 2024

TODO:

  • HIL test
  • Docs update
  • More peripherals (can be added on demand later I would say)

@Dirbaio would you be able to hook your nrf51-dk into the HIL setup? My own dk is fried, but I verified code is running on my microbit v1.

@Dirbaio
Copy link
Member

Dirbaio commented Jan 21, 2024

I think we could (should?) avoid adding the dependency on portable-atomic,

  • RNG could use a Mutex<RefCell<State>> (and change the AtomicWaker to a WakerRegistration). It'd be faster because if you modify multiple fields it'll acquire a single CS, not one for each field.
  • The time driver already does a CS for next_period so we can do "read, modify, write" manually which needs no CAS. stm32 already does this.

@Dirbaio
Copy link
Member

Dirbaio commented Jan 22, 2024

added nrf51-dk to HIL rig. Wire connected between P0.13 and P0.14 for GPIO etc testing.

@lulf
Copy link
Member Author

lulf commented Jan 23, 2024

@Dirbaio Thanks! I'll add a HIL test as well as addressing the comments soon!

@lulf lulf force-pushed the nrf51-basic-support branch from 5ed263b to db0f4a0 Compare January 24, 2024 20:23
@lulf
Copy link
Member Author

lulf commented Jan 25, 2024

bender run

@lulf lulf force-pushed the nrf51-basic-support branch from d06d6c2 to 17098a7 Compare January 26, 2024 07:57
@lulf lulf force-pushed the nrf51-basic-support branch from 17098a7 to ee90ee1 Compare January 26, 2024 07:58
@lulf
Copy link
Member Author

lulf commented Jan 26, 2024

@Dirbaio Two issues remaining:

  • Running from RAM doesn't work, it looks related to the size and the available RAM because a simple test that doesn't do gpio or timer runs fine from RAM.
  • I've set it to run from flash, which works locally, but fails with ERROR - Run failed: Flash content verification failed. I'm not entirely sure why this is only happening on CI.

@Dirbaio
Copy link
Member

Dirbaio commented Jan 31, 2024

Running from RAM doesn't work, it looks related to the size and the available RAM because a simple test that doesn't do gpio or timer runs fine from RAM.

that's fine. we already have some stm32's that do HIL from flash because not enough RAM too...

I've set it to run from flash, which works locally, but fails with ERROR - Run failed: Flash content verification failed. I'm not entirely sure why this is only happening on CI.

Fixed in probe-rs/probe-rs#2119

bender run

@Dirbaio
Copy link
Member

Dirbaio commented Jan 31, 2024

duh of course it doesn't work if I don't put back the nrf51-dk in the HL rig.

bender run

Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

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

thank you! 🥳

@Dirbaio Dirbaio added this pull request to the merge queue Jan 31, 2024
Merged via the queue into main with commit 68be63c Jan 31, 2024
6 checks passed
@Dirbaio Dirbaio deleted the nrf51-basic-support branch January 31, 2024 00:25
@Dirbaio Dirbaio mentioned this pull request Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants