From: Roland Tollenaar <rwatollenaar@domain.hid>
To: Bernard Dautrevaux <bernard.dautrevaux@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] RTCAN and tsc
Date: Thu, 08 Mar 2007 20:06:47 +0100 [thread overview]
Message-ID: <45F05EC7.6070907@domain.hid> (raw)
In-Reply-To: <!&!AAAAAAAAAAAYAAAAAAAAAOtQApUEfglBvKTF3jr1t1bigwAAEAAAALx+DKgbdNVEi6wAAVh/Ga4BAAAAAA==@ac6.fr>
Hi,
Thanks for the input. Much appreciated from my side. I cannot comment on
your question
> The net result was that we had to add quite a lot of udelay() calls
to >slow down the driver to the senator's pace of the SJA1000... Are you
>sure you're not running in this kind of problem?
but if anyone has suggestions as to what I can do to validate it I would
be happy to try. (Sebastian your request to remove the inline statement
is forthcoming)
For the record, I am developing on a laptop with 3 GHz Intel CPU, 2 GB
of RAM, 800 Mhz FSB and that is about all the stats I have. This info is
probably irrelevant but just to clear out of the way any ideas that I
might be working on the oldest of PC hardware.
I do have a question which may be a bit early or out of context but if
it turns out without question that the delay IS in the
rtcan_sja_interrupt
routine (is it a routine? A function call? ) would it be possible to
split the function up into smaller parts (is this what they call
granularity?) so that the RT tasks can return to themselves before
running out of time while stuck in the rtcan_sja_interrupt call. ?
Or am I missing the point entirely?
Regards,
Roland.
Bernard Dautrevaux wrote:
> Hi everybody,
>
> Maybe I'm making an error, but AFAIK, the SJA1000 on-chip registers are clocked by a rather slow clock, that is limited to about 24MHz. I remember a case where interrupts were handled by the CPU (a 600MHz thing) too fast for the SJA1000, resulting in the chip not yet aware that it generates the interrupt.
>
> To be more precise, the IRQ gets out, probably immediately through some sort of asynchronous logic, but the fact was only clocked in the interrupt status register at about 16MHz, thus the CPU was able to read the interrupt status register, thus clearing the coming interrupt state, before the interrut was latched, and thus the IRQ was lost...
>
> The net result was that we had to add quite a lot of udelay() calls to slow down the driver to the senator's pace of the SJA1000... Are you sure you're not running in this kind of problem?
>
> Just my .02€
>
> Bernard
>
>
>> -----Message d'origine-----
>> De : xenomai-help-bounces@domain.hid
>> [mailto:xenomai-help-bounces@domain.hid] De la part de Sebastian Smolorz
>> Envoyé : jeudi 8 mars 2007 15:13
>> À : rolandtollenaar@domain.hid
>> Cc : xenomai@xenomai.org
>> Objet : Re: [Xenomai-help] RTCAN and tsc
>>
>> Roland Tollenaar wrote:
>>> Hi
>>>
>>>>> What does this mean? This is as good as it gets?
>>>> Hm. To be more verbose on what happens between the beginning of
>>>> rtcan_sja_interrupt and rtcan_rcv please remove the "inline" from
>>>> the functions rtcan_sja_err_interrupt in the file
>>>> ksrc/drivers/can/sja1000/rtcan_sja1000.c line 156 and from the
>>>> function rtcan_sja_rx_interrupt in the same file in line
>> 87. Compile
>>>> your modules/kernel again and repeat the tracer/latency test.
>>>>
>>>> I assume that most of the time is spent in the latter
>> function where
>>>> several SJA HW regs are read out. A slow access to the
>> regs could be
>>>> the explanation for the long time the interrupt handler
>> has to spend.
>>> Where are the registers located? On the dongle or are these
>> in the PC?
>>
>> These are registers located in the SJA1000 CAN controller.
>>
>>> Just to know whether there might not be a problem with the
>> PEAK device.
>>> Is there any way you could check what the access times are to
>>> rtcan_sja_interrupt on your systems when performing the same
>>> experiment and recieving messages (pref PDO with length 8)
>> over the bus?
>>
>> Unfortunately, I do not have the opportunity to perform tests
>> with the driver ATM.
>>
>>> I am developing on a pretty high-end machine here,
>> Didn't you speak of 486's in a previous mail?
>>
>>> in fact every aspect
>>> almost as fast as is on the market at the moment so its
>> would surprise
>>> me if there is a hardware shortcoming if the registers you speak of
>>> are on the PC.
>>>
>>> In the mean time I will try doing as you suggest, I presume
>> you want
>>> me to send the frozen trace to you again after that.
>> Exactly.
>>
>>> Is it worth while removing the virtual driver from the kernel build
>>> and running over rtcan0.
>> Turn it off although it is unlikely that it has something to
>> do with the problem. But you never know.
>>
>>> Is there any chance that you have never encountered this problem
>> I never worked with the virtual device.
>>
>> --
>> Sebastian
>>
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
>
>
next prev parent reply other threads:[~2007-03-08 19:06 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 15:06 [Xenomai-help] RTCAN and tsc roland Tollenaar
2007-03-06 15:11 ` Gilles Chanteperdrix
2007-03-06 15:53 ` roland Tollenaar
2007-03-06 15:59 ` Gilles Chanteperdrix
2007-03-06 16:11 ` roland Tollenaar
2007-03-06 16:15 ` Gilles Chanteperdrix
2007-03-06 16:32 ` roland Tollenaar
2007-03-06 16:42 ` Gilles Chanteperdrix
2007-03-06 17:04 ` roland Tollenaar
2007-03-06 17:19 ` Gilles Chanteperdrix
2007-03-06 18:17 ` roland Tollenaar
2007-03-06 19:38 ` Gilles Chanteperdrix
2007-03-06 20:46 ` Roland Tollenaar
2007-03-07 9:04 ` Sebastian Smolorz
2007-03-08 12:14 ` Roland Tollenaar
2007-03-08 14:12 ` Sebastian Smolorz
2007-03-08 17:36 ` Bernard Dautrevaux
2007-03-08 19:06 ` Roland Tollenaar [this message]
2007-03-09 9:47 ` Sebastian Smolorz
2007-03-09 9:59 ` Gilles Chanteperdrix
2007-03-09 10:14 ` Sebastian Smolorz
2007-03-09 10:16 ` Gilles Chanteperdrix
2007-03-09 10:56 ` Sebastian Smolorz
2007-03-09 11:17 ` Gilles Chanteperdrix
2007-03-09 13:36 ` Sebastian Smolorz
2007-03-09 14:08 ` Dmitry Adamushko
2007-03-09 14:45 ` Sebastian Smolorz
2007-03-09 15:17 ` Dmitry Adamushko
2007-03-09 15:26 ` roland Tollenaar
2007-03-09 15:17 ` roland Tollenaar
2007-03-09 15:38 ` Paul
2007-03-09 16:12 ` roland Tollenaar
2007-03-09 16:36 ` Eric Noulard
2007-03-09 17:46 ` roland Tollenaar
2007-03-09 17:42 ` Daniel Schnell
2007-03-09 18:04 ` roland Tollenaar
2007-03-10 21:12 ` Wolfgang Grandegger
2007-03-11 8:15 ` roland Tollenaar
2007-03-09 16:37 ` Sebastian Smolorz
2007-03-09 17:55 ` roland Tollenaar
2007-03-09 18:10 ` roland Tollenaar
2007-03-06 16:45 ` Sebastian Smolorz
2007-03-06 16:54 ` roland Tollenaar
2007-03-06 16:58 ` roland Tollenaar
2007-03-06 16:21 ` Sebastian Smolorz
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=45F05EC7.6070907@domain.hid \
--to=rwatollenaar@domain.hid \
--cc=bernard.dautrevaux@domain.hid \
--cc=rolandtollenaar@domain.hid \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.