AXIOMTEK SCM188 User Manual page 39

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

Advertisement

3.5.1.9 CAN
The SCM188 with SCB184 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 SCM188 with SCB184 platform CAN port to another SCM188 with SCB184
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
SCM188 BSP User Guide
SCM188 NXP i.MX 8M Plus ARM-based SMARC Module
device interrupt 39
35

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents