dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Power saving and ATA
From: Linus Nielsen Feltzing (
Date: 2003-04-11

I reviewed the CPU SLEEP implementation and came across this code in ata.c:

     while (TIME_BEFORE(current_tick, timeout) &&
            !(ATA_ALT_STATUS & STATUS_RDY))

I wonder if this is good behaviour. If the hard disk is just a little
slow and the status isn't set yet, the thread goes to sleep and won't
wake up until the next tick interrupt (or the DMA or MP3 tick
interrupt). This means that the ATA driver waits several milliseconds
too long for every status poll, worst case is 10ms. The Player models
are better off, since the MP3 tick interval is only 2ms.

I think we should favour ATA performance in this case, rather than
saving a few microamps from the CPU. Unnecessary sleep with the HD
running seems like a bad idea anyway.


Page was last modified "Jan 10 2012" The Rockbox Crew