没有合适的资源?快使用搜索试试~ 我知道了~
首页滤波参考P32-MCP25XXFD-FRM,-CAN-FD-Controller-Module-DS20005678D.pdf
MCP2517数据手册。Microchip MCP2517FD外部CAN FD控制器是一款外形小巧、经济高效的外部CAN FD控制器,可通过可用的SPI接口轻松添加到微控制器中。可将CAN FD通道轻松添加到缺少CAN FD外设或没有足够CAN FD通道的微控制器上。MCP2517FD支持经典格式 (CAN 2.0B) 和CAN灵活数据速率 (CAN FD) 格式中的CAN帧,符合ISO11898-1:2015标准。
资源详情
资源评论
资源推荐

2017-2019 Microchip Technology Inc. DS20005678D-page 1
HIGHLIGHTS
This section of the manual contains the following major topics:
1.0 Introduction ....................................................................................................................... 2
2.0 Modes of Operation .......................................................................................................... 8
3.0 Configuration................................................................................................................... 13
4.0 Message Transmission ................................................................................................... 26
5.0 Transmit Event FIFO....................................................................................................... 33
6.0 Message Filtering............................................................................................................36
7.0 Message Reception ........................................................................................................ 41
8.0 FIFO Behavior................................................................................................................. 45
9.0 Timestamping.................................................................................................................. 58
10.0 Interrupts......................................................................................................................... 59
11.0 Error Handling................................................................................................................. 68
12.0 Appendix A: MCP25XXFD CAN FD SPI API .................................................................. 70
13.0 Related Documents ........................................................................................................ 76
14.0 Revision History .............................................................................................................. 77
CAN FD Controller Module

MCP25XXFD Family Reference Manual
DS20005678D-page 2 2017-2019 Microchip Technology Inc.
1.0 INTRODUCTION
1.1 CAN FD vs. CAN 2.0
CAN FD addresses the increasing demand for bandwidth on CAN buses. The two major
enhancements over CAN 2.0 are:
• Increased data field up to 64 data bytes (from a maximum eight data bytes for CAN 2.0).
• Option to switch to faster bit rate in the data phase. The arbitration bit rate is the same as in
CAN 2.0.
Figure 1-1 shows the possible increase in effective bit rate due to the higher data bit rate and
increased data bytes per frame. The graph uses a CAN FD base frame with 11-bit identifier and
500 kbps bit rate during the arbitration phase.
The CAN FD protocol was defined to allow CAN 2.0 messages and CAN FD messages to co-
exist on the same bus. This does not imply that non-CAN FD controllers can be mixed with CAN
FD controllers on the same bus. Non-CAN FD controllers will generate error frames while
receiving a CAN FD message.
The CAN FD protocol (Data Link Layer) is defined in ISO 11898-1:2015.
Figure 1-1: Effective CAN FD Bit Rate
(Base Frame: 11-Bit ID, Nominal Bit Rate = 500 kbps)
Note: This family reference manual section is meant to serve as a complement to the
device data sheet. Please refer to the data sheet for the memory organization and
register definitions of the device.
Device data sheets, application notes and code samples (MCP25XXFD canfdspi
API) are available for download from the Microchip website (www.microchip.com).
All code samples in this manual use the MCP25XXFD canfdspi API. Please refer to
the API header files for the documentation of structures and function prototypes.
0
05
1
15
2
25
3
35
4
45
0123456789
Effective Bit Rate/Mbps
Data Bit Rate/Mbps
8 Bytes Payload 16 Bytes Payload
24 Bytes Payload 32 Bytes Payload
48 Bytes Payload 64 Bytes Payload

2017-2019 Microchip Technology Inc. DS20005678D-page 3
CAN FD Controller Module
1.2 Features
The CAN FD Controller module has the following features:
General
• External CAN FD Controller with SPI Interface
• Nominal (Arbitration) Bit Rate up to 1 Mbps
• Data Bit Rate up to 8 Mbps
• CAN FD Controller modes:
- Mixed CAN 2.0B and CAN FD mode
- CAN 2.0B mode
• Conforms to ISO 11898-1:2015
Message FIFOs
• 31 FIFOs, Configurable as Transmit or Receive FIFOs
• One Transmit Queue (TXQ)
• Transmit Event FIFO (TEF) with 32-Bit Timestamp
Message Transmission
• Message Transmission Prioritization:
- Based on priority bit field and/or
- Message with lowest ID gets transmitted first using the Transmit Queue (TXQ)
• Programmable Automatic Retransmission Attempts: Unlimited, Three Attempts or Disabled
Message Reception
• 32 Flexible Filter and Mask Objects
• Each Object can be Configured to Filter Either:
- Standard ID + first 18 data bits or
- Extended ID
• 32-Bit Timestamp

