Hello everyone ,
I use TWR-K0D100m board , CW10.6
When run the demo "sci2can" under CW , it can work well .
While when i disable the Loopback :
#define FLEXCAN_SELF_RECEPTION | 0 |
#define FLEXCAN_LOOP_BACK | 0 | /* loop back for single node: 0 -- no loopback, 1 -- loopback */ |
the send function can not send to another CAN node.
I do as this : first refer to the demo project "can_loopback_node" , use two TWR-K60 board refer to the readme,
one NODE send , one recieve , the send MB have the data i send , while the receive MB of receive node can not receive data.
Then i use one board with one can -usb connect to the pC , when I use pc send data , the can on board can receive , while
when the board send , the PC can not see the data , even thought the have not enter into send interrupt .I don't know why.
Could some one can test this demo on your side ? Thank !
And the attachment is the project i test the send function to PC, it failed .
Thank very much !
Original Attachment has been moved to: sci2can.zip
Hi fan xy,
If you are using TWR-K60D100M board, you can refer to our KSDK1.3.0, there has the according CAN_network sample code.
After install the KSDK1.3.0, you can find the code in path: C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\driver_examples\flexcan\flexcan_network
Please refer to this code, this code can work ok on the TWR-K60D100 board.
Wish it helps you!
If you still have question, please contact with me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Jingjing,
Thank for your help.
And i use the CW10.6, it not support KSDK, and i also do not like KSDK , for the driver too complex.
Now, i refer to the readme under CW10.6 to run the demo , this one : Freescale\CW MCU v10.6.4\MCU\CodeWarrior_Examples\Kinetis_Examples\doc\can_loopback_node.txt I can see nothing in the J7 on the TWR-SER from oscilloscope.
And i also test other CAN demo which disable the lookback mode , and also see nothing int he CAN PIN..
So i thin maybe some jumper on my board especially the TWR-SER have some error , could you help me test the demo under CW and show me a picture about how
about the jumper on your board when you run it , thank !
BR
fan
Hi fan_xy,
Take care, the code in Freescale\CW MCU v10.6.4\MCU\CodeWarrior_Examples\Kinetis_Examples for K60 is supporting the TWR_K60N512, not TWR_K60D100.
The chip on the TWR_K60N512 is the 1.x silicon chip, but the chip on TWR_K60D100 is the 2.x silicon chip, there have a lot of differences between these two chips. For details, please refer to this document:
http://cache.nxp.com/files/32bit/doc/app_note/AN4445.pdf?fsrch=1&sr=1&pageNum=1
If you debug the code in the CW install path directly on your TWR-K60D100, you will find, maybe your code will enter in the hardfault with TWR_K60D100.
If you want to refer to this codewarrior sample code, you must create a code for K60DN512VMD10, not MK60DN512ZVMD10. Under the codewarrior install path, there has no code for TWR-K60D100.What we have is the KSDK1.3.0 CAN code for TWR-K60D100, besides, you can refer to :C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K60N512\CAN use the PE CAN_LDD to configure a TWR-K60D100 code.
About the TWR-SER modules jumper configuration, please do it like this :
Short J5(1-2), J5(3-4), J5(5-6), J5(7-8), and J5(9-10) to enable CAN connection.
Wish it helps you!
If you still have question, please contact with me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------