Re:Exploring the software that flies SpaceX rockets and star...
by HeyLaughingBoy on Tuesday May 11, 2021 @01:48PM
(#27121144)
That pretty well describes the board in front of me ATM. Most of the system runs on a 20ms (I think) tick to manage the sensor read/evaluate/control loops, but there's a 10kHz timer interrupt always going that handles commutation of a stepper motor if it needs to run. 99.9% of the time, the interrupt fires, sees there's nothing to do and just returns.
Re:Exploring the software that flies SpaceX rockets and star...
by froh on Tuesday May 11, 2021 @10:20AM
(#27118407)
for battery electric use cases it saves energy: you do just the necessary computations and you sleep the CPU until the next cycle. if little has changed you can sleep a lot. if a lot of rumpus is happening, you use the full cycle.
Also, there sometimes ARE interrupts meshed in with these main loop based systems (for whatever reason). They just aren't predominant. If your willing to through more hardware at things, you can typically always transform anything into a buffer.