[En-Nut-Discussion] AVR Idle Sleep Mode

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Tue Sep 25 11:32:06 CEST 2012


>>>>> "Michael" == Michael Jones <Michael.e.Jones at web.de> writes:

<proposal to make SLEEP_MODE_IDLE for AVR>


    Michael> I must strongly object, sleep mode, depending on the CPU, 

I was talking about AVR, not "some CPU".

    Michael> has
    Michael> an impact on various performance issues both for execution and
    Michael> periphery.  

Please explain the impact of SLEEP_MODE_IDLE on AVR. In my understanding,
this will lower timing jitter after the wake-up event, as we always restart
execution after the line
            __asm__ __volatile__ ("sleep" "\n\t" :: );
and otherwise we restart anywhere in the sequence
    for (;;) {
        NutThreadYield();
        NutThreadDestroy();
       if (idle_sleep_mode != SLEEP_MODE_NONE) {
       }
    }

    Michael> It must remain a conscious decision of the
    Michael> individual developer if this is wanted.

The "conscious decision" can always be done by the developper at the start of
main() with a call to  NutThreadSetSleepMode(uint8_t mode). This would
document that the user setup needs some special setting and not hide it in
some system code.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the En-Nut-Discussion mailing list