Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
kvasilak
PostPosted: May 11, 2012 - 02:54 PM
Newbie


Joined: Jan 15, 2011
Posts: 19


Using uracoli on a bitbean type of device.
I need to put the radio to sleep inbetween transmissions.

the current implementation uses an array of timers that are always running. I need to create one with a callback that wakes up the processor, enables the radio, transmits, then goes back to sleep.

If I just disable the internal timer code and use my own, will I cause any unintended side effects?

Thanks
Keith
 
 View user's profile Send private message  
Reply with quote Back to top
uracolix
PostPosted: May 14, 2012 - 08:35 AM
Hangaround


Joined: Jun 17, 2008
Posts: 456
Location: Meissen, Germany

>If I just disable the internal timer code and use my own, >will I cause any unintended side effects?

No definitely not, the functions of libioutil of uracoli have no influence on the radio functions (they are simply
not used). If there is a small wait needed, it is realized with _delay_*() of avr-libc.

The libioutil*.a is combined from several source files, so it is enough, not to call timer_init() to get rid of all the timer code including the timer ISR while you may still
want to use hif_put/get, LED_SET/GET, ... and other convinience stuff.

After a compile run you can simply check with avr-nm what is
contained in the compiled *elf file.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
kvasilak
PostPosted: May 14, 2012 - 08:53 PM
Newbie


Joined: Jan 15, 2011
Posts: 19


Wonderful, I'm using most of your timer so I'll probably leave it in and add functionality to it like disable...
 
 View user's profile Send private message  
Reply with quote Back to top
uracolix
PostPosted: May 15, 2012 - 08:58 AM
Hangaround


Joined: Jun 17, 2008
Posts: 456
Location: Meissen, Germany

There is also a low level macro interface to control the
one hardware timer occupied by uracoli. Currently it is just represented by the macro "TIMER_INIT()" and "ISR(TIMER_IRQ_vect)".

If you tell your requirements for controling the hardware timer, then we can extend/enhance the macro interface.
Some praxis inspired additional macros may help other
users too. Feel free to discuss this on the developpers
mailing list uracoli-devel[at]nongnu.org.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
kvasilak
PostPosted: May 15, 2012 - 06:39 PM
Newbie


Joined: Jan 15, 2011
Posts: 19


well simply I need to put the device to sleep for a variable period of time, 30 to 90 seconds.
My plan is to use a timer running off the 32k clock, put the radio into sleep mode, stop the system timer, put the processor into sleep mode.
30 seconds later I get woken up, start the radio, send a message and repeat the process.
 
 View user's profile Send private message  
Reply with quote Back to top
dl8dtl
PostPosted: May 16, 2012 - 09:14 AM
Raving lunatic


Joined: Dec 20, 2002
Posts: 7279
Location: Dresden, Germany

> put the radio into sleep mode, stop the system timer, put the
> processor into sleep mode.

No need to handle the system timer separately. As soon as you stop the
IO clock (by putting the device into PWR_SAVE sleep), the timer will
stop anyway.

_________________
Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.
Please read the `General information...' article before.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits