Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: need RTC help!
From: Uwe Freese (mail_at_uwe-freese.de)
Date: 2003-01-08


Hello,

I started to modify my Recorder 20. The idea was to connect the RTC with
the ON switch with a simple circuit so that an RTC alarm switches on the
device.

Partial success: I opened my AJB, "disconnected" the /IRQ output of the
RTC from the CPU PA12 pin. I added a 10k pull-up resistor between Vbat
(+3,3V) and /IRQ0 of the RTC. I measure the voltage between these pins
to detect if the alarm goes off.

I wrote a set_alarm function which sets the alarm to 0:05:00 (every
hour). This function is called in every rtc_init:

- - - - - - - - -
rtc_write(0x0b, 0xc1); /* date 01 */
rtc_write(0x0c, 0x80); /* hour 0 */
rtc_write(0x0d, 0x05); /* minutes 5 */
rtc_write(0x0e, 0x00); /* seconds 0 */
rtc_write(0x0a, 0xa1); /* month 01, AFE and ABE on */
- - - - - - - - -

If I now set the clock to 0:04 and wait one minute, the alarm goes off
at 0:05 (/IRQ pin going to low). :)

My problem: When I turn off the device (either by pressing off or with
the auto shutoff-feature set to one minute), the alarm pin stays high
first, but doesn't go to low when the alarm time is reached.
I also make a set_alarm directly before power_off in the power down
function of powermgmt.c.

Question: Does anybody have an idea why the alarm doesn't work when the
device is off? Vcc has no power, of course, but the RTC is powered
through Vbat and should work properly.

RTC doc: http://rockbox.haxx.se/docs/rtc_tm41st84w.pdf

Thanks for any hint. If this mod works at the end, it would be a very
nice feature to use the AJB as "alarm clock" *without* the need to leave
the device on for this. So please help me here!

Bye, Uwe.



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