Firmware · Program structure and state machines
The simplest firmware structure is one big loop, and a single slow step in it can make the whole device miss events.