5 receive structure, Receive structure, Cp3bt26 – National CP3BT26 User Manual

Page 120

Advertising
background image

www.national.com

120

CP3BT26

buffer status field. With this lock function, software has the
capability to save several messages with the same identifier
or same identifier group into more than one buffer. For ex-
ample, a buffer with the second highest priority will receive
a message if the buffer with the highest priority has already
received a message and is now locked (provided that both
buffers use the same acceptance filtering mask).

As shown in Figure 51, several messages with the same ID
are received while BUFFLOCK is enabled. The filtering
mask of the buffers 0, 1, 13, and 14 is set to accept this mes-
sage. The first incoming frame will be received by buffer 0.
Because buffer 0 is now locked, the next frame will be re-
ceived by buffer 1, and so on. If all matching receive buffers
are full and locked, a further incoming message will not be
received by any buffer.

Figure 51.

Message Storage with BUFFLOCK Enabled

19.5

RECEIVE STRUCTURE

All received frames are initially buffered in a hidden receive
buffer until the frame is valid. (The validation point for a re-
ceived message is the next-to-last bit of the EOF.) The re-
ceived identifier is then compared to every buffer ID
together with the respective mask and the status. As soon
as the validation point is reached, the whole contents of the
hidden buffer are copied into the matching message buffer
as shown in Figure 52.

Note: The hidden receive buffer must not be accessed by
the CPU.

Figure 52.

Receive Buffer

The following section gives an overview of the reception of
the different types of frames.

The received data frame is stored in the first matching re-
ceive buffer beginning with buffer 0. For example, if the mes-
sage is accepted by buffer 5, then at the time the message
will be copied, the RX request is cleared and the CAN mod-
ule will not try to match the frame to any subsequent buffer.

10101010

01010

Received ID

GMASK

10101010

10101010

11111111

00000

00000000

00000000

11111111

00000

BMASK

BUFFER14_ID

Saved when buffer
is empty

Saved when buffer
is empty

Saved when buffer
is empty

Saved when buffer
is empty

00000000

00000000

XXXXXXXX

01010

10101010

10101010

XXXXXXXX

01010

BUFFER1_ID

BUFFER13_ID

10101010

10101010

XXXXXXXX

01010

10101010

10101010

BUFFER0_ID

XXXXXXXX

01010

10101010

10101010

DS035

Hidden

Receive

Buffer

CR16CAN

Buffer 0

BUFFER_ID

Buffer 13

BUFFER_ID

Buffer 14

BUFFER_ID

DS036

Advertising