[Tinyos-help] Atmega1281 sleep and active time analysis
Janos Sallai
sallai at isis.vanderbilt.edu
Mon Jun 15 07:35:33 PDT 2009
It wakes up when an interrupt occurs. You need to put it in every
interrupt handler. They are scattered all around the code. You need to
look for AVR_ATOMIC_HANDLER and AVR_NONATOMIC_HANDLER in the sources.
Janos
On Sun, Jun 14, 2009 at 8:09 PM, 张荣雨<zhangrongyu at yahoo.cn> wrote:
> Thanks for you reply.
>
> On you advice ,I study the chapter 13 in the atmega1281 datasheet,and set
> the port values
> directly as it suggests.But the primary problem is I still don't know when
> the MCU wakes up and where can I turn on the Port A2 as you suggested.It
> seems that it can be do in the ISR on platform Tinyos1.x,but I can't find
> the ISR sorce code in Tinyos 2.x.
>
> Hope for more advice and thanks a lot for you help.
> --- 09年6月12日,周五, Janos Sallai <sallai.janos at gmail.com> 写道:
>
> 发件人: Janos Sallai <sallai.janos at gmail.com>
> 主题: Re: [Tinyos-help] Atmega1281 sleep and active time analysis
> 收件人: "张荣雨" <zhangrongyu at yahoo.cn>, "tinyos forum"
> <tinyos-help at millennium.berkeley.edu>
> 日期: 2009年6月12日,周五,下午11:17
>
> Since this is very time critical, I would set the port values
> directly. Port A2 is the red led, that's a good point to start with.
> See chapter 13 in the atmega1281 datasheet.
>
> Janos
>
> On Thu, Jun 11, 2009 at 7:56 PM, 张荣雨<zhangrongyu at yahoo.cn> wrote:
>> Hi all:
>>
>> Now I am analysing the atemga1281 sleep and active time on tinyos-2.x
>> platform,and I find a method in a paper using Oscilloscope: an output pin
>> was turned on in each ISR when the processor woke up from a sleep mode,the
>> TOSH_run_task() function turned off the output pin before executing the
>> AVR
>> sleep instructio. So I follow it to turn off the output pin in the
>> Scheduler.taskLoop() of tinyos2.x just before the McuSleep.sleep()
>> instruction. But I do not know where to turn on the output pin on
>> tinyos2.x
>> platform.
>>
>> Can anyone help me? Or other ways to analysis the mcu sleep and active
>> time?
>>
>> Thanks
>>
>>
>> ________________________________
>> 好玩贺卡等你发,邮箱贺卡全新上线!
>> _______________________________________________
>> Tinyos-help mailing list
>> Tinyos-help at millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
> ________________________________
> 好玩贺卡等你发,邮箱贺卡全新上线!
More information about the Tinyos-help
mailing list