uracoli-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [uracoli-devel] Sleeping


From: Daniel Thiele
Subject: Re: [uracoli-devel] Sleeping
Date: Wed, 16 May 2012 18:21:04 +0200

Hi Keith,

 

the solution could be the order of instructions. 4mA sounds like radio is sleeping, but MCU not.

Acc. to datasheet, sleep_enable() has to be set “just before” the sleep_cpu() instruction:

 

Bit 0 – SE - Sleep Enable

The SE bit must be written to logic one to make the MCU enter the sleep mode when

the SLEEP instruction is executed. To avoid the MCU entering the sleep mode unless it

is the programmers purpose, it is recommended to write the Sleep Enable (SE) bit to

one just before the execution of the SLEEP instruction and to clear it immediately after

waking up.

 

Probably, putting radio_set_state() in between these (as in your code) is too long.

Maybe this works:

 

radio_set_state(STATE_SLEEP);

set_sleep_mode(SLEEP_MODE_PWR_DOWN); /* only has to be set once in application */

cli();

sleep_enable();

sei();

sleep_cpu();

sleep_disable();

 

 

Best

Daniel

 

Von: address@hidden [mailto:address@hidden Im Auftrag von Vasilakes, Keith
Gesendet: Mittwoch, 16. Mai 2012 17:32
An: address@hidden
Betreff: [uracoli-devel] Sleeping

 

Okay…UART issue solved.

 

Next hurdle…

 

I see code for low power, looks like it puts the radio into sleep mode?

 

My initial attempt didn’t seem too fruitful.

I see the radio drawing about 5-6 ma, and if I try to put it o sleep I gt it down to 4…WAY too high!

 

I was trying variations of this;

 

set_sleep_mode(SLEEP_MODE_PWR_DOWN);

cli();

sleep_enable();

sei();

radio_set_state(STATE_SLEEP);

sleep_cpu();

sleep_disable();

 

 

there is a timer running off the 32k clock to wake it up…

 

 

Thanks Again!

 

Keith Vasilakes

Firmware Engineer

 

Spectrum Design Solutions

110 North 5th Street, Floor 3

Minneapolis, MN 55403

 

Direct: +1.612.524.7134

Main: +1.612.435.0789

Email: address@hidden

 

www.spectrumdsi.com

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]