All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Boris Baskevitch <boris.baskevitch@annecy-elec.fr>
Cc: linux-can@vger.kernel.org
Subject: Re: BCM periodic send
Date: Wed, 03 Apr 2013 20:29:24 +0200	[thread overview]
Message-ID: <515C7504.3060403@hartkopp.net> (raw)
In-Reply-To: <000501ce3050$1a5fb580$4f1f2080$@annecy-elec.fr>

On 03.04.2013 11:46, Boris Baskevitch wrote:

> Now I have a new issue, the BCM report a RX_TIMEOUT for all periodic
> messages, even if the message is present on the bus with a shorter period
> than the one I configured in the BCM.


I assume you set STARTIMER too, which fires the RX timeout timer immediately.

> The message is correctly received as I can get the RX_CHANGED message for
> the corresponding IDs.
> If I use RX_FILTER_ID option, I get a RX_CHANGED and RX_TIMEOUT for each
> message seen the bus (which is correct for RX_CHANGED, but not for
> RX_TIMEOUT).
> By the way, for a periodic RX message, which parameter is the period, ival1
> or ival2 ? (I had both set for the tests)


ival1

Please look into

http://svn.berlios.de/wsvn/socketcan/trunk/test/tst-bcm-dump.c

You can download it from the old BerliOS SVN here:

http://developer.berlios.de/svn/?group_id=6475

An here is, what it does:

hartko@keffi-oh:~$ tst-bcm-dump -?
tst-bcm-dump: invalid option -- '?'

Usage: tst-bcm-dump [options]
Options: -i <interface> (CAN interface. Default: 'vcan0')
         -c <can_id>    (used CAN ID. Default: 0x042)
         -o <timeout>   (Timeout value in nsecs. Default: 0)
         -t <throttle>  (Throttle value in nsecs. Default: 0)
         -q <msgs>      (Quit after receiption of #msgs)
         -s             (set STARTTIMER flag. Default: off)

hartko@keffi-oh:~$ tst-bcm-dump -o 500000
[1365012787.346834] Writing RX_SETUP with RX_FILTER_ID for can_id <042>
[1365012800.057653] (1365012800.057338) RX_CHANGED
[1365012800.557701] RX_TIMEOUT
^C
hartko@keffi-oh:~$ tst-bcm-dump -o 500000 -s
[1365012821.448782] Writing RX_SETUP with RX_FILTER_ID for can_id <042>
[1365012821.948974] RX_TIMEOUT
^C

In the first case the RX_TIMEOUT is 500000ns behind the reception of the
frame. In the second case (with STARTTIMER set) the RX_TIMEOUT emerges even
when there was no reception of any frame.

You can use

cangen vcan0 -I 042 -g400

to test the functionality of above "tst-bcm-dump -o 500000"

When cangen is termintated, the RX_TIMEOUT appears.

Regards,
Oliver


  reply	other threads:[~2013-04-03 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 16:11 BCM periodic send Boris Baskevitch
2013-03-28 21:18 ` Oliver Hartkopp
2013-04-03  9:46   ` Boris Baskevitch
2013-04-03 18:29     ` Oliver Hartkopp [this message]
2013-04-04 12:24     ` Boris Baskevitch
2013-04-04 18:44       ` Oliver Hartkopp

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=515C7504.3060403@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=boris.baskevitch@annecy-elec.fr \
    --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.