[En-Nut-Discussion] Defining NUT_HWCLK_*
Thiago A. Corrêa
thiago.correa at gmail.com
Mon Jan 19 11:08:45 CET 2009
Thanks Harald,
I've added the defines as you suggested.
AVR32 also has an HSB clock (yet part of the clksel register).
Should we use standard names (PERIPHERAL_C?). Or can we use something
like NUT_HWCLK_PERIPHERAL_HSB?
I checked arch/arm/timers.h and indeed in my revision (over the
AVR32 svn repository) there is no mention of those defines. I haven't
checked CVS head, but I guess they are not there either since we are
not far behind CVS HEAD.
Thanks,
Thiago A. Correa
On Mon, Jan 19, 2009 at 6:28 AM, Harald Kipp <harald.kipp at egnite.de> wrote:
> Hi Thiago,
>
>> That function accepts either NUT_HWCLK_CPU or NUT_HWCLK_PERIPHERAL.
>> The problem is that it's only defined in timers.h with default to
>> NUT_HWCLK_PERIPHERAL == NUT_HWCLK_CPU.
>
> This is indeed strange.
>
>> I will have to define them to be different for AVR32. Also, I will
>> need a second peripheral value, because AVR32 has PBA and PBB clocks
>> for peripherals and they might have different divisors, so USART can
>> use one value while USB uses a different value, all based on the value
>> of the main clock.
>
> I think, include/arch/avr32/timer.h should provide something like
>
> #define NUT_HWCLK_PERIPHERAL_A 1
> #define NUT_HWCLK_PERIPHERAL_B 2
> #define NUT_HWCLK_MAX 2
> #define NUT_HWCLK_PERIPHERAL NUT_HWCLK_PERIPHERAL_A
>
> assuming, that PBB is used for USB. Otherwise you may consider
>
> #define NUT_HWCLK_PERIPHERAL NUT_HWCLK_PERIPHERAL_B
>
> I'll look into the ARM part... ...really strange.
>
> Harald
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
More information about the En-Nut-Discussion
mailing list