Skip to Content
Hands-On RTOS with Microcontrollers
book

Hands-On RTOS with Microcontrollers

by Brian Amos
May 2020
Intermediate to advanced
496 pages
13h 54m
English
Packt Publishing
Content preview from Hands-On RTOS with Microcontrollers

Interrupts and super loops

One way of achieving minimal instructions and responsibility in the ISR is to do the smallest amount of work possible inside the ISR and then set a flag that is checked by code running in the super loop. This way, the interrupt can be serviced as soon as possible, without the entire system being dedicated to waiting on the event. In the following diagram, notice how the interrupt is being generated multiple times before finally being dealt with by func3

Depending on what exactly that interrupt is trying to achieve, it will typically take a value from the associated peripheral and push it into an array (or take a value from an array and feed it to the peripheral registers). In the case of our external ADC, the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RTOS with Microcontrollers - Second Edition

Hands-On RTOS with Microcontrollers - Second Edition

Jim Yuill, Penn Linder

Publisher Resources

ISBN: 9781838826734Supplemental Content