From: "ariga masahiro" <ariga@link-lab.co.jp>
To: "Andrew Lunn" <andrew@lunn.ch>
Cc: <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Re: In trouble of timer operations
Date: Fri, 30 May 2008 02:50:00 -0000 [thread overview]
Message-ID: <001001c8c1ff$d468fa50$1c0110ac@ariga> (raw)
In-Reply-To: <20080529182253.GC22071@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
Hello Andrew and others,
Thank you Andrew for your reply.
I understand why I can't change CYGNUM_KERNEL_COUNTERS_RTC_PERIOD at my
convenience.
May I ask my second question about cyg_thread_delay(1).
I understand that cyg_thread_delay(1) delays 10msec but my result shows
apparently too short period.
I re-write my test and result.
-- my test
run_tests(CYG_ADDRESS id)
{
|
diag_printf("CYGNUM_KERNEL_COUNTERS_RTC_PERIOD=0x%x\n",CYGNUM_KERNEL_COUNTERS_RTC_PERIOD);
HAL_CLOCK_READ(&thread_ft[0].start);
diag_printf("start=%d\n",thread_ft[0].start);
diag_printf("10msec Start !\n");
cyg_thread_delay(1); //10msec
diag_printf("Finish !\n");
HAL_CLOCK_READ(&thread_ft[0].end);
diag_printf("end=%d\n",thread_ft[0].end);
-- result log
CYGNUM_KERNEL_COUNTERS_RTC_PERIOD=0x12000
start=7103
10msec Start !
Finish !
end=16512
delta=9409
As I said,
My target board is CPU SH7709S,Peripheral clock = 29491200Hz.
I setted CYGHWR_HAL_SH_TMU_PRESCALE_0 = 4 so TMU0's 1tick perid is..
29491200/4=7372800Hz,1/7372800=0.000000135sec=0.135microsec.
On the assumption that HAL_CLOCK_READ operating correctly,
according to result cyg_thread_delay(1) took only
9409 x 0.135 = 1270.215 microsec.
I cannot understand why it finish so short perid.
I re-post untitled.ecc.gz.
Please teach me why I get such result.
Masahiro Ariga
[-- Attachment #2: untitled.ecc.gz --]
[-- Type: application/x-gzip, Size: 89721 bytes --]
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2008-05-30 2:50 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 23:59 [ECOS] Wrongfully compiled code ariga masahiro
2008-01-08 0:05 ` Gary Thomas
2008-01-08 1:05 ` ariga masahiro
2008-01-17 19:21 ` [ECOS] " Dave Lawrence
2008-01-17 23:50 ` ariga masahiro
2008-01-18 12:16 ` Dave Lawrence
2008-01-18 14:40 ` Gregg Levine
2008-01-18 15:44 ` Dave Lawrence
2008-01-18 15:49 ` Gregg Levine
2008-01-18 16:09 ` Dave Lawrence
2008-01-21 0:34 ` ariga masahiro
2008-02-04 1:49 ` ariga masahiro
2008-02-04 11:38 ` Dave Lawrence
2008-02-12 1:06 ` ariga masahiro
2008-02-12 10:55 ` Dave Lawrence
2008-02-22 4:57 ` [ECOS] How to re-install newly compiled gnutools ariga masahiro
2008-02-22 7:15 ` ariga masahiro
2008-05-16 8:13 ` [ECOS] When or on what condition does "deschedule" happen? ariga masahiro
2008-05-16 15:26 ` Andrew Lunn
2008-05-19 5:32 ` ariga masahiro
2008-05-19 13:18 ` Andrew Lunn
2008-05-19 13:31 ` Gary Thomas
2008-05-20 1:26 ` ariga masahiro
2008-05-20 12:18 ` Andrew Lunn
2008-05-23 7:38 ` ariga masahiro
2008-05-23 9:35 ` Nick Garnett
[not found] ` <000601c8c165$406e0970$1c0110ac@ariga>
2008-05-29 18:23 ` [ECOS] Re: In trouble of timer operations Andrew Lunn
2008-05-30 2:50 ` ariga masahiro [this message]
2008-05-30 3:09 ` Paul D. DeRocco
2008-05-30 4:11 ` ariga masahiro
2008-05-30 4:43 ` Paul D. DeRocco
2008-05-30 7:26 ` ariga masahiro
2008-05-30 7:47 ` Paul D. DeRocco
2008-05-30 8:03 ` ariga masahiro
2008-05-30 8:07 ` Andrew Lunn
2008-06-04 5:25 ` ariga masahiro
2008-06-04 10:06 ` Paul D. DeRocco
2008-06-05 6:14 ` ariga masahiro
2008-06-05 17:39 ` Paul D. DeRocco
2008-05-30 6:35 ` Andrew Lunn
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='001001c8c1ff$d468fa50$1c0110ac@ariga' \
--to=ariga@link-lab.co.jp \
--cc=andrew@lunn.ch \
--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).