AXIOMTEK SCM186 User Manual page 40

Nxp i.mx 8m plus arm-based smarc module
Table of Contents

Advertisement

SCM186 NXP i.MX 8M Plus ARM-based Evaluation Kit
3.5.1.9 CAN
Herodotus supports the 2 CAN connectors. This section explains how to execute and test
CAN modules.
CAN2 CAN1
Note:
i.
can0 is mapping to CAN1, can1 is mapping to CAN2 on board.
ii.
Executing CAN receive command in receiver side before transmitting the data.
Connect the Herodotus platform CAN port to another Herodotus CAN port (it may be
either CAN1 or CAN2 port).
Set the bitrate and enable the CAN device, execute the below command.
sh-5.1#
ip link set <CAN_DEVICE> up type can bitrate <bitrate>
The bitrate supports up to 1000000.
To ensure the CAN network status, please execute the below command.
sh-5.1#
ifconfig
can0: flags=193<UP,RUNNING,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 38
can1: flags=193<UP,RUNNING,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
To receive the data and display in console, execute the below command.
sh-5.1#
candump <candev_no> &
candev_no 123 [4] AA BB CC DD
To transmit the data, execute the below command.
sh-5.1#
cansend <candev_no> 123#AABBCCDD
To disable the CAN modules, execute the below command.
Sh-5.1#
ifconfig <candev_no> down
34
device interrupt 39
Herodotus BSP User Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SCM186 and is the answer not in the manual?

Table of Contents