Xmc 4500 can bus

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

cross mob
Not applicable
Hello all,
Issue: I want to be able to forward every message from one CAN BUS to another. I do not know the identifier of the messages coming in so I cannot simply add a bunch of identifiers to a CAN node.

Progress: So far I have two CAN nodes(CAN_0 , CAN_1) and both CAN nodes can receive data as well as transmit. However when I transmit data the identifier changes to the identifiers in CAN_0 and CAN_1.
My program operates like the following:

  • CAN node setup
  • Dave setup
  • Event handler for interrupt flags
  • interrupts occur if there is a message on CAN_0 or on CAN_1
  • After interrupt occurs, the approriate event is flagged; Read CAN_0 or CAN_1 message
  • Send CAN_0 message on CAN_1 or send CAN_1 on CAN_0


Any help is appreciated, Thank you
0 Likes
3 Replies
DRubeša
Employee
Employee
First solution authored First like received
HI ccox04,

I would suggest to use "Gateway" functionality of the CAN controller. Unfortunately, it won´t work right of the bat while you need to handle setting the ID and data values from the unknown source, but I believe it should be feasible. What is gateway and how you can use it you can see in "MULTICAN_CONFIG_EXAMPLE_XMC47" and of course in the accompanying chapter describing gateway functionality in Reference Manual.

Best regards,
Deni
0 Likes
Not applicable
Thank you, I was able to make it work. Thanks!
0 Likes
DRubeša
Employee
Employee
First solution authored First like received
Cool,

always nice to hear that 🙂

Best regards,
Deni
0 Likes