This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems with CAN Message Object 15 as general receive object

Hello!

I'm writing software for test equipment and have to handle a lot of different
CAN messages. (Controller: Infineon C167CR, Phytec Board, uVision 2)
So I used the message objects 1 - 14 for message sending and want now use
the last message object for receiving different messages.
It seem's to work, so I got an interrupt and an message on a LCD display, also
connected to the controller, but I have problems extracting the message ID
of the received message.
I use the arbitration register of message object 15 and try to extract out the
ID with the following code:
(The layout of the arbitration register is described in chapter 18 of the C167
User's Manual by Infineon, I use standard CAN - 11 Bit IDs!)

RCV_ID = CAN_MSGOBJ[15].arbitr;
RCV_ID = (RCV_ID & 0xE0FF0000) >>13;
temp = (RCV_ID >> 16) & 0x00000007;
RCV_ID = (RCV_ID | temp) & 0x000007FF;

But the RCV_ID has always the value "0".

Has anyone a hint for me or done the same before?

Thanks in advance!
SVEN