Re: AW: AW: mcp251xfd: Bad message receiption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23.12.2022 08:18:17, Stefan Althöfer wrote:
> > Why do you have so many errors on can1? The device event went into bus-off.
> 
> The device was not freshly started, and I just intended to share the
> setup. No errors when the problem appeared this night.

Ok

> > Can you share your "scselftest" program?
> 
> Sure, attached as extracted from the build system for my test tools.
> Hope this is not the bad guy. Included my ancient copy of
> libsocketcan.

> > Do you get the same error if the test is only running on a single
> > mcp2518fd?
> 
> I'm pretty sure I had cases where I started the test on both, one
> failed sooner and one failed later. However, currently the second test
> is still running (after 9h).

I want to know if there's an influence between the 2 interfaces.

> > Do you get the same error if only a single mcp2518fd is attached to the raspi?
> 
> Only tested this with the CM4

Would be interesting if you only attache 1 mcp2518fd to the board and
then re-run the test.

> > Can you share your kernel, including the modifications?
> 
> Yes if it turns out to be necessary, but I just cloned it from here:
> git clone --depth=1 --branch <branch>
> https://github.com/raspberrypi/linux

You said you made some modifications to the kernel, also it would be
good to use the _extact_ version you using to reproduce the error.

> Following these instructions: https://www.raspberrypi.com/documentation/computers/linux_kernel.html#kernel-headers

> Now this nights error log:

Thanks for the text, much easier to handle. :)

> Loop 4429 2022-12-23T03:07:45 last+4s total:4h299m
> + ./sctestself -b -n 4 -l 999 -t 2 -v cmperr,logmsg -F refilldata,leastdots,allowintloopb,stoponerror -d 8 can1
> CAN selftest can1 .......idx    2 tx:2A5#00 02 6A 8F 6C 81 C3 B0
>          rx:2A5#00 00 85 9A EF 54 34 5D
> idx    3 tx:2A5#00 03 4F 8F 85 59 8E DA
>          rx:2A5#00 00 85 9A EF 54 34 5D
> .c (700) fail
> 0: RX (004/003)  2A5#00 00 85 9A EF 54 34 5D
> 0: RX (004/002)  2A5#00 00 85 9A EF 54 34 5D

2 bad RX here

> 0: TX (003/002)  2A5#00 03 4F 8F 85 59 8E DA
> 0: RX (003/001)  2A5#00 01 7C 30 5C 7A 2D 1C
> 0: TX (002/001)  2A5#00 02 6A 8F 6C 81 C3 B0
> 0: RX (002/000)  2A5#00 00 AC AF 70 9B 32 03
> 0: TX (001/000)  2A5#00 01 7C 30 5C 7A 2D 1C
> 0: TX (000/000)  2A5#00 00 AC AF 70 9B 32 03
> 0: RX (004/003)  2A5#00 03 65 32 F8 E7 E6 F5
> 0: RX (004/002)  2A5#00 02 CC D5 09 FE 55 99
> 0: TX (003/002)  2A5#00 03 65 32 F8 E7 E6 F5
> 0: RX (003/001)  2A5#00 01 62 4F 17 34 44 CE
> 0: TX (002/001)  2A5#00 02 CC D5 09 FE 55 99
> 0: RX (002/000)  2A5#00 00 FE 58 FE FD C0 EF
> 0: TX (001/000)  2A5#00 01 62 4F 17 34 44 CE
> 0: TX (000/000)  2A5#00 00 FE 58 FE FD C0 EF
> 0: RX (004/003)  2A5#00 03 C9 7B EF 83 93 E0
> 0: RX (004/002)  2A5#00 02 DD 5E 82 B4 FD C4
> 0: TX (003/002)  2A5#00 03 C9 7B EF 83 93 E0
> 0: RX (003/001)  2A5#00 01 90 3B 32 80 90 67
> 0: TX (002/001)  2A5#00 02 DD 5E 82 B4 FD C4
> 0: RX (002/000)  2A5#00 00 8F 28 D2 F5 B6 98
> 0: TX (001/000)  2A5#00 01 90 3B 32 80 90 67
> 0: TX (000/000)  2A5#00 00 8F 28 D2 F5 B6 98
> 0: RX (004/003)  2A5#00 03 C5 1E FE 68 F1 65
> 0: RX (004/002)  2A5#00 02 7E 2B BA 18 F1 7B
> 0: TX (003/002)  2A5#00 03 C5 1E FE 68 F1 65
> 0: RX (003/001)  2A5#00 01 CE 1B D7 9E 42 15
> 0: TX (002/001)  2A5#00 02 7E 2B BA 18 F1 7B

> 0: RX (002/000)  2A5#00 00 85 9A EF 54 34 5D

properly received

> 0: TX (001/000)  2A5#00 01 CE 1B D7 9E 42 15

> 0: TX (000/000)  2A5#00 00 85 9A EF 54 34 5D

send

> 0: RX (004/003)  2A5#00 03 37 6D 66 8E C6 9B
> 0: RX (004/002)  2A5#00 02 2D 83 A3 D3 66 27
> 0: TX (003/002)  2A5#00 03 37 6D 66 8E C6 9B
> 0: RX (003/001)  2A5#00 01 E8 A5 9A C6 C1 AC
> 0: TX (002/001)  2A5#00 02 2D 83 A3 D3 66 27
> 0: RX (002/000)  2A5#00 00 E6 7A D0 27 3E DF
> 0: TX (001/000)  2A5#00 01 E8 A5 9A C6 C1 AC
> 0: TX (000/000)  2A5#00 00 E6 7A D0 27 3E DF
> 0: RX (004/003)  2A5#00 03 D4 54 CF 9A 6D 7A
> 0: RX (004/002)  2A5#00 02 06 3F 57 59 35 F6
> 0: TX (003/002)  2A5#00 03 D4 54 CF 9A 6D 7A
> 0: RX (003/001)  2A5#00 01 C1 F6 A6 E3 84 64
> 0: TX (002/001)  2A5#00 02 06 3F 57 59 35 F6
> Stopped. Ctrl-C to exit.
> 
> And the register dump

[...]

> mcp251xfd-dump did not work for me, but It looks as if the correct data is in the rx fifo.

With v5.18 the RAM layout changed, the mcp251xfd-dump tool was not
adopted. yet.

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: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux