I got confused between Compare and Counter... the code is fine like 
that, my mistake.

On 05/22/2012 10:31 AM, Ugo Colesanti wrote:
> I noticed something strange in Alarm62Khz32C:
>
> "components new AtmegaCompareP(T62khz, uint32_t, 0, SYM_ALARM_MINDT);"
>
> shouldn't it be: "components new AtmegaCompareP(T62khz, uint32_t,
> SYM_TIMER_MODE, SYM_ALARM_MINDT);" ?
>
> Otherwise it always use RTC as clock source. Is it right?
>
> Ugo
>
>
>
> On 05/21/2012 06:30 PM, Ugo Colesanti wrote:
>> Hi, I just made the port of TinyOS-2.1.2-rc1 for the Zigduino platform,
>> an arduino clone with atmega128rfa1 chip. The porting was pretty simple
>> since the atm128rfa1 is already supported. The only issue I had was
>> related to the missing RTC on the zigduino which is used by TimerMilli
>> and Alarm62khz components. I made everything work by applying the
>> following changes:
>>     - I re-wired AlarmMilli32C and CounterMilli32C to AlarmMicro32C and
>> CounterMicro32C respectively
>>     - I used AlarmMicro32C and LocalTimerMicroC in the RFA1DriverLayerC
>>     - I redefined TRadio as TMicro and set RADIO_ALARM_MICROSEC to 1 and
>> RADIO_ALARM_MILLI_EXP to 0 in RadioConfig.h
>>
>> With these changes I've been able to successfully run Blink,
>> RadioCountToLeds,tests/TestNetworkLPL and tutorial/Printf . However I
>> think there is a cleaner way to get the millitimer and 62khz timer to
>> properly work on zigduino. In particular I think there is a way to tell
>> tinyos to use the XTAL1 instead of OSC1 at least for Alarm62khz.  I
>> tried to set SYM_TIMER_MODE   to  ATMRFA1_CLKSC_XTAL in TimerConfig.h
>> but it has not worked. Probably I missed some steps but I get lost with
>> all those timers :S
>> Does somebody have any suggestion?
>>
>> Ugo
>>
>> p.s. I put my code on: http://code.google.com/p/zigduino-tinyos/
>>
>>
>>
>>
>


-- 
Ugo Maria Colesanti
Dipartimento di Informatica e Sistemistica
Sapienza Universita' di Roma
Via Ariosto 25, II floor, room B221
00185, Rome
http://wiserver.dis.uniroma1.it/cms/index.php?id=8
Phone:  +39 06 77274003
Fax:    +39 06 77274002

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to