AW: [En-Nut-Discussion] sleeping in idle thread

Ralph Mason ralph.mason at telogis.com
Mon Jul 12 02:12:29 CEST 2004


Oliver Schulz wrote:

>Hi
>
>  
>
>>everybody fine with this ?
>>    
>>
>Yea. Go ahead.
>
>Cheers,
>Oliver.
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>
>  
>
Hi have been using

   for (;;) {
               
        NutThreadYield();
        NutFreeKilledThread();
        ResetWD(WD_IDLE);
       
        //AVR Sleep code - nothing to do but save power!
        sbi( MCUCR,5) ; asm volatile("sleep" ::);
    }

For a year now with no ill effects.

Ralph






More information about the En-Nut-Discussion mailing list