I am trying to use CAN FD on imx6 ixora BD.

I am trying to use CAN FD on imx6 ixora BD.
It seems to support IFI CAN_FD IP and Renesas R-Car CAN FD controller in CAN Device Drivers.
How do I use this driver? Can I get bitten by CAN0 or CAN1?
Or do I have to use CAN transceiver with CAN SPI?

It seems to support IFI CAN_FD IP and Renesas R-Car CAN FD controller in CAN Device Drivers.

Do you mean you just see those in kernel config? Or indeed already bought IP from Renesas and have FPGA already wired to iMX6 to compile and build that IP as your own hardware. If you have them, then I guess you should consult Renesas how to proceed.

If not, then there are simpler options: a) upgrade to iMX8. Not to every kind of iMX8, but to one which has CAN FD capable FlexCAN, please check which ones are CAN FD capable, b) use Microchip SPI controller like MCP2517FD or MCP2518FD.

Thank you for answer.
A FIFO buffer overflow issue occurred in the vehicle. It seems to be the issue in the link below, but I wonder if it is an issue that can be resolved. Or is there no problem with IMX8?

https://www.toradex.cn/community/questions/60859/mcp2517fdmcp2518fd-can-controller-driver-errors-on.html

The SPI baud rate doesn’t seem to be able to withstand the comm traffic.

Hi @rynforce

We are working to resolve the issue which is related to the MCP2518FD and the SPI block of iMX8.

The SPI baud rate doesn’t seem to be able to withstand the comm traffic.

It depends on your requirements. What baudrate and throughput do you need to achieve?

Thanks and best regards,
Jaski

Both, FlexCAN in CAN FD mode (longer maximum payload size reduces buffers count dramatically) and MCP25xxFD have too small for Linux amount of receive buffers, especially at high arbitration bit rates. Both have enough buffers for bare metal CAN applications, but too low to match Linux worst case interrupt latency. Secondary Cortex M4/M7 core is your friend here, try moving CAN high priority tasks to Cortex M. Even without C-M but with proper coding it is possible on Linux + dual core or faster CPU like iMX7D or better to read and process all possible MCP25xxFD receive CAN traffic up to 1Mbps arbitration bitrate (data bit rate doesn’t matter). I didn’t try FlexCAN FD mode from Linux.

bitrate 500000, datarate 2000000, sampling 70%,
about 50 messages are repeatedly transmitted every 100~200ms.