MCP25XXFD Family Reference Manual
DS20005678D-page 4 2017-2019 Microchip Technology Inc.
1.3 Module Block Diagram
Figure 1-2 shows the block diagram of the CAN FD Controller module.
• The CAN FD Controller module has multiple modes:
- Configuration,
- Normal CAN FD,
- Normal CAN 2.0,
- Sleep (normal Sleep mode and Low-Power mode)
- Listen Only
- Restricted Operation
- Internal and External Loopback modes
• The CAN FD Bit Stream Processor (BSP) implements the Medium Access Control of the
CAN FD protocol described in ISO 11898-1:2015. It serializes and deserializes the bit
stream, encodes and decodes the CAN FD frames, manages the medium access,
Acknowledges frames, and detects and signals errors.
• The TX Handler prioritizes the messages that are requested for transmission by the
Transmit FIFOs. It uses the RAM interface to fetch the transmit data from RAM and
provides them to the BSP for transmission.
• The BSP provides received messages to the RX Handler. The RX Handler uses
acceptance filters to filter out messages that shall be stored into the Receive FIFOs. It uses
the RAM Interface to store received data into RAM.
• Each FIFO can be configured either as a Transmit or Receive FIFO. The FIFO control
keeps track of the FIFO head and tail, and calculates the user address. For a TX FIFO, the
user address points to the address in RAM where the data for the next transmit message
shall be stored. For an RX FIFO, the user address points to the address in RAM where the
data of the next receive message shall be read. The user notifies the FIFO that a message
was written to or read from RAM by incrementing the head/tail of the FIFO.
• The Transmit Queue (TXQ) is a special Transmit FIFO that transmits the messages based
on the ID of the messages stored in the queue.
• The Transmit Event FIFO (TEF) stores the message IDs of the transmitted messages.
• A free-running Time Base Counter is used to timestamp received messages. Messages in
the TEF can also be timestamped.
• The CAN FD Controller module generates interrupts when new messages are received or
when messages were transmitted successfully.
• The Special Function Registers (SFRs) are used to control and read the status of the CAN
FD Controller module.
Figure 1-2: Module Block Diagram
CAN FD
Bit Stream
Processor
RAM
Interface
TX Handler
TX Prioritization
RX Handler
Acceptance
Filter
TXQ Control
TEF
Control
FIFO
Control
SFR
Interrupt
Control
Error
Handling
Diagnostics
Time Stamping
TBC
Mode
Control

2017-2019 Microchip Technology Inc. DS20005678D-page 5
CAN FD Controller Module
1.4 CAN FD Message Frames
The ISO 11898-1:2015 describes the different CAN message frames in detail. Figure 1-3
through Figure 1-7 clarify and summarize the construction of the messages and fields.
There are four different CAN data/remote frames (see Figure 1-4):
• CAN Base Frame: Classic CAN 2.0 frame using Standard ID (SID).
• CAN FD Base Frame: CAN FD frame using Standard ID (SID).
• CAN Extended Frame: Classic CAN 2.0 frame using Extended ID (EID).
• CAN FD Extended Frame: CAN FD frame using Extended ID (EID).
There are no remote frames in CAN FD frames; therefore, the RTR bit is replaced with the RRS
bit (see Figure 1-4). The RRS bit in the CAN FD base frame can be used to extend the SID to
12 bits. When enabled, it is referred to as SID11, it is the Least Significant Byte (LSB) of
SID[11:0].
Figure 1-5 specifies the control field of the different CAN messages. Before CAN FD was added
to the ISO 11898-1:2015, the FDF bit was a reserved bit. Now the FDF bit selects between
Classic and CAN FD formats.
The BRS bit selects if the bit rate should be switched in the data phase of the CAN FD frames.
Figure 1-8 illustrates the error and overload frames. These special frames didn’t change. Note
that if an error is detected during the data phase of a CAN FD frame, the bit rate will be switched
back to the Nominal Bit Rate (NBR). Error frames are always transmitted at the arbitration bit
rate.
1.4.1 ISO VS. NON-ISO CRC
To support the system validation of non-ISO CRC ECUs, the CAN FD Controller module
supports both ISO CRC (according to ISO 11898-1:2015) and non-ISO CRC (see Figure 1-6
and Figure 1-7). The CRC field is selectable using CiCON.ISOCRCEN. The ISO CRC field
contains the stuff count. This count wasn’t included in the original CAN FD specification. It was
added to fix a weakness in the error detection of the original specification.
CAN FD frames use two different lengths of CRC: 17-bit for up to 16 data bytes and 21 bits for
20 or more data bytes. Technically, there are a total of six different CAN data/remove frames in
CAN FD.
Figure 1-3: General Data Frame
SOF
(1b)
ARBITRATION(12/32b) CTRL(6/8/9b) DATA(0 to 64B)
CRC(16/18/22b)
CRC(16/22/26b)
ACK(2b) EOF(7b) IFS(≥3b)IFS(≥3b)
DATA FRAME
剩余79页未读,继续阅读

















Ekko.orz
- 粉丝: 212
- 资源: 9
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制

评论0