From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Stephen Marshall <Stephen_Marshall@infosys.com>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: Hardware Loopback on RT-Socket-CAN Needed
Date: Thu, 17 Dec 2015 15:43:21 +0100 [thread overview]
Message-ID: <5672CA09.2050503@pengutronix.de> (raw)
In-Reply-To: <54DCF20AC6227B4FABAC7D71A5A1208F78E9068B@BLRKECMBX13.ad.infosys.com>
[-- Attachment #1: Type: text/plain, Size: 2586 bytes --]
On 12/17/2015 03:13 PM, Stephen Marshall wrote:
> I am looking for some information on Loopback functionality for the
> RT-Socket-CAN.
You mean RT-Socket-CAN as in Xenomai? This is, as far as i know dead.
> In Socket-CAN, we used to test the loopback functionality on own socket
> using the flag *CAN_RAW_RECV_OWN_MSGS *using *MSG.CONFIRM* flag. However
> in RT-Socket CAN we see that this option has been disabled purposefully.
>
> Could someone please clarify us on the below questions?
>
> 1) How we can do a hardware loopback (i.e., message from the
> transmit socket has to reach the same socket through the bus) on
> RT-Socket CAN?
Some CAN controllers have a bit to enable HW Loopback, e.g. flexcan has:
/* FLEXCAN module configuration register (CANMCR) bits */
#define FLEXCAN_MCR_SRX_DIS BIT(17)
for this.
> 2) If receive own messages is not supported, how is address claim
> handled in J1939 applications for other RT-Socket-CAN programs?
I don't know anyone using j1939 on RT-Socket-CAN. However there are some
companies, especially in the last 3 month interested in bringing j1939
to mainline linux-can.
> 3) How do we patch the RT-Socket-CAN with the CAN_RAW_RECV_OWN_MSGS
> fix at kernel level? Any details on fix that should be taken and GIT
> repo details would be helpful. Would patching have any impact on the
> real-time capability?
Don't know. Sorry, I'm interested in mainline linux-can only.
> We use the SJA1000 CAN Controller and Xenomai 2.6. We tried setting the
> SRR (Self Reception Request) bit at driver using *CAN_CTRLMODE_LOOPBACK*
> <http://www.xenomai.org/documentation/xenomai-2.4/html/api/group__rtcan.html#ga19ec0cc4379e80c32cbd333cf7c145e9>*,
> *however it was doing a software loopback where the looped back message
> would not have actually gone in the bus. We needed the
> CAN_RAW_RECV_OWN_MSGS fix at RT-Socket-CAN, could someone help?
We do a software loopback in linux-can, too. But we do the actual
loopback-send in the TX-completion handler. This means no sent frame, no
loopback. You can do this in the Xenomai driver probably, too. However,
an increase of interrupts might have slight impact on the overall RT
performance, but I this this is unelectable.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next parent reply other threads:[~2015-12-17 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <54DCF20AC6227B4FABAC7D71A5A1208F78E9068B@BLRKECMBX13.ad.infosys.com>
2015-12-17 14:43 ` Marc Kleine-Budde [this message]
2015-12-17 15:34 ` Hardware Loopback on RT-Socket-CAN Needed Wolfgang Grandegger
2015-12-17 15:36 ` Marc Kleine-Budde
2015-12-17 17:25 ` Stephen Marshall
2015-12-17 18:31 ` 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=5672CA09.2050503@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=Stephen_Marshall@infosys.com \
--cc=linux-can@vger.kernel.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.