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.

48 lines
1.8 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #!/bin/bash
  2. ifconfig can1 down
  3. #ip link set can1 up type can bitrate 125000 loopback off triple-sampling on restart-ms 100 dbitrate 125000 berr-reporting on fd on
  4. #
  5. #Bit timing parameters for flexcan with 24.000000 MHz ref clock
  6. #nominal real Bitrt nom real SampP
  7. #Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error CAN_CTRL
  8. #1000000 83 4 4 3 1 2 1000000 0.0% 75.0% 75.0% 0.0% 0x011a0003
  9. # 800000 83 5 6 3 1 2 800000 0.0% 80.0% 80.0% 0.0% 0x012a0004
  10. # 500000 125 6 7 2 1 3 500000 0.0% 87.5% 87.5% 0.0% 0x02310005
  11. # 250000 250 6 7 2 1 6 250000 0.0% 87.5% 87.5% 0.0% 0x05310005
  12. # 125000 500 6 7 2 1 12 125000 0.0% 87.5% 87.5% 0.0% 0x0b310005
  13. # 100000 625 6 7 2 1 15 100000 0.0% 87.5% 87.5% 0.0% 0x0e310005
  14. # 50000 1250 6 7 2 1 30 50000 0.0% 87.5% 87.5% 0.0% 0x1d310005
  15. # 20000 3125 6 7 2 1 75 20000 0.0% 87.5% 87.5% 0.0% 0x4a310005
  16. # 10000 6250 6 7 2 1 150 10000 0.0% 87.5% 87.5% 0.0% 0x95310005
  17. #
  18. #
  19. #[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
  20. # [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
  21. # phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
  22. #
  23. # [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |
  24. # [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1
  25. # dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]
  26. #
  27. # [ loopback { on | off } ]
  28. # [ listen-only { on | off } ]
  29. # [ triple-sampling { on | off } ]
  30. # [ one-shot { on | off } ]
  31. # [ berr-reporting { on | off } ]
  32. # [ fd { on | off } ]
  33. #
  34. # [ restart-ms TIME-MS ]
  35. # [ restart ]
  36. #
  37. ip link set can1 up type can bitrate 500000 restart-ms 100 loopback on triple-sampling on berr-reporting on
  38. ip -details -statistics link show can1
  39. ifconfig can1 up