Xmc-4500 can

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

I work with CAN. I have two XMC4500 Relax Kits. I attached a CAN transceiver to each of them. I also connected a two-wire cable between CAN transceivers. This is my hardware platform - a simple, two-node CAN network. Then I prepared software using DAVE 3 and programmed microcontrollers. Network works fine - first board is able to send a CAN message, second board is able to receive CAN message. However, I have a two questions related to XMC-4000 CAN and I cannot find answears for them, so I would like to ask You for help.

1)
There is an information on Infineon web site (not only there), that XMC-4000 are equipped with up to 3 CANs (XMC-4500). However, XMC-4500 Reference Manual says, that XMC-4500 MultiCAN can contain between two and eight CAN nodes (chapter 18.1.2). Could You please tell my which information is true? If both of them, how to interpret each of them?

2)
In my software I used one CAN001 Dave App. To be able to both transmit and receive CAN messages, I created two message objects: LMO1 to transmit and LMO2 to receive. For each of them it is necessary to write an identifier (they cannot be left with null value, I mean blank). When I put an identifier for LMO2, I am able to receive only messages with this identifier. I would like to receive messages with all identifiers. I am sure CAN supports this. How can I do this?

Thanks
Szymon Panecki
0 Likes
7 Replies
ron
Employee
Employee
Hello,

1)
There is an information on Infineon web site (not only there), that XMC-4000 are equipped with up to 3 CANs (XMC-4500). However, XMC-4500 Reference Manual says, that XMC-4500 MultiCAN can contain between two and eight CAN nodes (chapter 18.1.2). Could You please tell my which information is true? If both of them, how to interpret each of them?

The Reference Manual describes the module capability, means the minimal and maximal configuration. The Datasheet describes the implementation of the device. For XMC4500 you can use up to 3 CAN nodes. For example XMC4400 you can use up to 2 CAN Nodes. So the Datasheet is giving the device specific numbers of CAN nodes.

2)
In my software I used one CAN001 Dave App. To be able to both transmit and receive CAN messages, I created two message objects: LMO1 to transmit and LMO2 to receive. For each of them it is necessary to write an identifier (they cannot be left with null value, I mean blank). When I put an identifier for LMO2, I am able to receive only messages with this identifier. I would like to receive messages with all identifiers. I am sure CAN supports this. How can I do this?

To receive messages with all identifiers you have to setup the Acceptance Mask to 0. With this Bit field you do the filtering of what message ID you want to receive. You can setup for a range of ID’s or even all ID’s.
0 Likes

hello every one!!

@ron  @User8282 @User13817  "You can setup for a range of ID’s "

can you please give an example to set the range of messages 

thanks in advance

Bandari Karthik Kumar
0 Likes
Not applicable
Hello ron, thank You very much for answears to my questions.
0 Likes
Not applicable
Hello,

I'm also doing similar things and found there replies helpful.

Is it possible to also have TRANSMIT message id being not hard-coded via DAVE? I'd like to do something like:

CAN001_send_message(CANobj, /* msg id */ 0x123, &data); // send msg 0x123 instead of predefined id!
0 Likes
User8282
Level 1
Level 1
Anaconda wrote:
Hello,

I'm also doing similar things and found there replies helpful.

Is it possible to also have TRANSMIT message id being not hard-coded via DAVE? I'd like to do something like:

CAN001_send_message(CANobj, /* msg id */ 0x123, &data); // send msg 0x123 instead of predefined id!


Hello.

I want to do the same, that is, modify the message Id before sending it. Did you manage to do that. Is it possible?

Thanks very much in advance.
0 Likes
Not applicable
We are using the CAN001 App in one of our CANopen application examples.

To change the CAN message id and data we have defined a function CAN_Update_MO(Handle, MsgObjNr, Id, dlc, DataPtr)
Internally it calls CAN001_UpdateMODataRegisters() then it gets a pointer to the CAN registers like:

CAN_MO_TypeDef* CAN_MOxRegs = \
GET_MO_OFFSET((Handle->FirstMOMapping+(MsgObjnr-1)));
and using this pointer to change the arbitration register CAN_MOxRegs->MOAR.

CAN001_SendDataFrame() can than be used to transmit the updated message object.
0 Likes
User13817
Level 3
Level 3
Hello Szymon,

Is it possible to share your project?

Thanks in advance.
Best Regards,
Leonardo.
0 Likes