当前位置:   article > 正文

NVIDIA AGX Xavier与外部设备CAN通信波特率不匹配:修改pllaon时钟源_devmem 0x0c303000 32 0x0000c400

devmem 0x0c303000 32 0x0000c400

摘要

在使用AGX开发套件与传感器进行CAN通信的时候,发现收不到信息。最后发现是波特率不匹配,传感器的波特率是500k,AGX的波特率始终有误差,需要使用更精确更高速的时钟源。本文将会介绍此问题的现象和解决方法。

AGX的CAN模块配置

创建脚本can_enable.sh,并设置开机自动运行(ubuntu开机自启动
主要内容

#!/bin/bash
#
# can_enable.sh
sudo busybox devmem 0x0c303000 32 0x0000C400
sudo busybox devmem 0x0c303008 32 0x0000C458
sudo busybox devmem 0x0c303010 32 0x0000C400
sudo busybox devmem 0x0c303018 32 0x0000C458

sudo modprobe can
sudo modprobe can_raw
sudo modprobe mttcan

sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on restart-ms 100
sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on restart-ms 100

sudo ip link set up can0
sudo ip link set up can1

sudo ifconfig can0 txqueuelen 1000
sudo ifconfig can1 txqueuelen 1000
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

硬件连接

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/55215
推荐阅读
相关标签
  

闽ICP备14008679号