accessory:add-on_boards:canfdboard

CAN FD (Flexible Data rate) Add on Board

This board is designed to provide CAN FD (CAN with Flexible Data rate) control to ODROID single board computers, it is easily attachable to GPIO headers and accessible through SPI bus.

Form Factor Board dimension : 39 (L) x 19 (W) x 21 (H) mm
I/O 1x CAN bus
SIGNAL GPIO PIN #
MOSI 19
MISO 21
SCK 23
#CS 24
#INT 11
#RST 13
+5V 2
+3.3V 1
GND 6, 9, 14, 20

This board is only supported with the Linux kernel versions in the list.

  • 5.10.160
  • 5.15.x (upcoming)
  • 6.1.x (upcoming)
  • 5.15.x (upcoming)
  • 6.1.x (upcoming)

In order to load and run this module, canfd0 needs to be added to the line starts with overlays in /boot/config.ini. For example,

...
overlays="i2c0 i2c1 canfd0"
...
This CAN hardware module is connected through SPI bus, so you will need to remove or correct the device tree files in order to manage correct SPI bus setup with other SPI based peripherals.

Then the driver mcp251xfd is loaded on next booting,

odroid@server:~$ lsmod
Module                  Size  Used by
mcp251xfd              32768  0
can_dev                24576  1 mcp251xfd

And your board will have new network device can0 when the module is successfully recognized.

odroid@server:~$ ip -details -statistics link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc fq_codel state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can <FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
          bitrate 500000 sample-point 0.875 
          tq 50 prop-seg 17 phase-seg1 17 phase-seg2 5 sjw 1
          rockchip_canfd: tseg1 1..128 tseg2 1..128 sjw 1..128 brp 1..256 brp-inc 2
          dbitrate 4000000 dsample-point 0.720 
          dtq 10 dprop-seg 8 dphase-seg1 9 dphase-seg2 7 dsjw 1
          rockchip_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..256 dbrp-inc 2
          clock 200000000 
          re-started bus-errors arbit-lost error-warn error-pass bus-off
          0          0          0          0          0          0     numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX: bytes  packets  errors  dropped overrun mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0       

When you have can0 network device, you can enable/disable it and change its protocols using the command ip.

odroid@server:~$ sudo ifconfig can0 down
odroid@server:~$ sudo ip link set can0 type can bitrate 500000 dbitrate 4000000 fd on
odroid@server:~$ sudo ifconfig can0 up
  • accessory/add-on_boards/canfdboard.txt
  • Last modified: 2023/11/14 12:07
  • by luke.go