IBASE Technology RP-103-SMC User Manual page 99

Carrier board for rm-n8/rm-n8m/rm-n8mmi smarc2.0 cpu module
Table of Contents

Advertisement

13. CAN Test
Checking CAN GPIO
#config can pin to gpio
/home/root/testscript/can/memtool -32 0x20e0208 = 5
echo "106" > /sys/class/gpio/export
#config gpio to out mode
echo "out" > /sys/class/gpio/gpio106/direction
#set gpio to 1
echo 1
> /sys/class/gpio/gpio106/value
#set gpio to 1
echo 0
> /sys/class/gpio/gpio106/value
#config gpio to in mode
echo "in" > /sys/class/gpio/gpio106/direction
#get gpio value
ret0_0=`cat /sys/class/gpio/gpio106/value`
Testing CAN
#config can parrameter
ip link set can0 type can bitrate 125000 triple-sampling
on
#enable can
ifconfig can0 up
#disable
ifconfig can0 down
#send data
cangen can0 &
#receive data
candump -n 10 can1 -T 5000
RP-103-SMC User Manual
Appendix
91

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RP-103-SMC and is the answer not in the manual?

Subscribe to Our Youtube Channel

Related Products for IBASE Technology RP-103-SMC

Table of Contents