[En-Nut-Discussion] ATmega 2561 - timer

Henrik Maier hmnews at proconx.com
Wed Mar 18 01:38:57 CET 2009


Hello Dusan,

I initially implemented the timer configurations for the AT90CAN128 which
are also used for the ATmega256x. ATmega256x and AT90CAN128 are using the
same newer AVR core which has a different register layout and naming
convention than the ATmega128. I chose timer2 because this is the equivalent
timer to timer0 on the Atmega128 core.

I am using the AT90CAN128 with the NUT_CPU_FREQ option on our XNUT-105
boards and a tick of 1 ms, which works well. I never tested a faster tick
frequency.

The option without NUT_CPU_FREQ I never implemented simply because I didn't
have a hardware to test this. Our XNUT-105 board does not have the external
clock crystal and I didn't dare to implement something I couldn't test and
verify. Please feel free to add the 32kHz external clock option if you
require it. Refer to file arch/avr/dev/ostimer.c.

I hope this explains it.

Henrik

> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de [mailto:en-nut-discussion-
> bounces at egnite.de] On Behalf Of Dusan Ferbas
> Sent: Tuesday, 17 March 2009 6:36 PM
> To: en-nut-discussion at egnite.de
> Subject: [En-Nut-Discussion] ATmega 2561 - timer
> 
> Hi,
> 
> was there a reason, why for ATmega256x, the timer2 does not run with
> asynchronous clock ? (free run, with overflow ints, using external
> 32kHz osc)
> When crystal frequency (NUT_CPU_FREQ) is defined, ticks are per 1ms.
> We intend to use longer OS granularity. Has anyone tested this ? I
> was not able to google out discussion about it.
> 
> 
> Dusan
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list