From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16035 invoked by alias); 19 Jul 2009 14:07:19 -0000 Received: (qmail 16025 invoked by uid 22791); 19 Jul 2009 14:07:18 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Jul 2009 14:07:12 +0000 Received: by an-out-0708.google.com with SMTP id b6so1812694ana.21 for ; Sun, 19 Jul 2009 07:07:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.69.6 with SMTP id w6mr4806285ank.6.1248012429933; Sun, 19 Jul 2009 07:07:09 -0700 (PDT) In-Reply-To: <20090719081846.GE20164@lunn.ch> References: <186ad4050907190108s119964a5x26d74ee8701ec52c@mail.gmail.com> <20090719081846.GE20164@lunn.ch> Date: Sun, 19 Jul 2009 14:07:00 -0000 Message-ID: <186ad4050907190707w790c7bdcxda0d58ed32392e7d@mail.gmail.com> From: Nodir Qodirov To: Nodir Qodirov , ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] eCos heartbeat function handler X-SW-Source: 2009-07/txt/msg00159.txt.bz2 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 ti= cks. 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 : >> 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-handle= rs.html > > Call > cyg_alarm_initialize(test_alarmH, cyg_current_time()+1, 1); > > and you alarm function will be called every tick. > > =A0 =A0Andrew > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss