User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 572
UG585 (v1.11) September 27, 2016
Chapter 18: CAN Controller
Example: Program the AFMR and AFIR for Extended Frames
This example setups up the acceptance filter for extended frames. The Frame ID number is shown to
be 0x5DF, but could be set to desired value for the application.
1. Configure filter mask for extended frames. Write 0xFFFF_FFFF to the can.AFMR register:
a. Enable the substitute remote transmission request mask for frame, [AMSRR] = 1.
b. Compare all bits in the compare for the standard message ID, [AMIDH] = 0x7FF.
c. Enable the extended frame, [AIIDE] = 1.
d. Extended ID, [AIIDL] = 0x3FFFF
e. Remote transmission request bit for extended frame, [AIRTR] = 1.
2. Configure filter ID for extended frames. Write 0xABDF_9BDE to the can.AFIR register:
a. Standard ID, [AIIDH] = 0x55E.
b. Remote transmission request bit for standard frame, [AISRR] = 1.
c. Select standard/extended frame, [AIIDE] = 1.
d. Extended ID, [AIIDL] = 3CDEF.
e. Remote transmission request bit for extended frame, [AIRTR] = 0
18.2.6 Protocol Engine
The CAN protocol engine consists primarily of the bit timing logic (BTL) and the bitstream processor
(BSP) modules. Figure 18-5 shows a block diagram of the CAN protocol engine.
X-Ref Target - Figure 18-5
Figure 18-5: CAN Protocol Engine
Protocol Engine - Data Layer
UG585_c18_03_101012
Bit Timing
Logic
Bitstream
Processor
Reference Clock
TX Bit
PHY
TX
RX
CAN
BUS
Clock
Prescalar
Control
RX Bit
Buffer and Filter
TX Message
Control /
Status
RX Message
Sampling
Clock
Physical
Layer
Device
Boundary