bart-massey
Book Sprint 2024-10-26
Try
HackMD
bart-massey
·
Follow
Last edited by
Henk Oordt
on
Oct 26, 2024
Linked with GitHub
Contributed by
Edit
0
Comments
Feedback
Log in to edit or delete your comments and be notified of replies.
Sign up
Already have an account? Log in
There is no comment
Select some text and then click Comment, or simply add a comment to this page from below to start a discussion.
Discard
Send
Book Sprint
Content at
https://hackmd.io/@bart-massey/BkUFCK5xye
<- Edit here
https://github.com/rust-embedded/discovery-mb2
<- Repo
Chapter/chapters on Interrupts, DMA, PWM
Intro to interrupts
level?
events, tasks
https://docs.rust-embedded.org/book/
&raw mut*
TODO:
Outline
Split the work
Code the example(s)
Write the chapters
Authorship, style
(Future: RTIC, Embassy)
(Move to microbit-bsp?)
Outline
Interrupts
What's an interrupt <- @hdoordt
Reflect on the way things were done in prior chapters
What's it good for: power saving, interleaving computation, concurrently waiting on i/o,
…
What is an interrupt?
What does it do (code pause, jump to ISP, return to where it was)
Can pause in the middle of a single CPU instruction, which makes interrupts very much like threads: race conditions
ISR has no arguments so how does it get input? Segue into next section
enabling it at the peripheral, masking/unmasking in nvic, ensure you unpend the interrupt before return <- James
Example with defmt::exit (or panic or something) - for fast feedback <- Bart
Gluing this together with non-embedded concepts like sharing
across threads, etc.
HERE BE SHARING DRAGONS
WFE/WFI
Example using interrupt
…
gpio and timer peripherals
timer flashes LED
two buttons speed up/slow down the timer flash period
main loop wfi
Do this with an atomic so we don't need shared stuff again?
Under The Hood <- @adamgreig
ARM-specific stuff like NVIC, priorities, pre-emption
Vector table
Concurrency/resource sharing
Chip-specific stuff like PPI, EasyDMA
Interrupt macro
DMA and PWM
Book Sprint
Outline
Expand all
Back to top
Go to bottom
Book Sprint
Outline
Expand all
Back to top
Go to bottom
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up
Comment