CAN source address destination address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN source address destination address

627 Views
davidsa
Contributor I

My CAN receiver has a SA of 0x1ff, in your horrible documentation you refer to as TX_identifier.

I can receive messages from five different CAN connections. According to what ever the data

may be I may need to reply to separate Destination addresses. I do have the software running

with a specific TX_identifier and a specific RX_identifier and their assigned mailbox number.

1) Do I need a different mailbox for each address I need to reply to.

2) Is there a way to at will change the destination address I am trying to send a message to?

Tags (1)
0 Kudos
3 Replies

466 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi David:

I think you use a different mailbox for each address is a better solution to avoid conflict.

In freescale demo, there are two nodes, each node has a RX_identifier and TX_indentifier. So if you have five different CAN connections, you can define more nodes.

#if NODE==1

    RX_identifier = 0x123;

    TX_identifier = 0x321;

    RX_remote_identifier = 0x0F0;

    TX_remote_identifier = 0x00F;

#else if NODE ==2

    RX_identifier = 0x321;

    TX_identifier = 0x123;

    RX_remote_identifier = 0x00F;

    TX_remote_identifier = 0x0F0;

#else if NODE == 3

........

#endif

Regards

Daniel

0 Kudos

466 Views
davidsa
Contributor I

Thank you for the reply. So I would assume that each node would have its own

interrupt service routine and so on?

This of course would make the mask more difficult. For example if I receive a

message from CAN-ID 1ff and I need to reply to 1ff I cannot mask out 1ff so

I would be receiving my own message. How would I get around this?

David

0 Kudos

466 Views
danielchen
NXP TechSupport
NXP TechSupport

If I understand your requirements correctly, you can let different ID enter different mailbox. you do not need to use mask bits

Regards

Daniel

0 Kudos