Hello,
I'm running into a problem when using the MK20DX256VLH7 microcontroller. On board, there is a CAN system that I am trying to utilize and have programmed the help code in process expert CAN_LDD. I followed the help examples to the point where I am transmitting, but it never receives anything, even in loopback. I have connected a second device that only listens, but still nothing is received on its end.
I'm using Kinetis Design Studio 3, and a Universal Debugger from PE Micro.
I've attached my code in the zip folder. I would appreciate any help I can get on this. I have some other stuff in the their for the project I'm working on, but it is the CAN bus right now that is the only thing I can't get to work properly.
I try to flash your project into TWR-K20D72M(MK20DX256VLL7) board with TWR-SER connected.
Modify the Loop mode to no and then generated code again.
The CAN analyzer is able to receive data.
The R25 and R26 should not be DNP, I have solder 0 resisters.
The CAN analyzer was connect to the singal output of TJA1050T(CANH and CANL).
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks Robin,
I actually found that the issue was due to the Mask Filtering I had set. Not sure why, but when I the filter is set to 0x7FF, the unit will not receive anything, even with matching Mask Filtering. I found this out using an external CAN device, which told me I had an Acknowledgment error. So while I was transmitting, it raised an error because it never received an ACK from anything else on the line. Everything else on the line was filtering the message out due to the masking and not responding. I changed this to 0x00 (allow everything) and now it works fine. I might play with some filtering later, but I can handle a simple check when I receive to make sure I got a message designated for the right device.
Thanks,