ARM Technical Support Knowledge Articles

CAN MESSAGE 15 MASKING

Applies to: RTX166 Real-time Kernel

Answer

QUESTION

Can I use the masking capability of the last C167 CAN message object in RTX166?

ANSWER

Yes. The following CAN routines were added to the RTX166 CAN library after manuals were printed.

unsigned char can_def_last_obj (
  unsigned long last_msg_mask,
  unsigned char data_length);

This library call allows you to define the masking attributes of message object 15 for 11-bit identifiers.

last_msg_mask is the mask. For example, if last_msg_mask is set to 0x300, all CAN messages with ID 0x11 xxxx xxxx will be received (as long as they are not defined in message objects 1-14).

data_length is the message length.

unsigned char can_def_last_obj_ext (
  unsigned long last_msg_mask,
  unsigned char data_length);

This library call allows you to define the masking attributes of message object 15 for 29-bit identifiers.

last_msg_mask is the mask. For example, if last_msg_mask is set to 0x0F000000, all CAN messages with ID 000x 1111 xxxx xxxx xxxx xxxx xxxx xxxx will be received (as long as they are not defined in message objects 1-14).

data_length is the message length.

To receive all messages not defined in message objects 1-14, last_msg_mask should be set to zero (standard: 0x000, extended: 0x00000000).

Article last edited on: 2001-01-08 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential