what is Super loop in Embedded systems?
nostalgia ain't what it used to be...
Oh no - now we're into reminiscence mode!
Trouble is, nostalgia ain't what it used to be...
decades decades! wow
Now that I have semi-retired to be a microcontroller consultant, I can reveal that my first microcontroller project was somewhere around 1970. Of course, in those days, the microcontroller was called a PDP-8 and weighed about 50 pounds. 2k of memory was standard, 4k was sheer luxury. My first '51 project was in the early days of its existence, I still remember burning my fingers on the original (non-C) chip.
Erik
Alternative version:
I love work - I could stand and watch it all day!
for several decades I have used the name "workloop" here, they call it (probably due to historical reasons!) "main loop".
decades decades! wow.
But what about cases where the loop just sits there twiddling its thumbs most of the time? I would assume that most superloops only do "work" in small fraction of their iterations. ;)
StormP once said: "there is nothing like work, I can watch it for hours without getting tired". Also accredited to Will Rogers, I do not know who was the orignal author.
anyhow, is it not work to check a state machine, even if the result is 'idle'
You know, as in
/* One Loop to rule them all, One Loop to find them, One Loop to bring them all and in the darkness bind them */ for(;;) { ... }
for several decades I have used the name "workloop"
Actually, and old Sinclair Spectrum would be enough to reject that code, since you forgot to supply your superloop with a closing brace ;)
which is the super loop here...?
The outermost one, but you'd need a supercomputer to actually finish one iteration of it. Everybody knows that supercomputer can iterate through an endless loop in less than 20 minutes. :)
for (;;) { for(;;) { for (;;) { } }
No, I do not think it is short for supervisor loop.
"Super" is very likely used in the same sense as for superclass/subclass in object-oriented programming.
In this case, it represents the outhermost loop in the program and will call functions that contains small loops that may eat all pending characters from receive buffers etc. The main loop is the superloop and the other loops are subloops.
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).
So, maybe "super loop" is just a shortening of "supervisor loop"...?
View all questions in Keil forum