linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Torin Cooper-Bennun <torin@maxiluxsystems.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: can, tcan4x5x: look to merge rpi support into rpi kernel tree
Date: Fri, 26 Feb 2021 16:14:34 +0000	[thread overview]
Message-ID: <20210226161434.ymdrmclic6nrccj5@bigthink> (raw)
In-Reply-To: <20210226160135.w43onb3z25xhv4re@pengutronix.de>

On Fri, Feb 26, 2021 at 05:01:35PM +0100, Marc Kleine-Budde wrote:
> > Is timestamp-wrapping a concern for rx-offloading?
> 
> No, as long as you provide a proper u32 timestamp, which means wrap
> around at 0xffffffff to 0x0. As the tcan4x5x has only a 16 bit
> timestamp, shift it to full 32 bit, like this:
> 
> https://elixir.bootlin.com/linux/v5.11/source/drivers/net/can/flexcan.c#L805
> 
> On the mcp with true 32 bit timestamp there's a wraparound every 107
> seconds at 40 MHz external clock (0xffffffff / 40000000).
> 
> The tcan has the TSS.TCP as a prescaler and increments in bit time,
> which is 5MHz max. This results in a wrap around every 13ms (0xffff /
> 5000000) with a prescaler of 1. With a prescaler of 16, you can increase
> this to 209ms (0xffff / 5000000 * 16), which gives an accuracy of 2
> bytes.

Nice, thank you, that all sounds good. I'll get to work. :)

--
Regards,

Torin Cooper-Bennun
Software Engineer | maxiluxsystems.com


      reply	other threads:[~2021-02-26 16:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <602651f9.1c69fb81.302a5.647d@mx.google.com>
     [not found] ` <20210215144509.rhds7oybzat6u27w@hardanger.blackshift.org>
     [not found]   ` <CAALJrqgrmzGHZX+iiMYwMkVMpxtf_3fWYkVA-iMdPOxpGzrCRQ@mail.gmail.com>
2021-02-15 17:44     ` can, tcan4x5x: look to merge rpi support into rpi kernel tree Marc Kleine-Budde
2021-02-16  9:06       ` Torin Cooper-Bennun
2021-02-16  9:13         ` Marc Kleine-Budde
2021-02-16  9:44           ` Torin Cooper-Bennun
2021-02-16 10:28             ` Marc Kleine-Budde
     [not found]               ` <CAALJrqiVdmLQr7q2ijbWq70RD6PTD8PtVX_zmLW9=uNdc57WqA@mail.gmail.com>
2021-02-16 11:19                 ` Marc Kleine-Budde
2021-02-16 11:38                   ` Torin Cooper-Bennun
2021-02-16 12:32                     ` Marc Kleine-Budde
2021-02-26 12:27                       ` Torin Cooper-Bennun
2021-02-26 12:28                         ` Marc Kleine-Budde
2021-02-26 12:18   ` Torin Cooper-Bennun
2021-02-26 12:22     ` Marc Kleine-Budde
2021-02-26 12:31       ` Torin Cooper-Bennun
2021-02-26 12:40         ` Marc Kleine-Budde
2021-02-26 13:26           ` Torin Cooper-Bennun
2021-02-26 13:39             ` Marc Kleine-Budde
2021-02-26 13:45               ` Torin Cooper-Bennun
2021-02-26 14:00                 ` Marc Kleine-Budde
2021-02-26 15:26                   ` Torin Cooper-Bennun
2021-02-26 16:01                     ` Marc Kleine-Budde
2021-02-26 16:14                       ` Torin Cooper-Bennun [this message]

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=20210226161434.ymdrmclic6nrccj5@bigthink \
    --to=torin@maxiluxsystems.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).