All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Menschel <menschel.p@posteo.de>
To: Bremer Henning <h.bremer@tu-braunschweig.de>, linux-can@vger.kernel.org
Subject: Re: Measuring latency of CAN messages in SocketCAN
Date: Thu, 6 Oct 2016 21:48:57 +0200	[thread overview]
Message-ID: <d01e175a-7c62-3e55-ed34-bb65a96458e9@posteo.de> (raw)
In-Reply-To: <web-11102383@rz.tu-bs.de>

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]


> I am using SocketCAN on a Beaglebone Black with Debian (Wheezy). I
> have my Beaglebone plugged in a CAN-Network of 5 microcontrollers. Now
> I would like to measure the time one message needs to be delivered
> from my beaglebone to another microcontroller via CAN depending on the
> priority (ID) of the sent message.
> Is there a way to do this in SocketCAN?
>
IMHO latency is best to be measured with an oscilloscope or a logic
analyzer. Switching a GPIO PIN is a good trigger to start a measurement.
Just wait for the message to be sent and measure the time in between.

As CAN is CSMA, latency has to be measured without other nodes on the
network.

The other option on the BBB is to sent a message from can0 to can1 and
clock the time in between tx and rx. Assuming rx takes as much time as
tx, you can split that time in half to get the latency.

Regards,
Patrick


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3709 bytes --]

  reply	other threads:[~2016-10-06 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06  8:37 Measuring latency of CAN messages in SocketCAN Bremer Henning
2016-10-06 19:48 ` Patrick Menschel [this message]
2016-10-06 20:24   ` Pavel Pisa
2016-10-08 16: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=d01e175a-7c62-3e55-ed34-bb65a96458e9@posteo.de \
    --to=menschel.p@posteo.de \
    --cc=h.bremer@tu-braunschweig.de \
    --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.