You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/bash
ifconfig can1 down
#ip link set can1 up type can bitrate 125000 loopback off triple-sampling on restart-ms 100 dbitrate 125000 berr-reporting on fd on
##Bit timing parameters for flexcan with 24.000000 MHz ref clock#nominal real Bitrt nom real SampP#Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error CAN_CTRL#1000000 83 4 4 3 1 2 1000000 0.0% 75.0% 75.0% 0.0% 0x011a0003# 800000 83 5 6 3 1 2 800000 0.0% 80.0% 80.0% 0.0% 0x012a0004# 500000 125 6 7 2 1 3 500000 0.0% 87.5% 87.5% 0.0% 0x02310005# 250000 250 6 7 2 1 6 250000 0.0% 87.5% 87.5% 0.0% 0x05310005# 125000 500 6 7 2 1 12 125000 0.0% 87.5% 87.5% 0.0% 0x0b310005# 100000 625 6 7 2 1 15 100000 0.0% 87.5% 87.5% 0.0% 0x0e310005# 50000 1250 6 7 2 1 30 50000 0.0% 87.5% 87.5% 0.0% 0x1d310005# 20000 3125 6 7 2 1 75 20000 0.0% 87.5% 87.5% 0.0% 0x4a310005# 10000 6250 6 7 2 1 150 10000 0.0% 87.5% 87.5% 0.0% 0x95310005#
##[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |# [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1# phase-seg2 PHASE-SEG2 [ sjw SJW ] ]## [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |# [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1# dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]## [ loopback { on | off } ]# [ listen-only { on | off } ]# [ triple-sampling { on | off } ]# [ one-shot { on | off } ]# [ berr-reporting { on | off } ]# [ fd { on | off } ]## [ restart-ms TIME-MS ]# [ restart ]#
ip link set can1 up type can bitrate 500000 restart-ms 100 loopback on triple-sampling on berr-reporting on
ip -details -statistics link show can1
ifconfig can1 up
|