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.

tms570ls3137 dcan掩码

请问如果把dcan掩码mdir设置为1,是怎么影响接收过滤的,我能接收到哪些message?

  • 这个建议您看一下下面文档的

    2.4 CAN Message Objects

    www.ti.com/.../spna131.pdf

    以及3.1 Configuring CAN Message Object to Transmit 和 3.2 Configuring CAN Message Object to Receive

    Mask中“1”对应的位是需要进行ID匹配的,所以Mask为0x000007FF,就是标准的11位ID匹配。

    Mask中“0”对应的位是表示忽略该位的ID匹配,如果某个接收邮箱Mask为0x000007FE,且ID设置为3,那么这个邮箱实际可以收到ID为1和3的报文。
  • 那在哪种情况下会用到mdir对传输方向过滤?
  • The Arbitration bits ID[28:0], Xtd, and Dir are used to define the identifier and type of outgoing messages and (together with the Mask bits Msk[28:0], MXtd, and MDir) for acceptance filtering of incoming messages.

    Mask Message Direction
    0 The message direction bit (Dir) has no effect on acceptance filtering.
    1 The message direction bit (Dir) is used for acceptance filtering.

    一般建议总是设置 MDir 为 1。忽略消息方向位是一项高级技术,必须谨慎处理。