That would help when tickless mode is used. But what about tickful mode? I
guess the intent of 7312a553b was to avoid wasting processor cycles on busy
waiting, but if tickless isn't being used, perhaps busy waiting is
necessary here? It could choose between the two wait types at compile time
based on tickless mode.
In "tickful" mode, you could increase the timer frequency to improve resolution.  At 1000 Hz things run pretty well too.  But at some point, however, the interrupt processing overhead becomes prohibitive.
Or a bigger question: if tickless mode is "better" (longer battery life,
fewer unnecessary interrupts, more processor cycles for real work) why
aren't we always using tickless mode? Are there limitations/bugs that make
it unsuitable in some situations? Not universally supported on all
microprocessors? Other reasons?

It does rely on an available high resolution timer and, so, uses resources that not all MCUs may have.  It would also take a substantial effort to convert all existing architectures to support tickless.

But the real reason is that tickless mode was experimental and not supported on all platforms on initial release and also not well trusted.  But I think it is well trusted these days and could be the standard.

I am not opposed to the idea at all.  I do like the "tickful" mode for MCU bringup because it is a lot simpler.  Tickless support can be added later when the port is stable.


Reply via email to