CAN TWR-K60F120M

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CAN TWR-K60F120M

跳至解决方案
1,040 次查看
ivanrobles
Contributor III

Hi I´m trying to test CAN module in this Tower and I will want to see the signal transmission on the oscilloscope, I tested the example SCI2CAN with the teminal and works it, this example is in loppback mode and self reception mode, but I want to change that mode in normal mode and I want to make a bridge with CANTX1 and CANRX1 for test it. Can it test in normal mode when I make a bridge?

标签 (1)
0 项奖励
1 解答
520 次查看
santiago_gonzal
NXP Employee
NXP Employee

Hello Ivan,

CAN is a complex protocol, so you can not simply connect Tx to Rx to make a loop. That's the reason of the self loopback mode, to test the rest of the code without worring about CAN.

Together with the SCI2CAN code there is a "can_loopback_node" example that will allow you to do what you are asking for, to see the signals in the oscilloscope by making a connection between two Kinetis modules. But you will need another TWR kit.

I have also edited the SCI2CAN example to add CAN2SCI functionality. That allows me to send data through SCI to the SCI2CAN module and the other one will receive it through CAN and repeat it on his own UART. That would be another option of testing.

Regards,

Santiago

在原帖中查看解决方案

0 项奖励
3 回复数
520 次查看
santiago_gonzal
NXP Employee
NXP Employee

Hello Ivan,

I have replied you by private, but just in case anyone else reads this:

To communicate between two TWRs you can not use the loopback example, because it will create an internal loopback in the transceiver and you won't see anything in the CAN bus.

You need to implement your own CAN2SCI function. The good thing is that the CAN2SCI example provided by Freescale already has implemented all the CAN methods that you need.

Regards,

Santiago

0 项奖励
521 次查看
santiago_gonzal
NXP Employee
NXP Employee

Hello Ivan,

CAN is a complex protocol, so you can not simply connect Tx to Rx to make a loop. That's the reason of the self loopback mode, to test the rest of the code without worring about CAN.

Together with the SCI2CAN code there is a "can_loopback_node" example that will allow you to do what you are asking for, to see the signals in the oscilloscope by making a connection between two Kinetis modules. But you will need another TWR kit.

I have also edited the SCI2CAN example to add CAN2SCI functionality. That allows me to send data through SCI to the SCI2CAN module and the other one will receive it through CAN and repeat it on his own UART. That would be another option of testing.

Regards,

Santiago

0 项奖励
520 次查看
ivanrobles
Contributor III

Hi Santiago.

Right Now I have 2 Towers (TWR-K60F120M and TWR-K60D100M) with respectively tower serial TWR-SER. But I tested the example sci2can Twrk60f120m with can_loopback_node twr-k60d100m, both towers aren´t communicating. I sent you an e-mail told you what is the issue.

Regards,

Ivan

0 项奖励