AUT-N1784 CAN Flexible Data
AUT-N1784 CAN Flexible Data
PUBLIC USE
AGENDA
• CAN FD Protocol Overview
• FlexCAN3 FD
• MCAN FD
• Flexible Data and Partial Networking Impact on CAN
Physical Layer
20K
LIN/J2602
time triggered
10K Master / Slave
Body, Powertrain
0.5 1 2.5 5
Relative Cost of Communication [ Cost/node ]
3 PUBLIC USE #NXPFTF
CAN FD
• CAN FD stands for CAN with Flexible Data-Rate
• CAN FD was a proposal by Bosch to
− Increase the baud rate of the data portion of a CAN message
− Increase the number of data bytes that can be sent in a single CAN message to up to 64
− No changes to arbitration field allow for existing physical layers to be used
− Option1)
Introduction phase: CAN FD use only in specific operation modes
E.g. software download at end of line programming with non CAN FD nodes in standby or sleep,
managed by CAN FD tolerant partial networking transceivers.
− Option2)
Use of CAN FD shield transceivers that make Classical CAN nodes deaf for CAN FD frames
(-> details will be disclosed in “FTF-AUT-N1775 Enabling Hybrid CAN Network: FD shield”)
• Frame format:
− CAN BASE FRAME FORMAT (CBFF): 11 bit long identifier and constant bit rate
− CAN EXTENDED FRAME FORMAT (CEFF): 29 bit long identifier and constant bit rate
− CAN FD BASE FRAME FORMAT (FBFF): 11 bit long identifier and optional dual bit rate
− CAN FD EXTENDED FRAME FORMAT (FEFF): 29 bit long identifier and optional dual bit rate
Frame fields
START OF FRAME, ARBITRATION FIELD, CONTROL FIELD,
DATA FIELD, CRC FIELD, ACK FIELD, END OF FRAME
F
D
F
F
D
F
F
D
F
CAN FD Format
2 0 0 1 0
−0 to 64 bytes 3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
CAN 8 1 x x x
format
8 1 0 0 0
• Later it was recognized that the bit stuffing impacts the Hamming distance
• In Classical CAN : HD=2 and not HD=6
• With CAN FD Bosch included the stuff bits in the CRC calculation to overcome this problem
• However, in conjunction with the initialization vector of “0” (zero) it became worse!
• Recall, FD frame requires two bit rates – Arbitration and data phase
• Bit timing parameters are achieved by setting up the following registers:
− Control register 1 (CTRL1): “Classical” CAN (equivalent FlexCAN2)
− CAN bit timing reg (CBT): Extended version of above register
− CAN FD bit timing reg (FDCBT): Bit time associated with FD data phase
• Bit time consists of following elements which are comprised from a variable number of time quanta
BIT TIME
CAN_CTRL1 CAN_FDCBT
• When higher bit rate data phase occurs in FD frame, the bit time that elapses until the
sample point can be shorter than the transceivers loop delay impeding correct comparison.
• A secondary sample point is defined where the transmitted bit is correctly compared with
the received bit to check for bit errors.
• Register to enable:
− CAN_FDCTRL[TDCEN]– enable, TDC only available once BRS is set (i.e. data phase)
− CAN_FDCTRL[TDCOFF] – offset value to assist in position of secondary sample point
+8 bytes overhead
8-byte frame
16-byte frame
32-byte frame
64-byte frame
CAN 2.0
FD Enabled
Block 0 • Each block is composed by the memory space equivalent to 32 x 16-byte MBs or 512-
bytes (0x200)
280
• Each block can be configured to have message buffers (MBs) of a defined size in order to
store messages with payload of 8-byte, 16-byte, 32-byte or 64-bytes. Message buffer data
Block 1 size region bit field:
480 •FDCTRL[MBDSRn] = 0bxx
• The number of message buffers in a block depends upon payload size. Each block can be
configured (by software) as follows:
Block 2
680
Block 3
880
SERIAL BUFFERS
DATA Move
Transparent to user
• Rx MB are pre-programmed with
Rx Shifter
in
Tx Shifter
ID DATA LENGTH
Matching Process • Both FIFO and MBs can be
scanned
TIME STAMP
ID
Move in Process
MB0 MB1 MB2 MB3 MB4 MB5 MB6 MB7 MB8 MB126 MB127 MB128
6 Deep MB1
FIFO : MB1
MB1
MB1
MB0
Message Buffer Configuration
Filter Table Options:
Filter Table :
RXIDA: 128 x Standard or Extended IDs
8-128 entry filter table and masks
(includes IDE and RTR)
Filter on ID, IDE and RTR
RXIDB: 256 x Standard IDs or Extended
14-MSBit IDs slices (includes IDE and
Filter Mask Options: RTR)
Individual 32bit mask per table RXIDC: 512 x Standard or Extended 8-
. entry MSBit slices (includes IDE and RTR)
29 PUBLIC USE #NXPFTF
Rx FIFO Under DMA Operation
• Enhanced Feature
− DMA Request added to FlexCAN RxFIFO
Allows CPU longer time to service the received CAN messages. With the DMA connected the depth of the FIFO should
also be able to be relatively small
Enabled via the MCR[DMA]
DMA Request asserted when any frame in FIFO
• DMA reads head of FIFO (0x80 to 0x8C). 8C must be read last to update for next FRAME
RxFIFO
System 5
RAM 4 RxFIFO
3 Control
2 Write_Pointer
System
DMA Read_Pointer
1
0 0x80 to 0x8C
DMA Req
DMA Ack
− The MCAN FD provides several data structures to store Messages, such as FIFOs and MBs
(Message Buffers). The data payload size for each data structure is fixed for a given module
configuration (configured by the software).
− For example: if the Rx FIFO 0 is defined to store 32-byte payload messages, it only
stores messages with size of up to 32-bytes payload.
Ethernet
135-150C Ambient
S32V23xC CAN FD
ADAS 4x A53 1GHz, APEX, ISP, PCIe, SDHC, ASIL B, CAN-FD
Vision MPC560xE S32V23xG Vision processing for autonomous
Automated/Fusion
64MHz, 512K, M-JPEG 2x A53 600MHz, ASIL B, CAN-FD Surround cameras
S32V23xK
Surround SCP220x Short/Medium/Long range Radar
Front/rear
ARM926, APEX, MPEG-4
MPC577xK
Sensor Data Fusion
S32R27
2x 266MHz, Lockstep/ASILD, up to 4M, 2M, ASIL D, SPT2.0 S32R37
MPC567xK SPT1.0 - 3D FFT CAN-FD CAN-FD 1.2M, SPT2.5, ASIL B
Radar 2x 180MHz, up to 2M CAN-FD
MPC567xF/R
MPC5777C/M
VDS 1-2x 264Mhz, 4-6M
Multi-core up to 300MHz, Lockstep/ASIL D, 8M, HSM/CSE, CAN-FD (5777C)
MPC564xA Engine control
Powertrain/hybrid 150Mhz, 4M
MPC574xR Power steering
MPC563xM
80MHz, 1M
Multi-core 264MHz, Lockstep/ASIL D, 4M Braking
Chassis/safety
MPC5643L High-end Functional Safety and Security
2x 120MHz, lockstep/ASIL D, 1M MPC574xP
2x 200MHz, Lockstep/ASIL D, 2.5M
MPC560xP
64MHz, 512K
GATEWAY MPC574xG
Advanced FOTA MPC564xB/C Multi-core, 160MHz, ASIL B, 6M, HSM, MLB, ENET switch, CAN-FD Vehicle Gateway
Single-Dual-core, 120MHz, 3M, CSE
MPC574xB/C Body Controller
MPC5668G Single-Dual-core, 160MHz, ASILB, 3M, HSM, CAN-FD
Traditional ENET/FR Dual-core116MHz, 2M, MLB Audio Gateway
MAC57D5xx Multi Display Management and Clusters
MPC54xS
A5, M4, M0+, ASIL B Dual Display, SMD
Displays/Clusters 120MHz, 2M, VIU, SMD
MPC560xS
64MHz, up to 1M
1Q 2Q 3Q 4Q 1Q 2Q 3Q 4Q 1Q 2Q 3Q 4Q 1Q 2Q 3Q 4Q
specification MCU
TxD
Trx
CAN bus
− ISO11898 -2, -5, and -6 will be merged into a new ISO11898-2 Protocol
Layer RxD Rec
specification ECU_n
ISO11898-5 Low power mode and wake up Wake up on any CAN frame
Wake up Wake up
report receiver RxD
2.5V
+5V Bit representation
25k
sleep
Un powered
CAN H
Rxd
Differential
CAN receiver
2us/bit (500kb/s)
Protocol
(in MCU) Txd Pre
CAN L
TxD
driver 120//120
CAN
Bus
RxD
TxD TxD
CAN CAN
Bus Bus
X4
RxD RxD
500kb/s 2Mb/s
X8
250ns/bit (4Mb/s) 125ns/bit (8Mb/s)
TxD TxD
CAN CAN
Bus Bus
RxD RxD
4Mb/s 8Mb/s
40 PUBLIC USE #NXPFTF
New Timing Definition
More bit timing requirements are given in ISO11898-2 for 2Mbit/s and 5MBit/s
SOF
ACK
SOF
Classical CAN Frame
FD frame detection(r0 bit) No idle phase detection during the Fast data
=> stop decoding
SOF
ACK
SOF
CAN FD Frame Fast data