[En-Nut-Discussion] Timing on AVR32

Ethernut ethernut at fitus.de
Thu May 17 08:26:20 CEST 2012


Hi Thiago,

I have tested these change last night. Up to now i don't have problems with the momory/ram. 
Opposing in my short tests tonight it seams that http-server and the other Parts of my App runs more safe.

> What do you mean it takes 20s to boot? To start firing your timer or
> to actually reach main() first line? (Actually NutMain since main is a
> preprocessor macro in NutOS)

I mean it takes the Time to reach first line of the main function of my App.

I have seen, that before the main() is reached, the LEDs on the RJ45 connector lights randomly. But a stable physical network connection is not setup. I assume Nut/os want to boot, but is interrupted maybe by something like a watchdog.

Von meinem iPhone gesendet

Am 17.05.2012 um 03:50 schrieb Thiago A. Corrêa <thiago.correa at gmail.com>:

> Hi Daniel,
> 
> On Wed, May 16, 2012 at 8:22 PM, Daniel Fiedler (Ethernut)
> <ethernut at fitus.de> wrote:
>> void NutRegisterTimer(void (*handler) (void *))
>> {
>>    /* Set compare value for the specified tick frequency. */
>> //    Set_system_register(AVR32_COMPARE, NutGetCpuClock() / NUT_TICK_FREQ + Get_system_register(AVR32_COUNT));
>>        Set_system_register(AVR32_COMPARE, NutGetCpuClock() / NUT_TICK_FREQ );
>> 
>>    sig_sysCompare.ir_handler = handler;
>> 
>>    register_interrupt(SystemCompareIrqEntry, AVR32_CORE_COMPARE_IRQ, AVR32_INTC_INT0);
>> }
>> 
>> I changed line 4 in line 5. Now system seems to run at the correct speed.
>> But Nut/os needs about 15-20s for boot/init.
>> 
>> Could someone explain this function?
>> 
> 
> If memory serves well, NutGetCpuClock() / NUT_TICK_FREQ was supposed
> to be the clock cycles in 1ms. The COUNT register increments
> regardless of pipeline stalls. So, after the equivalent of 1ms cycles,
> the COMPARE IRQ would fire calling the handler callback.
> 
> This is explained in section 2.6 of the "Technical Reference Manual".
> 
> What do you mean it takes 20s to boot? To start firing your timer or
> to actually reach main() first line? (Actually NutMain since main is a
> preprocessor macro in NutOS)
> 
> Kind Regards,
>    Thiago A. Correa
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list