what is Super loop in Embedded systems?
Probably this: en.wikipedia.org/.../Event_loop
I prefer this link: en.wikibooks.org/.../Super_Loop_Architecture
I dislike the term "super loop" as it implies that there is something special about the loop - but there isn't.
It is just an endless loop, and the actions of the system all happen continually within the loop.
Usually, the loop continually checks for events, and takes appropriate action when an event is signalled. The events are detected by code outside the loop - such as interrupt handlers.
Taking the Wikibooks example,
Function Main_Function() { Initialization(); Do_Forever { // The arrival of serial data is recognised in an ISR if( serial data received ) { process serial data } // A keypress might be recognised in an ISR, // or on a timer interrupt, // or by polling, etc if( key pressed ) { respond to key press } // The above processing may have resulted in // something to be displayed if( something to display { update the display } } }
Note that this has nothing specifically to do with embedded systems.
Agreed with the dislike of the name - I have always preferred to refer to it as the supervisor loop since it better indicates that it is carrying out the highest level maintenance function(s).
So, maybe "super loop" is just a shortening of "supervisor loop"...?
It still needs to be understood that there is nothing special or magic (or "super") about the loop itself - it's just a loop.
It's a loop that is "above" ("super") everything else the program does (except one-time init at the beginning).
View all questions in Keil forum