linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Torin Cooper-Bennun <torin@maxiluxsystems.com>
Cc: linux-can <linux-can@vger.kernel.org>
Subject: Re: can, tcan4x5x: look to merge rpi support into rpi kernel tree
Date: Tue, 16 Feb 2021 12:19:30 +0100	[thread overview]
Message-ID: <20210216111930.pcg4e7cildzuri6d@hardanger.blackshift.org> (raw)
In-Reply-To: <CAALJrqiVdmLQr7q2ijbWq70RD6PTD8PtVX_zmLW9=uNdc57WqA@mail.gmail.com>

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

Please keep the mailing list on Cc.

On 16.02.2021 11:11:34, Torin Cooper-Bennun wrote:
> On Tue, 16 Feb 2021 at 10:28, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> > You might not, but the driver does :)
> 
> Indeed, on closer inspection I can see that!
> 
> > If the process repeats infinitely then the CAN controller doesn't go
> > into bus-off, which means the CAN bus is terminated correctly.
> >
> > With your setup of only one node on the bus and correct termination, I
> > too think the frame should be send until the ACK field. I suggest to
> > first create a working CAN bus setup and then add the tcan to it.
> 
> I have to thank you for mentioning termination, because it turned out
> I had not used correct termination at all. How embarrassing! With that
> fixed, the transceiver is happy and I have working TX and RX.

\o/

> Mostly working RX, anyway. When putting the interface down and then
> back up (but allowing a second node to continue attempting TX in the
> meantime) I see some blank frames...
> 
> can0  001   [8]  00 01 02 03 04 05 06 07
> can0  001   [8]  00 01 02 03 04 05 06 07
> can0  001   [8]  00 01 02 03 04 05 06 07
> can0  000   [0]
> can0  000   [0]
> can0  001   [8]  00 01 02 03 04 05 06 07
> can0  001   [8]  00 01 02 03 04 05 06 07
> etc.
> 
> (where the 8-byte frame is what the bus is actually seeing.)

Where do you see these blank frames? On the sending rpi with candump? An
on the bus (with a second system) you only see the full 8 byte long
frames?

Use "candump any,0~0,#FFFFFFFF -extA" to get RX/TX annotation.
Use "cangen -Ii -L8 -D000102030405060708 -g100 can0" to get increasing
CAN-IDs, so you can figure out if a CAN frame got lost.

Seems I have to add the TX path to the list of broken things...

The mcp251xfd driver can be used as a template for the tcan4x5x driver.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2021-02-16 11:20 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 [this message]
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

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=20210216111930.pcg4e7cildzuri6d@hardanger.blackshift.org \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=torin@maxiluxsystems.com \
    /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).