[ECOS] eCos heartbeat function handler

Nodir Qodirov nodir.qodirov@gmail.com
Sun Jul 19 14:07:00 GMT 2009


Thank you Andrew!

I think your answer is from eCos application programmer's view, I want
to know tick handler function from system designer/developer point of
view.

For example in the example which you gave at

http://ecos.sourceware.org/docs-latest/user-guide/clocks-and-alarm-handlers.html

I initialize alarm and it will be called whenever it reaches given clock ticks.
In this case
cyg_alarm_initialize(test_alarmH, cyg_current_time()+1, 1);
I'm just creating timer with the period of one tick and asking
re-trigger this alarm periodically. If I run this example (at
clocks-and-alarm-handlers.html) on my i386 board, it works fine, but
there is some function which is receiving hardware ticks and making
all eCos alarms to work. What is that function?

Maybe I can paraphrase my question simple as: which function in eCos
kernel is handling hardware clock tick (or clock tick interrupts) ?


2009/7/19 Andrew Lunn <andrew@lunn.ch>:
>> 2) Where should I specify (some assembler file...) which function to
>> call on each heartbeat?
>
> Take a look at:
>
> http://ecos.sourceware.org/docs-latest/user-guide/clocks-and-alarm-handlers.html
>
> Call
> cyg_alarm_initialize(test_alarmH, cyg_current_time()+1, 1);
>
> and you alarm function will be called every tick.
>
>    Andrew
>

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list