How to Start CAN Module Development on KDS v3.2.0 + Processor Expert

Showing results for 
Search instead for 
Did you mean: 

How to Start CAN Module Development on KDS v3.2.0 + Processor Expert

No ratings

How to Start CAN Module Development on KDS v3.2.0 + Processor Expert

- This document introduces how to develop a simple CAN module application on KDS, it is suitable for the beginners to start using the KDS and Processor Expert, and it mainly focus on how to developing a CAN Loopback application, how to use the “Typical Usage” of “help on component”.

- About the Sending or Receiving data demo(with interrupt or polling) we can find on  the "Typical Usage" of "help on component" .

- Pay attention that , in the Typical Usage code , the Transfer Message ID is 0x123u, while in the CAN_LDD default configuration , the Receive Message ID is 0x7FF, they are should be same . So we should change one of them (In standard frame format, the admissible range is from 0x00 to 0x7FF; in extended format, the range is from 0x00 to 0x1FFFFFFF ), on my project , I change the TX ID from 0x123u to 0x7FFu on the code, about the detail information,

please look at the document and application project.


This application hardware is TWR-K21F120M board, software is KDS v3.2.0 .

Labels (1)

I'm using KDS v3.2.0 with Process Expert and a FRDM-KE06.  I'm trying to send CAN data frames with extended 29 bit message IDs. Everything works fine if I use 11 bit standard message IDs, but if I set the frame message ID to a 29 bit extended frame, the message ID is truncated to 11 bits. I'm setting the message ID as follows:

Frame1.MessageID = 0x1401FFFF;

Frame2.MessageID = 0x1402FFFF;

Then sending message as follows:

Error_CAN = CAN1_SendFrame(CAN1_DeviceData, 1U, &Frame1);

Error_CAN = CAN1_SendFrame(CAN1_DeviceData, 2U, &Frame2);

When I monitor the CAN, I'm only seeing 0x7FF as the message ID for both messages. I've tried different CAN monitoring tools to rule that out. If I change the message IDs as follows:

Frame1.MessageID = 0x1;

Frame2.MessageID = 0x2;

...Then they show up with message IDs 0x1 and 0x2 respectively. 


My Message Buffers tab does not look the same as yours in PE. Here is a screenshot:


What do I need to do in order to send extended frame message IDs with PE and KDS 3.2.0?

I should have waited one more minute before posting. I found the problem. Posting in case anyone else runs into it. I found the answer in the help file under typical usage. For extended 29 bit IDs, they need to be set as follows:

Frame1.MessageID = (0x1401FFFF | LDD_CAN_MESSAGE_ID_EXT);

After doing this, it works as expected.

Version history
Revision #:
1 of 1
Last update:
‎04-25-2016 02:49 AM
Updated by: