From: "Stéphane ANCELOT" <sancelot@domain.hid>
To: roland Tollenaar <rolandtollenaar@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] CAN errors and real-time behaviour
Date: Mon, 05 Mar 2007 08:49:39 +0000 [thread overview]
Message-ID: <45EBD9A3.9000303@domain.hid> (raw)
In-Reply-To: <bc4264770703030609w188a675cj618872986ff1071c@domain.hid>
Hi,
May be this related to your problem,I am trying to deal with some
problems regarding CAN applications when NOTHING IS CONNECTED and my
system :
Like you I have a first task that reads the CAN bus
a second task is doing nothing than waiting for a a semaphore.
A third task begins to send two messages in can bus (the second message
has got error) and goes to 5ms peridoic loop
The major problem is as follow :
I launch my RT TASK : no problem .I can do things in my linux console .
Now, I start X , X begins to launch and is frozen.If I plug the bus
CAN, "magician things " happen : X manage to launch and everything goes
normal ......
important NOTE for the behavour : CAN RX has got a timeout of almost
100ms and tx of 10 ms. if something goes wrong task 2 rt_task_sleeps for
a while.
I think the problem is related to can driver behavour.Do you think it is
related to the same problem origin you have?
roland Tollenaar wrote:
> HI,
>
> I thought I would put this in a separate thread.
>
> The experiment works as follows. I have a 1ms and a 2 ms rt periodic task.
>
> In the real-time periodic task I am only reading out the message
> buffer (only work done in the task). In the 2ms task I am doing
> nothing.
>
> I always read-out the measured period times. This is done by writing
> the measured value into a variable which is displayed in a separate
> thread outside the rt tasks so the display does not influence the
> measurement. (Unlike printf is said to do).
>
> There is nothing connected to the rtcan2 device (Peak dongle). The
> applicaiton runs fine the tasktimes relatively well maintained
> (fluctuatin about 0.003ms) around 1ms and 2ms.
>
> The moment I write to the device using rtcansend eg:
> ./rtcansend rtcan2 -i 0x700 0x03 0x02
>
> the buserror comes up and the protocol error. from that moment onwards
> the messagebuffer gets flooded and does not stop being flooded forever
> after.
>
> The period times then fluctuate badly up to 0.2ms around their nominal
> values.
>
> This is not desirable behavior. Firstly its not necessary to have the
> message buffer flooded all the time I would think. How do I change
> that so that I will only pick up an error once in response to a failed
> send?
> Secondly what am I doing wrong that breaks the real-time behaviour? If
> the bus gives an error on one part of the process I don;t want other
> processes that may have nothing to do with the CAN bus to misbehave.?
>
> I do suspect that if I can prevent the message buffer flooding forever
> and manage to clean it out that the behaviour will be better because
> if its flooded then messages get sent to dmesg well wherever dmesg
> reads from that is) and this may explain the behavior?
>
> Can anyone comment on this please?
>
> Regards,
>
> Roland.
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
>
next prev parent reply other threads:[~2007-03-05 8:49 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-03 14:09 [Xenomai-help] CAN errors and real-time behaviour roland Tollenaar
2007-03-05 8:49 ` Stéphane ANCELOT [this message]
2007-03-05 9:26 ` Roland Tollenaar
2007-03-05 10:39 ` [Xenomai-help] CAN errors and real-time behaviour (IRQ raise forever and may lock system) Stéphane ANCELOT
2007-03-05 11:26 ` Sebastian Smolorz
2007-03-05 11:42 ` Roland Tollenaar
2007-03-05 12:01 ` Sebastian Smolorz
2007-03-05 12:16 ` Roland Tollenaar
2007-03-05 12:48 ` Sebastian Smolorz
2007-03-05 13:13 ` Roland Tollenaar
2007-03-05 14:57 ` Stéphane ANCELOT
2007-03-05 14:42 ` Sebastian Smolorz
2007-03-05 17:02 ` Stéphane ANCELOT
2007-03-06 9:36 ` Sebastian Smolorz
2007-03-10 20:53 ` Wolfgang Grandegger
2007-03-14 11:38 ` [Xenomai-help] RT-Socket-CAN bus error handling (was CAN errors and real-time behaviour (IRQ raise forever and may lock system)) Wolfgang Grandegger
2007-03-14 12:51 ` Sebastian Smolorz
2007-03-14 13:18 ` Wolfgang Grandegger
2007-03-14 13:24 ` Sebastian Smolorz
2007-03-17 11:56 ` Wolfgang Grandegger
2007-03-18 10:22 ` Jan Kiszka
2007-03-18 11:33 ` Wolfgang Grandegger
2007-03-18 20:59 ` Jan Kiszka
2007-03-19 8:21 ` Sebastian Smolorz
2007-03-19 8:50 ` Sebastian Smolorz
2007-03-19 11:35 ` Wolfgang Grandegger
2007-03-19 11:46 ` Sebastian Smolorz
2007-03-19 13:05 ` Jan Kiszka
2007-03-19 20:44 ` Wolfgang Grandegger
2007-03-19 21:19 ` Wolfgang Grandegger
2007-03-19 22:25 ` Jan Kiszka
2007-03-20 6:53 ` Wolfgang Grandegger
2007-03-19 8:54 ` Wolfgang Grandegger
2007-03-19 16:48 ` Stéphane ANCELOT
2007-03-19 16:56 ` Sebastian Smolorz
2007-03-19 17:33 ` Jan Kiszka
2007-03-19 8:49 ` Stéphane ANCELOT
2007-03-19 8:30 ` Wolfgang Grandegger
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=45EBD9A3.9000303@domain.hid \
--to=sancelot@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.