2008-05-22 12:31:20 Power Managment - Active Mode
Nick Moszer (UNITED STATES)
Message: 56155
Hello,
Has any work been put into implementing the "active" power managment mode for the blackfin? Deep Sleep and Sleep seem to work great.
Also, has anyone setup wakeup from deep sleep via a RTC interrupt?
I didn't see anything posted for either after a search.
Thanks!
QuoteReplyEditDelete
2008-05-22 14:11:57 Re: Power Managment - Active Mode
Mike Frysinger (UNITED STATES)
Message: 56156
waking up from RTC works today and has worked for quite a while now ... it works on the Blackfin the same way it works everywhere else
simply enable the rtc as a wake up source, set the rtc alram timer, and then put the system into sleep ... or just use the rtcwake busybox applet
QuoteReplyEditDelete
2008-05-22 20:16:36 Re: Power Managment - Active Mode
Mike Frysinger (UNITED STATES)
Message: 56160
i just wrote this document ... hopefully you find it useful:
http://docs.blackfin.uclinux.org/doku.php?id=rtc
QuoteReplyEditDelete
2008-05-23 11:00:18 Re: Power Managment - Active Mode
Nick Moszer (UNITED STATES)
Message: 56217
Thanks.
Adding rtcwake to busybox and running it with:
rtcwake -d /dev/rtc0 -s (time) -m 'standby'
works great.
As to my other question, this might be helpful for other folks.
A colleage and I are working on cpu and voltage scaling for the blackfin. He's got a working driver now that will scale to three dividers (1, 2 and 4) and voltage scaling that I believe can go to any possible setting valid to those frequencies.
The reason I asked about Active Mode is we want to expand the driver so we can chanage SCLK as well. This should enable the driver to take the cpu down to 12Mhz , 6Mhz, 3Mhz and so on. As we are changing SCLK the DDR ram will need to be reconfigured.
The approach I'm taking with this is to:
1. Somehow temporarily suspend all dma transfers (looking into this)
2. Put the DDR in self refresh (already in dpmc.S)
3. Update PPL_DIV and PLL_CTL
4. Take DDR out of self refresh
5. Somehow resume all dma transfers
With 2 through 4 being run in L1 memory. Does this seem like it will work?
QuoteReplyEditDelete
2008-05-23 13:46:49 Re: Power Managment - Active Mode
Robin Getz (UNITED STATES)
Message: 56220
Nick:
Michael already has alot of this in trunk. (but is out until next week, so he will have to answer then).
Changing SCLK is difficult now, since it is what drives everything else...
Imagine trying to put yourself in a lower power mode (and slowing down SCLK), and trying to wake from an external event, like a UART character. When changing SCLK, you just corrupted the incoming character.
If you are playing audio when you want to modify SCLK - it also makes it pretty difficult/impossible (without turning things off, changing SCLK, and then turning things back on). - so it also requires changes to **every** driver in the system.
This is why we have not put this in trunk yet.
-Robin
QuoteReplyEditDelete
2008-05-23 15:45:52 Re: Power Managment - Active Mode
Mike Frysinger (UNITED STATES)
Message: 56226
if you search the forum, someone else was looking at this ... and as Robin indicated, the CCLK variation should already be in trunk and quite usable
for SCLK changing, you'll need a (0): create a notifier list and have all devices that are based on SCLK subscribe to the notifier list and you'll need a (6): notify everyone on the notifier list to update their MMRs
but this is problematic for active devices as Robin indicated, and there is literally no way to account for it in software ... the guy designing the system has to be aware of it and account someway ... for the UART, you could require CTS/RTS on the UART to hold off any incoming bytes ...