![Altera Cyclone V Device Handbook Download Page 1006](http://html1.mh-extra.com/html/altera/cyclone-v/cyclone-v_device-handbook_29107911006.webp)
Data Length Code (
DLC[3:0]
)
DLC specifies the number of data bytes in the data frame. The maximum number is eight.
The data length code (
DLC
) of a message object must be defined the same as in all the corresponding objects
with the same identifier in all CAN devices. When the message handler stores a data frame, it sets the
DLC
field to the value provided in the received message.
Data Bytes 0-7 (
Data 0[7:0] - Data 7[7:0]
)
The data bytes in a CAN data frame.
Message Interface Registers
There are two sets of message interface registers,
IF1
and
IF2
, that provide a means for a host processor
or DMA controller to access any message object indirectly. Message objects are transferred between the
message RAM and the message buffer registers as a single, atomic operation maintaining data consistency
across the message.
Table 25-2: Message Interface Register Set
This table lists the structure of each message interface register set, where
x
represents either set 1 or set 2.
Description
Name
Register
Register Type
Specifies the transfer direction and selects the
portions of the message object to transfer
IFx command
register
IFxCMR
Command
Provides access to the
Msk
,
MDir
, and
MXtd
mask fields of the message object
IFx mask register
IFxMSK
Message buffer
Provides access to the
ID
,
Dir
,
Xtd
, and
MsgVal
arbitration fields of the message object
IFx arbitration
register
IFxARB
Provides access to the
DLC
,
EoB
,
TxRqst
,
RmtEn
,
RxIE
,
TxIE
,
UMask
,
IntPnd
,
MsgLst
, and
NewDat
fields of the message
object
IFx message control
register
IFxMCTR
Provides access to data bytes 0-3 of the message
object
IFx data A register
IFxDA
Provides access to data bytes 4-7 of the message
object
IFx data B register
IFxDB
DMA Mode
The CAN controller can issue DMA controller requests to transfer data between one or both of the message
interface registers and system memory. The CAN controller has two DMA request interfaces, called
can_if1dma
and
can_if2dma
. The CAN peripheral request interfaces are shared with the FPGA DMA
peripheral request interfaces. To use the DMA peripheral request interface, the host processor must access
the CAN control register (
CCTRL
) in the protocol group (
protogrp
). The peripheral request interface is
selected through the system manager.
To activate the DMA support feature and initiate a transfer, write a 1 to the
DMAactive
bit in the appropriate
IF command register (
IFxCMR
) in the message interface group (
msgifgrp
). After the message object
Altera Corporation
CAN Controller Introduction
25-7
Data Length Code (
DLC[3:0]
)
cv_54025
2013.12.30