
GR716-DS-UM, May 2019, Version 1.29
214
www.cobham.com/gaisler
GR716
Only 2.0B Active is implemented.
25.4
Status and monitoring
The CAN interface incorporates status and monitoring functionalities. This includes:
•
Transmitter active indicator
•
Bus-Off condition indicator
•
Error-Passive condition indicator
•
Over-run indicator
•
8-bit Transmission error counter
•
8-bit Reception error counter
The status is available via a register and is also stored in a circular buffer for each received message.
25.5
Transmission
The transmit channel is defined by the following parameters:
•
base address
•
buffer size
•
write pointer
•
read pointer
The transmit channel can be enabled or disabled.
25.5.1 Circular buffer
The transmit channel operates on a circular buffer located in memory external to the CAN controller.
The circular buffer can also be used as a straight buffer. The buffer memory is accessed via the
AMBA AHB master interface.
Each CAN message occupies 4 consecutive 32-bit words in memory. Each CAN message is aligned to
4 words address boundaries (i.e. the 4 least significant byte address bits are zero for the first word in a
CAN message).
The size of the buffer is defined by the CanTxSIZE.SIZE field, specifying the number of CAN mes-
sages * 4 that fit in the buffer.
E.g. CanTxSIZE.SIZE =2 means 8 CAN messages fit in the buffer.
Note however that it is not possible to fill the buffer completely, leaving at least one message position
in the buffer empty. This is to simplify wrap-around condition checking.
E.g. CanTxSIZE.SIZE =2 means that 7 CAN messages fit in the buffer at any given time.
25.5.2 Write and read pointers
The write pointer (CanTxWR.WRITE) indicates the p1 of the last CAN message written to
the buffer. The write pointer operates on number of CAN messages, not on absolute or relative
addresses.
The read pointer (CanTxRD.READ) indicates the p1 of the last CAN message read from the
buffer. The read pointer operates on number of CAN messages, not on absolute or relative addresses.
The difference between the write and the read pointers is the number of CAN messages available in
the buffer for transmission. The difference is calculated using the buffer size, specified by the CanTx-
SIZE.SIZE field, taking wrap around effects of the circular buffer into account.
Examples: