EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPC901 Total Power Down Mode + Keypad Interrupt

Started by ow_tong_peow February 1, 2005
Now I'm really confused. You are running an RTC with the 32k xtal, fair
enough. But your earlier messages seem to imply that you turn off this
oscillator and then when you get a wakeup you start the oscillator back
up again. There doesn't seem to be any purpose for the 32k xtal if you
are turning it off at any time, you are losing all RTC function then.

Either you NEED the 32k xtal reference or you DON'T. If you do then
there is more to your application then you have stated. But either way
you have enough choices so far to make a decision.

*Peter*

ow_tong_peow wrote:

>Dear Peter,
>
> Yes, the IRC time is really short. I love it. My application
>also has a RTC timer for counter.
>
> Is this possible?
>
>1) Start Running on IRC.
>
>2) Start RTC using 32kHz watch crystal. Interrupt at 1s
>
>3) IRC go to Total Power down mode.
>
>4) On RTC or Keypad interrupt. Wakeup, use IRC for processing.
>
>5) Go to (3).
>
>Regards,
>Ow Tong Peow


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 1/31/05




Just wanted to confirm there is a WDT oscillator nominal 400 kHz, very
fast startup but wide tolerance (I think +/- 30 %). Use this with DIVM
and you should get very low power.

--- In lpc900_users@lpc9..., Peter Jakacki <peterjak@t...> wrote:
---snip---
> DIVM there to reduce the chip power if not the IRC power itself.
>
> I also believe that the watchdog oscillator can be used. It runs at
> 400KHz, have you considered this?
>
----snip--------




Sorry for the confusion.

I need doing this:

1) Power up, uP -> Power down mode.

2) On Keypad Interrupt (Low Level), Start RTC with 1 second interrupt.

3) Keep updating counter based on the RTC interrupt.

4) On Keypad Interrupt again (High Level),
Stop RTC.
Write counter to flash.

5) Go to Power down mode.

6) Go to Step (2).

So, now the question is:
I am supposed to be able to use IRC, with RTC using 32kHz as
reference. This is based on datasheet.

But if LPC901 goes into Power down mode, can the RTC interrupt
wakes up LPC? Tried and LPC sleeps forver.

Regards,
Ow Tong Peow

--- In lpc900_users@lpc9..., Peter Jakacki <peterjak@t...>
wrote:
> Now I'm really confused. You are running an RTC with the 32k xtal,
fair
> enough. But your earlier messages seem to imply that you turn off
this
> oscillator and then when you get a wakeup you start the oscillator
back
> up again. There doesn't seem to be any purpose for the 32k xtal if
you
> are turning it off at any time, you are losing all RTC function
then.
>
> Either you NEED the 32k xtal reference or you DON'T. If you do then
> there is more to your application then you have stated. But either
way
> you have enough choices so far to make a decision.
>
> *Peter*
>
> ow_tong_peow wrote:
>
> >Dear Peter,
> >
> > Yes, the IRC time is really short. I love it. My application
> >also has a RTC timer for counter.
> >
> > Is this possible?
> >
> >1) Start Running on IRC.
> >
> >2) Start RTC using 32kHz watch crystal. Interrupt at 1s
> >
> >3) IRC go to Total Power down mode.
> >
> >4) On RTC or Keypad interrupt. Wakeup, use IRC for processing.
> >
> >5) Go to (3).
> >
> >Regards,
> >Ow Tong Peow
> >
> > --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 1/31/05




Dear all,

Just found out something very interesting, which I could use as a
workaround.

Main Oscillator and RTC is using 32kHz watch clock

When LPC901 goes to Total Power down mode, and RTC is power down,
Keypad Interrupt takes up to 2 seconds. Current consumption 3uA.

When LPC901 goes to Total Power down mode, and RTC is interrupting
at 60s, Keypad Interrupt is < 10ms. Current consumption 14uA.

Why is this happening to me!

Regards,
Ow Tong Peow
--- In lpc900_users@lpc9..., "ow_tong_peow"
<ow_tong_peow@y...> wrote:
>
> Sorry for the confusion.
>
> I need doing this:
>
> 1) Power up, uP -> Power down mode.
>
> 2) On Keypad Interrupt (Low Level), Start RTC with 1 second
interrupt.
>
> 3) Keep updating counter based on the RTC interrupt.
>
> 4) On Keypad Interrupt again (High Level),
> Stop RTC.
> Write counter to flash.
>
> 5) Go to Power down mode.
>
> 6) Go to Step (2).
>
> So, now the question is:
> I am supposed to be able to use IRC, with RTC using 32kHz as
> reference. This is based on datasheet.
>
> But if LPC901 goes into Power down mode, can the RTC interrupt
> wakes up LPC? Tried and LPC sleeps forver.
>
> Regards,
> Ow Tong Peow
>
> --- In lpc900_users@lpc9..., Peter Jakacki <peterjak@t...>
> wrote:
> > Now I'm really confused. You are running an RTC with the 32k
xtal,
> fair
> > enough. But your earlier messages seem to imply that you turn off
> this
> > oscillator and then when you get a wakeup you start the
oscillator
> back
> > up again. There doesn't seem to be any purpose for the 32k xtal
if
> you
> > are turning it off at any time, you are losing all RTC function
> then.
> >
> > Either you NEED the 32k xtal reference or you DON'T. If you do
then
> > there is more to your application then you have stated. But
either
> way
> > you have enough choices so far to make a decision.
> >
> > *Peter*
> >
> > ow_tong_peow wrote:
> >
> > >Dear Peter,
> > >
> > > Yes, the IRC time is really short. I love it. My application
> > >also has a RTC timer for counter.
> > >
> > > Is this possible?
> > >
> > >1) Start Running on IRC.
> > >
> > >2) Start RTC using 32kHz watch crystal. Interrupt at 1s
> > >
> > >3) IRC go to Total Power down mode.
> > >
> > >4) On RTC or Keypad interrupt. Wakeup, use IRC for processing.
> > >
> > >5) Go to (3).
> > >
> > >Regards,
> > >Ow Tong Peow
> > >
> > >
> >
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 1/31/05



How about you startup on the IRC and calibrate the WDT against this,
then run on the WDT wth DIVM. I would not think that a 32k xtal can
really better this seeing that you are starting off with a much higher
freq calibrated RC oscillator. Considering the startup time for the 32k
xtal and that it is not really all that accurate anyway this surely must
be the option of choice.

The application sounds a little unusual and if you are only timing in 1
sec intervals then you really don't need all that much accuracy, just
low-power (i.e. WDT+DIVM).

Don't worry about using the RTC, it is really meant for conventional
"time-of-day" timekeeping. The inclusion of it in the 901 is causing you
to focus on it too much. Instead, the WDT timeout period can be adjusted
to suit. You can go to power-down, consume 50ua, and the WDT can reset
or wakeup the CPU. I have used this method with other micros to acheive
low-power operation with fast startup times.

my2cents
*Peter*

ow_tong_peow wrote:

>Sorry for the confusion.
>
>I need doing this:
>
>1) Power up, uP -> Power down mode.
>
>2) On Keypad Interrupt (Low Level), Start RTC with 1 second interrupt.
>
>3) Keep updating counter based on the RTC interrupt.
>
>4) On Keypad Interrupt again (High Level),
> Stop RTC.
> Write counter to flash.
>
>5) Go to Power down mode.
>
>6) Go to Step (2).
>
>So, now the question is:
> I am supposed to be able to use IRC, with RTC using 32kHz as
>reference. This is based on datasheet.
>
> But if LPC901 goes into Power down mode, can the RTC interrupt
>wakes up LPC? Tried and LPC sleeps forver.
>
>Regards,
>Ow Tong Peow


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 1/31/05



Memfault Beyond the Launch