Whats wrong with transmit CAN message on my TWR-K60D100M application

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

Whats wrong with transmit CAN message on my TWR-K60D100M application

874 次查看
yarannan
Contributor III

As the thread topic above, i modified my code based on flexcan_uart demo since i dont use UART at all for my application. I would like to CAN can transmit message to

another device and also receive message from others ideally. Currenlty, my code is running a loop back test. Even loop-back test, the transmitting function wont work.

I try to debug and it never return back to main after it gets into FLEXCAN_SEND(..). Anybody know what I did wrong? I am really new to embedded programming.

Original Attachment has been moved to: main.c.zip

0 项奖励
回复
4 回复数

634 次查看
yarannan
Contributor III

Apparently, even flex_uart demo application is not working on my board.

"Transmit send configuration failed. result: 0x5". It is the exact same answer that I got from my previous post.

I followed user guide that i should connect each two pins of J5, J7 on the secondary board, and I dont know why.

Does anybody have any thought?

0 项奖励
回复

634 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I am not sure if you are using Kinetis 100MHz silicon V1.x example code. That sample code includes FlexCAN loopback demo and sci2can demo.

For Kinetis 100MHz products with two silicon version, V1.x and V2.x.  TWR-K60D100M board is using Silicon 2.x , while TWR-K60N512 is using Silicon 1.x.

The FlexCAN module without any modification with two silicon versions.

So, I attached Kinetis 100MHz silicon V1.x example code here for your reference.

If it is possible, you also could post your refered <flexcan_uart> demo, and I could check it on my site.

Wish it helps.


Have a great day,
best regards,

Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

634 次查看
yarannan
Contributor III

Thanks for replying. Please see the attached code above. Thats is sample code that i found from KSDK, and i will take a look at your code.

Yaran

0 项奖励
回复

634 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Yaran,

For I have only one TWR-IND-IO board on my hand, I had test two case: 1> two TWR-K60D100M boards with two TWR-SER boards 2> two TWR-K60D100M boards with one TWR-IND-IO and one TWR-SER boards. Both cases can works with <flexcan_uart> demo within Kinetis SDK V1.1.0.

Please check my attached pictures about boards connections.

connection 1.png

connection 2.png

And please check the video file about detailed test info.

Customer should short TWR-IND-IO board jumper J13 to provide CAN bus feedback resistor.

And customer need do below modification at TWR-IND-IO board:

1.png

Wish it helps.


Have a great day,
best regards,

Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复