This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMDX570LC43HDK:单个 CAN1的多个 CAN 接收回调

Guru**** 2380860 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/989234/tmdx570lc43hdk-multiple-can-reception-callback-for-single-can1

器件型号:TMDX570LC43HDK

如何在同一个 CAN1端口内接收不同的 CAN ID 消息?  

您能给出一个使用具有多个 CAN ID 的相同 CAN 1节点:canREG1的示例  

如何使用同一函数调用 "canMessageNotification"将中断用于 CAN Tx 回调?

如何为 轮询方法和 IRQ 方法调用 CAN 接收和发送?

示例将非常有用。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    TMS570LC43x 具有4个 DCAN 模块、每个 DCAN 模块最多支持64个邮箱。  

    [引用 userid="478029" URL"~/support/microcontrollers/other/f/other-microcontrollers-forum/989234/tmdx570lc43hdk-multiple-can-reception-callback-for-single-can1 ]\n 如何在同一个 CAN1端口内接收不同的 CAN ID 消息。?  [/报价]

    您可以为具有不同消息 ID 的消息使用不同的邮箱。 或

    您可以配置邮箱的 ID 掩码(canREG1->IF1MSK)以接收具有不同 ID 的邮件。 MASK[28:0]的位可以设置为0或1。) 表示消息标识符中的相应位不用于接受过滤。

    消息 ID 的第1位将被接受滤波器忽略、因此这个邮箱可以接收 ID 为0x5A0~0x5AF 的消息

    [引用 userid="478029" URL"~/support/microcontrollers/other/f/other-microcontrollers-forum/989234/tmdx570lc43hdk-multiple-can-reception-callback-for-single-can1 "]如何使用相同的函数调用 "canMessageNotification"?[/quot]为 CAN Tx 回调使用中断

    CANTransmit()可用于 TX 数据,当帧成功发送时,会生成 TX 中断。  

    [引用 userid="478029" URL"~/support/microcontrollers/other/f/other-microcontrollers-forum/989234/tmdx570lc43hdk-multiple-can-reception-callback-for-single-can1 ]]如何调用 CAN 接收 和传输轮询方法和 IRQ 方法?

    如果 RXIE 被使能、RX 中断在一个 CAN 帧被成功接收后产生。 您可以在 canMessageNotification()中读取该帧。

    如果没有启用 RXIE、在从 CAN 报文 RAM 中读取数据之前、需要查询状态(NWDATx 寄存器)。  canIsRxMessageArrived()可用于检查状态。