All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthias Weißer" <m.weisser.m@gmail.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Subject: Re: sjw in can_calc_bittiming
Date: Wed, 3 Nov 2021 08:12:34 +0100	[thread overview]
Message-ID: <CAO8h3eEijXsgTN0hyxuCuhDms=z-W_8hj1UHWV3544HugsuoPA@mail.gmail.com> (raw)
In-Reply-To: <0a539c49-b92e-892e-5848-613ff745c283@hartkopp.net>

Hi Oliver

Thanks for your answer.

Am Di., 2. Nov. 2021 um 16:36 Uhr schrieb Oliver Hartkopp
<socketcan@hartkopp.net>:
>
> > We can fix this quite easily by specifying a higher sjw value.
>
> You can specify the sjw value with the ip command (for CAN FD there is
> also a dsjw). And IIRC you can set it to the max. value for your CAN
> controller if you define sjw to be 4.

I know that and this is my current solution. And I am totally happy with that.
Sorry if this wasn't clear in my original message.

My question was if it makes sense to change the default in can_calc_bittiming()
to something more adaptive than just 1 depending on the total number of tq.
This may prevent others from hitting the same problem as I did.

If you can take some time and rethink my original question that would be great

> > Wouldn't it make sense to increase sjw in can_calc_bittiming() to something
> > like 5% of the total time quanta? This may increase the reliability of the CAN
> > network when there are differences in the bitrates of the single members. Are
> > there any arguments against such an arbitrary selection of sjw?

Regards

Matthias

  parent reply	other threads:[~2021-11-03  7:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 15:03 sjw in can_calc_bittiming Matthias Weißer
2021-11-02 15:36 ` Oliver Hartkopp
2021-11-02 15:59   ` Wolfgang Grandegger
2021-11-03  7:12   ` Matthias Weißer [this message]
2021-11-05 12:07 ` 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='CAO8h3eEijXsgTN0hyxuCuhDms=z-W_8hj1UHWV3544HugsuoPA@mail.gmail.com' \
    --to=m.weisser.m@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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.