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.

TMS570 CAN Polling 方式怎么设置

Hi 大家好:

         我现在的程序是中断发送和接收方式的。我想测试polling方式,现在就是想先把发送的轮询方式解决了。

         我发现,当我们给 IF1NO写值后(canREG1->IF1NO = 2;),TXRQX和TXRQ12相应的bit就会被set。

         如果我们是中断的话,那在进中断函数的时候,TXRQX和TXRQ12相应的位已经被reset。

         但是轮询的方式,是不会自动reset的。

         在第27.17.10 章说:

         The TxRqst bit in a specific message object can be set/reset by the CPU via the IF1/IF2 Message Interface Registers。我想

         知道在Polling情况下,我如果实现自己reset这些bit呢?

         整个原文如下:

         Transmission Request Registers (DCAN TXRQ12 to DCAN TXRQ78)

         These registers hold the TxRqst bits of the implemented message objects. By reading out these bits, the
         CPU can check for pending transmission requests. The TxRqst bit in a specific message object can be
         set/reset by the CPU via the IF1/IF2 Message Interface Registers, or by the Message Handler after
         reception of a remote frame or after a successful transmission.

         

谢谢

  • 可能是我的问题问的太不好理解了。我其实就是想知道:

          我在给 IF1NO写值后(如:canREG1->IF1NO = 2;),TXRQX和TXRQ12相应的bit就会被set。

          如果不用中断,怎么配置CAN控制器,才能实现:当数据正确发送成功后,TXRQX和TXRQ12相应的位被自动reset。

          我的例子,就是怎么也不reset,但是可以发送成功。

  • The bit of TXRQ12 (..TXRA78) will be reset when the data is transmitted successfully.

     数据一旦发送成功,这个寄存器中相关的bit就会被复位。

    Regards,

    QJ

  • 从datasheet上看是这样理解,但是我的程序就是没有reset,而数据已经被monitor接收到了,请帮我看看,谢谢!

    FirstTMS570CAN.rar