User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 574
UG585 (v1.11) September 27, 2016
Chapter 18: CAN Controller
tBIT_RATE = tSYNC_SEGMENT + tTIME_SEGMENT1 + tTIME_SEGMENT2
freqBIT_RATE = freqCAN_REF_CLK / ((can.BRPR[BRP] + 1) * (3 + can.BTR[TS1] + can.BTR[TS2]))
TIP: A given bit-rate can be achieved with several bit-time configurations, but values should be
selected after careful consideration of oscillator tolerances and CAN propagation delays. For more
information on CAN bit-time register settings, refer to the CAN 2.0A, CAN 2.0B, and ISO 11898-1
specifications.
Bitstream Processor
The bitstream processor (BSP) module performs several functions while sending and receiving CAN
messages. The BSP obtains a message for transmission from either the TxFIFO or the TxHPB and
performs the following functions before passing the bitstream to the BTL.
Serializing the message
Inserting stuff bits, CRC bits, and other protocol defined fields during transmission
During transmission the BSP simultaneously monitors Rx data and performs bus arbitration tasks. It
then transmits the complete frame when arbitration is won, and retrying when arbitration is lost.
During reception the BSP removes stuff bits, CRC bits, and other protocol fields from the received
bitstream. The BSP state machine also analyses bus traffic during transmission and reception for
Form, CRC, ACK, Stuff, and Bit violations. The state machine then performs error signaling and error
confinement tasks. The CAN controller does not voluntarily generate overload frames but does
respond to overload flags detected on the bus.
This module determines the error state of the CAN controller: error active, error passive or bus-off.
When Tx or Rx errors are observed on the bus, the BSP updates the transmit and receive error
counters according to the rules defined in the CAN 2.0 A, CAN 2.0 B and ISO 11898-1 standards.
Based on the values of these counters, the error state of the CAN controller is updated by the BSP.
18.2.7 CAN0-to-CAN1 Connection
The I/O signals of the two CAN controllers in the PS can be connected together. In this mode, the RX
signal of one CAN controller is connected to the TX signal of the other controller. These connections
are enabled using the slcr.MIO_LOOPBACK [CAN0_LOOP_CAN1] bit.
18.3 Programming Guide
18.3.1 Overview
The controller has several operating modes and different ways to receive and transmit messages. The
low-level functions were described in 18.2 Functional Description. The system-level operations are
described in section 18.4 System Functions.