From: Wolfgang Grandegger <wg@domain.hid>
To: rolandtollenaar@domain.hid
Cc: Xenomai-help@domain.hid
Subject: Re: [Xenomai-help] your pending RT-Socket-CAN problems (was rtcan driver. rtcan_sja_interrupt made interruptible)
Date: Sat, 10 Mar 2007 17:34:18 +0100 [thread overview]
Message-ID: <45F2DE0A.1010207@domain.hid> (raw)
In-Reply-To: <45F2B8BB.6060804@domain.hid>
Hi Roland,
hope most of your problems and questions with RT-Socket-CAN have already
been solved or answered. I will not have the time to read carefully all
your mails accumulated over the last week, sorry, it's too much traffic.
Could you please briefly summarize the pending issues.
Thanks,
Wolfgang.
Roland Tollenaar wrote:
> Hi,
>
> The following probably relates to the functioning of the sja1000 chip. I
> cannot see how it can NOT be possible for the chip to function properly
> without also having the ability to be read by a fully interruptible ISR.
>
> Could below just be clarified for me please?
>
> When the 14 registers of the sja1000 chip are being read, I presume this
> is a single CAN frame that is being recovered which will subsequently be
> written to the message buffer of the sockets currently connected to the
> device. I also presume that while the registers are being read new
> incoming messages from the Bus will not be written into these registers
> because this would possibly corrupt the frame that is currently being
> extracted from the registers. i.e. if the ISR has read 7 of the 14
> messages and a new message is now written into the registers the
> resulting frame will be a mixture of two distinct received messages. To
> prevent that happening I presume it must be possible to lock the
> registers while the Rx-ISR is busy doing its reading of the 14
> registers? Messages that arrive on the bus while the Rx-ISR is locking
> the 14 registers will then either be discarded or sent again by the node
> as a result of the sending node not receiving an acknowledge message?
>
> The point of the above questions being that if it is possible to lock
> the 14 registers there is no reason in my humble opinion (IMHO) that the
> the Rx-ISR cannot be interrupted. Correct? Of course one wants to
> minimize the delay to optimize bus traffic but such behaviour would
> certainly improve Real-Time capabilities.
>
> If the non-real-time driver functions as described above (locks the 14
> registers and allows itself to be interrupted) it will be better for me
> to use the non-real-time driver in a stand-alone non-real-time
> application which reads the CAN bus and presents the data it receives to
> the real-time application (or any other application for that matter) via
> a mechanism of choice. E.g. in a file on RAM-Disk, a pipe etc. In short
> this would be a CAN-server which, since it is a fully interruptible
> normal process will allow my real-time applications to tick away
> undisturbed.
>
> Is the reasoning incorrect?
>
>
> Having written the above I have just downloaded the datasheet of the
> SJA1000 and it seems to confirm my above conjecture. Firstly there are
> 64 bytes of FIFO receive buffer 13 of which are presented as a window
> and are probably the ones referred to by Sebastian as the ones the ISR
> reads out. This means that while reading out the window messages will
> not get lost immediately.
>
> Then on page 10 with a more detailed explanation on page 14 they talk
> about a command register with a bit switch called the Release receive
> Buffer (RRB) which seems to have the function of the lock I was talking
> about.
>
> Can you more knowledgeable people comment on this. It the above is
> correct it could enormously improve the applicability of the driver for
> Real-Time control. Which I presume the driver is all about?
>
>
> 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-10 16:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-10 13:55 [Xenomai-help] rtcan driver. rtcan_sja_interrupt made interruptible Roland Tollenaar
2007-03-10 16:34 ` Wolfgang Grandegger [this message]
[not found] ` <bc4264770703110035g6625e8a1t4f195507d72aaf66@domain.hid>
2007-03-11 9:34 ` [Xenomai-help] your pending RT-Socket-CAN problems (was rtcan driver. rtcan_sja_interrupt made interruptible) Wolfgang Grandegger
2007-03-11 11:02 ` roland Tollenaar
2007-03-11 12:03 ` Wolfgang Grandegger
2007-03-11 12:26 ` roland Tollenaar
2007-03-11 21:16 ` Jan Kiszka
2007-03-12 18:17 ` roland Tollenaar
2007-03-12 20:01 ` Wolfgang Grandegger
2007-03-12 20:28 ` [Xenomai-help] RT samples karre
2007-03-12 8:27 ` [Xenomai-help] your pending RT-Socket-CAN problems (was rtcan driver. rtcan_sja_interrupt made interruptible) Sebastian Smolorz
2007-03-12 9:19 ` 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=45F2DE0A.1010207@domain.hid \
--to=wg@domain.hid \
--cc=Xenomai-help@domain.hid \
--cc=rolandtollenaar@domain.hid \
/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.