From: Oliver Hartkopp <socketcan@hartkopp.net>
To: anochin@photo-meter.com, linux-can@vger.kernel.org
Subject: Re: can, m_can, tcan4x5x : big jitter between the packets by sending
Date: Thu, 19 May 2022 18:26:35 +0200 [thread overview]
Message-ID: <f6d6522e-e63c-ea0f-e554-ea1cfc1b27a4@hartkopp.net> (raw)
In-Reply-To: <9e431f19-897e-7bff-68bb-7ac7bb9fd757@photo-meter.com>
Hi Michael,
On 19.05.22 17:52, Michael Anochin wrote:
> my application continuously sends 64 bytes CANFD packets with 1MBit/s at
> the 10ms interval.
How does this application implement this 10ms interval?
Can you check whether
cangen -g 10 -f -I 123 -L 64 can0
has the same problems?
With
candump -td can0
you should be able to see some timestamp gaps around 10ms.
> I use tcan4450 on the RPI4 with 5.10.103 Kernel and
> raspbian. No other significant processes load the CPU.
>
> When I monitor the traffic with a PCAN adapter on a Windows PC, I notice
> that the packets sometimes arrive with a delay of 5-9ms. But the next
> following packet arrive faster as 10ms. My desired interval of 10ms is
> kept at the jitter of +/- 9ms.
>
> Running the App on only one CPU core using tasksel improve the jitter
> somewhat.
What is the use-case for this 10ms cyclic transmission? Maybe the
CAN_BCM (which uses in-kernel highres timers) could bring an improvement
for you.
> Am I the only one who observes such large jitter or is the m_can
> implementation at Perepherie (spi) not so fast from the throughput and
> is completely normal.
>
> Maybe I should switch to 5.17 kernel? On 5.17 there are bulk read/write
> function for spi regmap.
I don't answer to this as I don't have the required SPI knowledge ...
but if you could upgrade to a newer kernel this is always a good
approach ;-)
Best regards,
Oliver
next prev parent reply other threads:[~2022-05-19 16:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 15:52 can, m_can, tcan4x5x : big jitter between the packets by sending Michael Anochin
2022-05-19 16:26 ` Oliver Hartkopp [this message]
[not found] ` <1259c8f0-9a2d-b28c-fad3-3b7459161a1d@photo-meter.com>
2022-05-19 18:50 ` Oliver Hartkopp
2022-05-19 20:10 ` Marc Kleine-Budde
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=f6d6522e-e63c-ea0f-e554-ea1cfc1b27a4@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=anochin@photo-meter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox