Keil Logo

RTX166: CAN MESSAGE 15 MASKING

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).

Last Reviewed: Monday, January 8, 2001


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.