| Author |
Message |
|
|
Posted: May 11, 2012 - 02:54 PM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: May 14, 2012 - 08:35 AM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: May 14, 2012 - 08:53 PM |
|

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... |
|
|
| |
|
|
|
|
|
Posted: May 15, 2012 - 08:58 AM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: May 15, 2012 - 06:39 PM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: May 16, 2012 - 09:14 AM |
|


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.
|
| |
|
|
|
|
|