This is a cache of https://discuss.96boards.org/t/can-bus-controller-support-in-hikey-970/5782. It is a snapshot of the page at 2024-11-01T09:19:27.727+0000.
CAN Bus/Controller support in Hikey 970 - HiKey - 96Boards Forum

CAN Bus/Controller support in Hikey 970

Hi,

It would be really helpful for me, if someone please provide info about

How to send/receive messages over CAN in Hikey 970?

Thanks,
Rahul

Hi @jainrahul1,

HiKey970 has the MCP2515 CAN transceiver connected to SPI0 and is enabled by default on the landing team kernel [1]. There is no official release image from Linaro for HiKey970 but you can find the debian and ubuntu images from Lemaker in product page [2]. These images are also based on the above referenced kernel, so CAN should be available by default. You can see the relevant can0 node by running the following command:

$ ifconfig -a

Then you can just follow the instructions for using MCP2515 over SocketCAN (There are plenty of references available online).

Thanks,
Mani

[1] https://github.com/96boards-hikey/linux/blob/hikey970-v4.9/arch/arm64/boot/dts/hisilicon/kirin970.dtsi#L1173
[2] Downloads for HiKey970 - 96Boards

@Mani Thanks a lot for information and quick response. I can see can0 in Lemaker image.