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

Documentation #15

Open
Dirbaio opened this issue Sep 13, 2020 · 1 comment
Open

Documentation #15

Dirbaio opened this issue Sep 13, 2020 · 1 comment

Comments

@Dirbaio
Copy link
Member

Dirbaio commented Sep 13, 2020

yep, that 👆

@Dirbaio
Copy link
Member Author

Dirbaio commented Sep 13, 2020

Safety notes:

  • The SoftDevice needs exclusive access to some peripherals (RADIO, some TIMERs, SWI/EGUs, ECB, AAR..), you have to make sure not to use them on your own. Softdevice::enable() takes the PAC register blocks for these so safe code is unable to use them anymore (to be done, Make Softdevice::enable fully safe by taking ownership of the forbidden peripherals #4 ), but this still means you have to make sure to not use unsafe code to somehow still use these peripherals (such as Peripherals::take(), raw pointers, or calling into C code that uses them).
  • The SoftDevice needs exclusive access to some IRQs and priority levels. You must make sure not to use them. This includes NOT using cortex-m NVIC functions!! Using these is UNSAFE even if they're marked as safe. There is a proposal to split cortex-m so that the "opinionated concurrency model" functions would be opt-in (Proposal for separating cortex-m into smaller parts rust-embedded/cortex-m#239)
  • PPI? Investigate PPI safety #14

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

No branches or pull requests

1 participant