mcp251xfd on NXP LX2160A

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

 



Hi Folks,

Some time ago I have asked for help for mcp251xfd driver with an IMX7D, so I am somehow familar with the system.
The next iteration is with a NXP LX 2160A ... new hardware platform ... new kernel (6.1.1) ... new problems ;)

What is working : Driver is successfully initialised.
❯ sudo modprobe mcp251xfd
[ 4493.557075] mcp251xfd spi1.2 can2: MCP2518FD rev0.0 (-RX_INT -PLL -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD o:40.00MHz c:40.00MHz m:8.00MHz rs:8.00MHz es:0.00MHz rf:8.00MHz ef:0.00MHz) successfully initialized.

If I use a "wrong" interrupt for testing purposes (interrupt wont get it to the driver code), I am able to send one CAN Message from SPI CAN to LX2160A internal CAN (cangen/candump). Then the driver stuck.
This is more or less expected.

Enable the interrupt on the right pin (IRQ_LEVEL_LOW) does make some trouble. Driver is successfully initialised. If I bring up the interface (ip link set canx type can bitrate 500000 ; ip link set canx up)
I will get contineous errors:

.
.
. 
[  508.352616] mcp251xfd spi1.2 can2: CRC write error detected. CRC=0x6844.
[  508.362081] mcp251xfd spi1.2 can2: CRC write command format error.
[  508.368956] mcp251xfd spi1.2 can2: CRC write command format error.
[  508.375242] mcp251xfd spi1.2 can2: CRC write command format error.
[  508.381531] mcp251xfd spi1.2 can2: CRC write command format error.
[  508.387822] mcp251xfd spi1.2 can2: CRC write command format error.
[  508.394117] mcp251xfd spi1.2 can2: CRC write command format error.
[  508.400402] mcp251xfd spi1.2 can2: CRC write command format error.
[  508.406700] mcp251xfd spi1.2 can2: CRC write error detected. CRC=0x537f.
.
.
.

Since driver successfully initializes, no CRC read errors and sending a frame is working I assume SPI itself is okay.
/proc/interrupt shows only one additonal interrupt during a down / up cycle. This indicates that the interrupt is never cleared via SPI.
Since the error is a command error assuming the command is the one clearing the interrupt, that makes sense.
What can be the reason for the command format error ? Any ideas how to investigate further ?

BR
Niels






[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