AcroPack Series AP560
CAN Bus Interface Module
- 59 -
HI-3111 Receive Buffers and Frame Acceptance Filters
Receive Buffers
The HI-3111 has an extremely flexible receive buffer and ID filter scheme.
Acceptance filters and masks may only be programmed when the device is
in Initialization Mode.
The basic concept is shown in Figure 10. All valid
received messages (both standard or extended frames) are stored in the
temporary receive buffer before passing through the filter bank. The host can
read the temporary receive buffer using commands 0x42 or 0x44 (see Table
29). The filter bank must be enabled by setting the FILTON bit in Control
Register, CTRL1. The default after reset is FILTON = 0, which disables the filter
bank and stores every valid message received in the FIFO. With filtering
enabled, it is possible to filter up to eight extended identifiers plus the first
two associated data bytes. Any filtered messages will be passed to the receive
FIFO. Up to eight messages can be stored in the receive FIFO. All valid
received messages have a 16-bit time tag appended following transmission of
the ACK bit. The user can decide to retrieve the time tag or not via dedicated
instructions (see Table 29).
Filter and Mask ID Format
The HI-3111 allows filtering of up to 8 unique extended frames with the first
two data bytes. Filtering is enabled by setting the FILTON bit in Control
Register 1, CTRL1. It the FILTON bit is not set, then filtering is globally disabled
and all CAN IDs are accepted.
There is a specific instruction for loading and reading each filter and mask.
The format is the same for both standard and extended IDs and is shown in
Table 33 and Table 34. Bits specific to Extended IDs should be written as zeros
for Standard IDs. The filter mechanism works by comparing the filter ID to the
CAN message ID. If the corresponding bit in the mask ID is logic one, then the
CAN ID bit must match the filter ID for acceptance to occur. If a mask ID bit is
logic zero, then acceptance will occur regardless of the value of the CAN ID
bit. In this case, the filter bits are don’t care.
Following reset, all eight filter and mask registers should be loaded before
enabling the FILTON bit.
Note that the following reset,
filter, and mask bits
are not reset,
therefore the FILTON bit may be set to enable filtering using
the pre-reset mask and filter values.
Reading the Receive Buffers
Table 29 summarizes the instructions for reading the receive buffers. The host
has a choice of retrieving a message with a 16-bit time tag or not. The receive
data format is shown in Table 35. The first data byte identifies whether the
frame was standard or extended format and the FILHIT2:0 bits identify which
filter passed the message; <000> to <111>. If more than one filter passed the
message, the lowest value will be given priority and be identified by the
Summary of Contents for AcroPack AP560
Page 28: ...AcroPack Series AP560 CAN Bus Interface Module 28 Figure 2 Standard Data Frame...
Page 30: ...AcroPack Series AP560 CAN Bus Interface Module 30 Figure 3 Extended Data Frame...
Page 32: ...AcroPack Series AP560 CAN Bus Interface Module 32 Figure 4 Remote Frame...
Page 34: ...AcroPack Series AP560 CAN Bus Interface Module 34 Figure 5 Error Frame...