[beaglebone] Wake on at a certain time...

Hi,

is it somehow possible to put the beaglebone into
such an deep idle mode, that it consumes "no"
('"' marks the difference between 0mA and the
value in real world) power but scans an RTC module
(like this one: http://www.watterott.com/de/Real-Time-Clock-Module-RTC
or http://www.ladyada.net/learn/breakoutplus/ds1307rtc.html)
for the current time and boots into eistence again,
when the time has come to do so?
Or vice versa: Is it possible, that such an RTC
module wakes the bone?

Sorry...beginners questions... :wink:

Thank you very much in advance for any help!
Best regards,
mcc

There's a RTC in the AM335x. You can set it to wake the TPS65217 PMIC at
an alarm condition, as long as you set the condition up before powering
down and keep LDO1 running. In order to power down, you cause an
ALARM_2 condition in the RTC module [1]. A normal ALARM should allow
waking.

[1]:https://groups.google.com/d/topic/beagleboard/K7DuusrJ6G4/discussion

The one issue I've seen, is that I'm not able to keep the TPS65217 in
the SLEEP state, PMIC_PWR_EN keeps going high once power is pulled from
the AM335x due to the pin reset/off states (or my error), which wakes the
TPS65217 after 1 second. I'm able to use the OFF state (which needs
both PMIC_PWR_EN to be high and some other stimulus to wake), but this
disables the LDO1 output of the TPS65217 and thus the RTC module in the
AM335x is no longer powered, which renders it useless (and it then can't
cause any alarm conditions). [2]

[2]:https://groups.google.com/d/topic/beagleboard/sSoLQCGjb8M/discussion

I may be doing something wrong with the way I put the TPS65217 into
SLEEP mode, so it may be an error between the keyboard and chair, on my
end, rather than something that can't be done.

I don't believe you can use an external RTC, on the I2C bus, say, and
get similar operation, unless you also have an external power switch
that can interact with the RTC. But, if this is possible, I'm
interested to learn more about it. This would be possible if you spun
your own AM335x board but I don't believe the proper pins are brought
out to the headers on the bone.

Does that help?

-Andrew

Andrew Bradford <andrew@bradfordembedded.com> [12-08-07 19:56]:

> is it somehow possible to put the beaglebone into
> such an deep idle mode, that it consumes "no"
> ('"' marks the difference between 0mA and the
> value in real world) power but scans an RTC module
> (like this one:
> http://www.watterott.com/de/Real-Time-Clock-Module-RTC or
> http://www.ladyada.net/learn/breakoutplus/ds1307rtc.html) for the
> current time and boots into eistence again,
> when the time has come to do so?
> Or vice versa: Is it possible, that such an RTC
> module wakes the bone?

There's a RTC in the AM335x. You can set it to wake the TPS65217 PMIC at
an alarm condition, as long as you set the condition up before powering
down and keep LDO1 running. In order to power down, you cause an
ALARM_2 condition in the RTC module [1]. A normal ALARM should allow
waking.

[1]:https://groups.google.com/d/topic/beagleboard/K7DuusrJ6G4/discussion

The one issue I've seen, is that I'm not able to keep the TPS65217 in
the SLEEP state, PMIC_PWR_EN keeps going high once power is pulled from
the AM335x due to the pin reset/off states (or my error), which wakes the
TPS65217 after 1 second. I'm able to use the OFF state (which needs
both PMIC_PWR_EN to be high and some other stimulus to wake), but this
disables the LDO1 output of the TPS65217 and thus the RTC module in the
AM335x is no longer powered, which renders it useless (and it then can't
cause any alarm conditions). [2]

[2]:https://groups.google.com/d/topic/beagleboard/sSoLQCGjb8M/discussion

I may be doing something wrong with the way I put the TPS65217 into
SLEEP mode, so it may be an error between the keyboard and chair, on my
end, rather than something that can't be done.

I don't believe you can use an external RTC, on the I2C bus, say, and
get similar operation, unless you also have an external power switch
that can interact with the RTC. But, if this is possible, I'm
interested to learn more about it. This would be possible if you spun
your own AM335x board but I don't believe the proper pins are brought
out to the headers on the bone.

Does that help?

-Andrew

-- To join: http://beagleboard.org/discuss
To unsubscribe from this group, send email to:
beagleboard+unsubscribe@googlegroups.com
Frequently asked questions: http://beagleboard.org/faq

Hi Andrew,

thank you very much for help and explanations!!!!! :)))

I am still "boneless" (awaiting devilery of the bone next week) so
currently I have no chance to experiment with this.

You wrote, that the bone wakes up after a second or so automagically
(read: "accidentally").

This is *not* what you want, but it is better as constantly feeding
power into the bone:

Add an RTC module such as one of those that I linked. Put the bone to
sleep after adding a program snippet, which is called on wake up,
which does nothing more than asking the RTC module for the currently
valid time via I2C. If the wanted time has come, stay in the current
reality and do your job, if not -- warp back into sleep mode.

This gives you an exactness of 1 minute, which isn't pretty good.

If it is possible to increase the wake-up->go-to-bed cycling frequency
you will get a better resolution and you batteries are emptied earlier,
which give you the opportunity of an extended test of your charger :wink:

This is a very bad idea based on "busy waiting". But at least, it is
an idea... :wink:

Hopefully the real problem can be fixed between chair and keyboard
(*NO CRITISM*), because otherwise it would be a hardware problem,
which cannot be fixed easily.

Best regards,
mcc

You wrote, that the bone wakes up after a second or so automagically
(read: "accidentally").

Correct. Not desired.

This is *not* what you want, but it is better as constantly feeding
power into the bone:

Add an RTC module such as one of those that I linked. Put the bone to
sleep after adding a program snippet, which is called on wake up,
which does nothing more than asking the RTC module for the currently
valid time via I2C. If the wanted time has come, stay in the current
reality and do your job, if not -- warp back into sleep mode.

This gives you an exactness of 1 minute, which isn't pretty good.

If it is possible to increase the wake-up->go-to-bed cycling
frequency you will get a better resolution and you batteries are
emptied earlier, which give you the opportunity of an extended test
of your charger :wink:

This is a very bad idea based on "busy waiting". But at least, it is
an idea... :wink:

This will kill my battery. I need months of SLEEP / OFF mode from a 3Wh
battery. Running just the AM335x RTC off LDO1 should get me that. Your
way won't. Although, I don't need the feature you're solving, so it's
somewhat moot :slight_smile:

Hopefully the real problem can be fixed between chair and keyboard
(*NO CRITISM*), because otherwise it would be a hardware problem,
which cannot be fixed easily.

I think it will be. Debugging now. Will post update later (tomorrow?).

-Andrew

I updated my other thread [1]. No dice. The XAM335x parts have an
errata for the RTC anyway, so an external one is needed.

[1]:https://groups.google.com/d/topic/beagleboard/sSoLQCGjb8M/discussion

Basically, mcc's idea is really the best that can be had if you need to
wake up at a certain time and can't afford an external micro.

-Andrew