I'm trying to setup CAN communication between the FRDM-K64f and the TWR-K60f120m with a TWR-SER board. I'm running the Flexcan example from the KSDK for the FRDM and the Flexcan example from MQX 4.2 for the TWR. I was wondering if there would be an issues hooking these two examples together? I know the MQX uses mailboxes from looking at the code, but I'm not sure if they will ruin the communication.
Hi Smith,
What do you mean " hooking these two examples together"?
if we need two CAN devices communicate, the two CAN interfaces must have same baud rate and can identify the correct ID.
the CAN demo under KSDK 2.0 package for FRDM-K64 is in loop-back mode. the exmaple sends a CAN Message from the Tx Message Buffer to the Rx Message Buffer throuth internal loopback interconnector in one device. We can not use it for two devices communication without modification.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
by "hooking these two examples together", I meant using them together. And I set the enableLookback variable to false in the KSDK demo. Was there any other modifications besides that for two device communication?
And are there any jumper setting I need to change for the TWR-SER board? I hooked it up to see if I could pick anything up on an oscilloscope, but didn't get anything.
Thanks by the way.
I just checked the schematic, TWR-SER has on board CAN transceiver but FRDM-K64 doesn't.
CAN point to point communication can work when both points have or haven't CAN transceiver.
But I highly suggest you have CAN transceiver for both sides completely match the CAN protocol. thus you need have a external CAN transceiver circuit for FRDM board.
after that, run program for each board. check if on chip CAN TX pin has signal when transmits, if no, check your code.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
I tried flexCAN example in FRDM k64F. Internal loop-back program was successful but when I run the interrupt mode method where I flashed flexCAN code in two FRDM k64F boards. One node being "a" and other being "b" as per the example.
Connection wise I connected both TX together, Rx together and a common ground. I did not use CAN transreceiver with either of the boards. But it was not successful. Am i missing something here?
IDE: MCU xpresso.
Thanks and Regards
Niranjan
Hi Niranjan,
This thread is from two years ago. we don't maintain it any more. Please create a new thread for your new question.
Appreciate your understanding.
Best Regards
Jennie Zhang
HI,
Thank you for the update. I have created a new thread:
https://community.nxp.com/thread/496759
It would be helpful if you can take a look into it.
Thanks and Regards
Niranjan
Hi,
Pls ignore my previous post. I got it working. The issue was with Transreceivers. Thank you for your inputs.
Regards
Niranjan