linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Stefan Althöfer" <Stefan.Althoefer@janztec.com>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: mcp251xfd: Bad message receiption
Date: Thu, 22 Dec 2022 07:44:59 +0000	[thread overview]
Message-ID: <FR0P281MB1966273C216630B120ABB6E197E89@FR0P281MB1966.DEUP281.PROD.OUTLOOK.COM> (raw)

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

Dear sirs,

I'm using the MCP2518FD CAN controller with Rasperry PI 4 and are suffering from wrong data reception.

My hardware is a Model 4 B with MCP2581 Click board(s) attached with a prototype (hand-made) interface PCB, as well
as baseboards for a CM4 with a single MCP2518 on it. The error occurs on both of them.

I have reduced my test case to a simple single thread self-receipt test:
    * TX two messages
    * Wait for RX and send out a new message on every receipt
    * TX for messages in total

Refer to the attached PDF for some error cases. Last send frames are at the top of the logs. You can see that wrong 
messages appear in the RX queue, which have been successfully transmitted in previous test loop. The data that is actually sent 
out is correct however (checked with an external logger for some cases).

The error appeared very often (every 1..10 minutes) when I was using kernel raspberrypi 5.15.32-v7l+ and reduced to
once in several hours when I switched to raspberrypi 6.0.12-v7l+. BTW I modified the loopback to external loopback
To check for correct transmission. No other changes to the driver as taken from the Raspbian repository.

I see infrequent mcp251xfd CRC read errors. I think those are due to the 2518 SPI errata. However they don't
occur at the time when the wrong messages are received (refer to the PDF).

Questions:
- Is this a known problem?
- What did change from 5.15.32 to 6.0.12 to reduce the error rate? Maybe this is just because of a change in execution timing?
- Any suggestion how I can step further in fixing this issue.

-----
Stefan Althöfer (stefan.althoefer@janztec.com)


[-- Attachment #2: can_mcp2518fd_fail.pdf --]
[-- Type: application/pdf, Size: 59680 bytes --]

             reply	other threads:[~2022-12-22  7:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22  7:44 Stefan Althöfer [this message]
2022-12-22  9:07 ` mcp251xfd: Bad message receiption Thomas.Kopp
2022-12-22 10:30   ` AW: " Stefan Althöfer
2022-12-22 13:02     ` Marc Kleine-Budde
2022-12-23  8:18       ` AW: " Stefan Althöfer
2022-12-23 19:25         ` Marc Kleine-Budde
2022-12-24 15:57         ` Marc Kleine-Budde
2022-12-30 22:51           ` AW: " Stefan Althöfer
2023-01-01 10:43             ` Stefan Althöfer
2023-01-04 15:55               ` Stefan Althöfer
2023-01-09  7:10                 ` AW: AW: AW: mcp251xfd: Bad message receiption (1/2) Stefan Althöfer
2023-01-10 12:50                   ` Thomas.Kopp
2023-01-10 14:53                     ` Marc Kleine-Budde
2023-01-10 17:08                       ` Marc Kleine-Budde
2023-01-10 18:39                         ` Marc Kleine-Budde
2023-01-10 21:40                           ` Thomas.Kopp
2023-01-10 21:50                             ` Marc Kleine-Budde
2023-01-10 22:37                               ` Marc Kleine-Budde
2023-01-10 22:43                                 ` Marc Kleine-Budde
2023-01-11  8:17                                   ` Marc Kleine-Budde
2023-01-11 11:54                                     ` Marc Kleine-Budde
2023-01-09  7:10                 ` AW: AW: AW: mcp251xfd: Bad message receiption (2/2) Stefan Althöfer
2022-12-22 14:51 ` mcp251xfd: Bad message receiption 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=FR0P281MB1966273C216630B120ABB6E197E89@FR0P281MB1966.DEUP281.PROD.OUTLOOK.COM \
    --to=stefan.althoefer@janztec.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;
as well as URLs for NNTP newsgroup(s).