Jetson TX2 AON SPE FreeRTOS CAN issue

目前在调试TX2 SPE R5-FreeRTOS CAN功能时遇到一些棘手的问题,请帮忙分析一下原因,具体如下:
L4T使用的是R32.5.1版本(L4T R32.5.1 Release Page | NVIDIA Developer

  1. Linux侧配置CAN0、CAN1时,均可正常使用(包括CAN-FD功能,挂在同一总线上测试,和外部其它设备均能正常通信);硬件PHY原理图如下。
    image

  2. AON-R5-FreeRTOS按官方文档(Jetson Sensor Processing Engine (SPE) Developer Guide: CAN Application (app/can-app.c) (nvidia.com))配置CAN功能后,用文档中的方法把CAN0、CAN1物理对接,例程中自发自收功能日志打印正常;使用示波器测量CAN速率是500K,但是波形、帧格式比较奇怪,大部分帧无法识别。
    image

  3. AON-R5-FreeRTOS侧配置CAN0、TX2 Linux侧配置CAN1(ip link set can1 type can bitrate 500000 dbitrate 2000000 fd on)。
    总线上只有TX2的CAN0、CAN1时:两侧均显示BUS ERR中断,无法互相接收&发送;
    总线上挂载其它设备时:Linux侧的CAN1可以和其它设备正常通信,R5侧的CAN0控制器连续报BUS ERR中断;
    FAQ:是否有验证过这种方式的通讯模式,或者其它非TX2平台是否可用?

其它补充:
基于最新SDK包(Jetson Linux R32.7.1)里的Free RTOS Sources 也试过了,效果一样;
目前看R5只能解析自己发出去的帧,无法和任何CAN设备通讯;
RM文档(Tegra X2 Series SoC Technical Reference Manual)只有部分的寄存器定义,无法进一步调试,是否可以提供一下全寄存器版的RM文档,帮助支持我们自查问题。

Hello,

AON-R5-FreeRTOS按官方文档(Jetson Sensor Processing Engine (SPE) Developer Guide: CAN Application (app/can-app.c) (nvidia.com))配置CAN功能后,用文档中的方法把CAN0、CAN1物理对接,例程中自发自收功能日志打印正常

Have you ever confirmed that the correct package can be received in one end?

使用示波器测量CAN速率是500K,但是波形、帧格式比较奇怪,大部分帧无法识别。

Can you share the waveform? Wrong clock, or bad quality?
Sure, CAN module in TX2 module is used widely, and we do not get any complaints about compatible issues. Most problems are from configurations and clocks.

是否可以提供一下全寄存器版的RM文档,帮助支持我们自查问题。

You can take a look at TX2 TRM, which provided detailed information about CAN module used in TX2.

35.2 References
• Bosch M_TTCAN Controller Specification, available from Bosch’s website: http://www.bosch-semiconductors.de
• Bosch M_TTCAN User’s Manual, available from Bosch’s website: http://www.bosch-semiconductors.de
• CAN 2.0 Specification
• CAN FD Specification

br
ChenJian

1、这是代码修改,只发送标准帧;

AON串口日志如下

2、waveform
这是解析的对的帧的波形图

这是错误的、解析出错的帧(AON错的帧占很多、同样的硬件在Linux这边没有这种的)




Hello,
From the waveform, I cannot see difference between ‘good’ and ‘bad’ cases. So, I think the basic configurations should be good.
Maybe there’re some other configs which are missed in SPE, like sample point?
You can check the MTTCAN registers and compare the settings in ‘good’ and ‘bad’ case.

br
Chenjian

1 Like

还是clock配置的问题,目前已经解决


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.