public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nodir Qodirov <nodir.qodirov@gmail.com>
To: Nodir Qodirov <nodir.qodirov@gmail.com>,
	ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] eCos heartbeat function handler
Date: Sun, 19 Jul 2009 14:07:00 -0000	[thread overview]
Message-ID: <186ad4050907190707w790c7bdcxda0d58ed32392e7d@mail.gmail.com> (raw)
In-Reply-To: <20090719081846.GE20164@lunn.ch>

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

  reply	other threads:[~2009-07-19 14:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19  8:08 Nodir Qodirov
2009-07-19  8:18 ` Andrew Lunn
2009-07-19 14:07   ` Nodir Qodirov [this message]
2009-07-19 14:47     ` Christophe Coutand
2009-07-21  6:52       ` Nodir Qodirov
2009-07-21  7:27         ` Christophe Coutand
2009-08-05 11:22   ` Ormund Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=186ad4050907190707w790c7bdcxda0d58ed32392e7d@mail.gmail.com \
    --to=nodir.qodirov@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).