M - Can: User's Manual Revision 3.3.0
M - Can: User's Manual Revision 3.3.0
User’s Manual
Revision 3.3.0
30.10.2018
FD
LEGAL NOTICE
© Copyright 2008-2018 by Robert Bosch GmbH and its licensors. All rights reserved.
"Bosch" is a registered trademark of Robert Bosch GmbH.
The content of this document is subject to continuous developments and improvements. All
particulars and its use contained in this document are given by BOSCH in good faith.
NO WARRANTIES: TO THE MAXIMUM EXTENT PERMITTED BY LAW, NEITHER THE
INTELLECTUAL PROPERTY OWNERS, COPYRIGHT HOLDERS AND CONTRIBUTORS,
NOR ANY PERSON, EITHER EXPRESSLY OR IMPLICITLY, WARRANTS ANY ASPECT
OF THIS SPECIFICATION, SOFTWARE RELATED THERETO, CODE AND/OR
PROGRAM RELATED THERETO, INCLUDING ANY OUTPUT OR RESULTS OF THIS
SPECIFICATION, SOFTWARE RELATED THERETO, CODE AND/OR PROGRAM
RELATED THERETO UNLESS AGREED TO IN WRITING. THIS SPECIFICATION,
SOFTWARE RELATED THERETO, CODE AND/OR PROGRAM RELATED THERETO IS
BEING PROVIDED "AS IS", WITHOUT ANY WARRANTY OF ANY TYPE OR NATURE,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
AND ANY WARRANTY THAT THIS SPECIFICATION, SOFTWARE RELATED THERETO,
CODE AND/OR PROGRAM RELATED THERETO IS FREE FROM DEFECTS.
ASSUMPTION OF RISK: THE RISK OF ANY AND ALL LOSS, DAMAGE, OR
UNSATISFACTORY PERFORMANCE OF THIS SPECIFICATION (RESPECTIVELY THE
PRODUCTS MAKING USE OF IT IN PART OR AS A WHOLE), SOFTWARE RELATED
THERETO, CODE AND/OR PROGRAM RELATED THERETO RESTS WITH YOU AS THE
USER. TO THE MAXIMUM EXTENT PERMITTED BY LAW, NEITHER THE
INTELLECTUAL PROPERTY OWNERS, COPYRIGHT HOLDERS AND CONTRIBUTORS,
NOR ANY PERSON EITHER EXPRESSLY OR IMPLICITLY, MAKES ANY
REPRESENTATION OR WARRANTY REGARDING THE APPROPRIATENESS OF THE
USE, OUTPUT, OR RESULTS OF THE USE OF THIS SPECIFICATION, SOFTWARE
RELATED THERETO, CODE AND/OR PROGRAM RELATED THERETO IN TERMS OF
ITS CORRECTNESS, ACCURACY, RELIABILITY, BEING CURRENT OR OTHERWISE.
NOR DO THEY HAVE ANY OBLIGATION TO CORRECT ERRORS, MAKE CHANGES,
SUPPORT THIS SPECIFICATION, SOFTWARE RELATED THERETO, CODE AND/OR
PROGRAM RELATED THERETO, DISTRIBUTE UPDATES, OR PROVIDE
NOTIFICATION OF ANY ERROR OR DEFECT, KNOWN OR UNKNOWN. IF YOU RELY
UPON THIS SPECIFICATION, SOFTWARE RELATED THERETO, CODE AND/OR
PROGRAM RELATED THERETO, YOU DO SO AT YOUR OWN RISK, AND YOU
ASSUME THE RESPONSIBILITY FOR THE RESULTS. SHOULD THIS SPECIFICATION,
SOFTWARE RELATED THERETO, CODE AND/OR PROGRAM RELATED THERETO
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL LOSSES, INCLUDING, BUT
NOT LIMITED TO, ANY NECESSARY SERVICING, REPAIR OR CORRECTION OF ANY
PROPERTY INVOLVED TO THE MAXIMUM EXTEND PERMITTED BY LAW.
DISCLAIMER: IN NO EVENT, UNLESS REQUIRED BY LAW OR AGREED TO IN
WRITING, SHALL THE INTELLECTUAL PROPERTY OWNERS, COPYRIGHT HOLDERS
OR ANY PERSON BE LIABLE FOR ANY LOSS, EXPENSE OR DAMAGE, OF ANY TYPE
OR NATURE ARISING OUT OF THE USE OF, OR INABILITY TO USE THIS
SPECIFICATION, SOFTWARE RELATED THERETO, CODE AND/OR PROGRAM
ii 30.10.2018
Revision 3.3.0 M_CAN
RELATED THERETO, INCLUDING, BUT NOT LIMITED TO, CLAIMS, SUITS OR CAUSES
OF ACTION INVOLVING ALLEGED INFRINGEMENT OF COPYRIGHTS, PATENTS,
TRADEMARKS, TRADE SECRETS, OR UNFAIR COMPETITION.
INDEMNIFICATION: TO THE MAXIMUM EXTEND PERMITTED BY LAW YOU AGREE TO
INDEMNIFY AND HOLD HARMLESS THE INTELLECTUAL PROPERTY OWNERS,
COPYRIGHT HOLDERS AND CONTRIBUTORS, AND EMPLOYEES, AND ANY PERSON
FROM AND AGAINST ALL CLAIMS, LIABILITIES, LOSSES, CAUSES OF ACTION,
DAMAGES, JUDGMENTS, AND EXPENSES, INCLUDING THE REASONABLE COST OF
ATTORNEYS’ FEES AND COURT COSTS, FOR INJURIES OR DAMAGES TO THE
PERSON OR PROPERTY OF THIRD PARTIES, INCLUDING, WITHOUT LIMITATIONS,
CONSEQUENTIAL, DIRECT AND INDIRECT DAMAGES AND ANY ECONOMIC LOSSES,
THAT ARISE OUT OF OR IN CONNECTION WITH YOUR USE, MODIFICATION, OR
DISTRIBUTION OF THIS SPECIFICATION, SOFTWARE RELATED THERETO, CODE
AND/OR PROGRAM RELATED THERETO, ITS OUTPUT, OR ANY ACCOMPANYING
DOCUMENTATION.
GOVERNING LAW: THE RELATIONSHIP BETWEEN YOU AND ROBERT BOSCH GMBH
SHALL BE GOVERNED SOLELY BY THE LAWS OF THE FEDERAL REPUBLIC OF
GERMANY. THE STIPULATIONS OF INTERNATIONAL CONVENTIONS REGARDING
THE INTERNATIONAL SALE OF GOODS SHALL NOT BE APPLICABLE. THE
EXCLUSIVE LEGAL VENUE SHALL BE DUESSELDORF, GERMANY.
MANDATORY LAW SHALL BE UNAFFECTED BY THE FOREGOING PARAGRAPHS.
INTELLECTUAL PROPERTY OWNERS/COPYRIGHT OWNERS/CONTRIBUTORS:
ROBERT BOSCH GMBH, ROBERT BOSCH PLATZ 1, 70839 GERLINGEN, GERMANY
AND ITS LICENSORS.
30.10.2018 iii
M_CAN Revision 3.3.0
2.0.1 12.03.2012 minor corrections, interface signals to Clock Calibration on CAN unit
updated
3.0 17.10.2012 FIFO overwrite mode, transmit pause, support of CAN FD 64-byte frames
3.0.1 26.11.2012 registers FBTP and TEST updated, minor textual enhancements
3.0.2 14.02.2013 Section 2.4.1 Message RAM Configuration corrected, minor corrections/
enhancements
iv 30.10.2018
Revision 3.3.0 M_CAN
30.10.2018 v
M_CAN Revision 3.3.0
3.3.0 30.10.2018 Wide Message Markers, interface to DMU and TSU, and filtering for Sync
messages added.
vi 30.10.2018
Revision 3.3.0 M_CAN
Term Meaning
tq time quantum
CONVENTIONS
30.10.2018 vii
M_CAN Revision 3.3.0
REFERENCES
[1] ISO ISO 11898-1:2015: CAN data link layer and physical signalling
viii 30.10.2018
Revision 3.3.0 M_CAN
Table of contents
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Dual Clock Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Dual Interrupt Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Programmer’s Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Hardware Reset Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.1 Access to reserved Register Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.1 Customer Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.2 Core Release Register (CREL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.3 Endian Register (ENDN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.4 Data Bit Timing & Prescaler Register (DBTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.5 Test Register (TEST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.6 RAM Watchdog (RWD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.7 CC Control Register (CCCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.8 Nominal Bit Timing & Prescaler Register (NBTP) . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.9 Timestamp Counter Configuration (TSCC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.10 Timestamp Counter Value (TSCV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.11 Timeout Counter Configuration (TOCC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.12 Timeout Counter Value (TOCV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.13 Error Counter Register (ECR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3.14 Protocol Status Register (PSR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.15 Transmitter Delay Compensation Register (TDCR) . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.16 Interrupt Register (IR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.17 Interrupt Enable (IE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.18 Interrupt Line Select (ILS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.3.19 Interrupt Line Enable (ILE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.3.20 Global Filter Configuration (GFC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.3.21 Standard ID Filter Configuration (SIDFC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3.22 Extended ID Filter Configuration (XIDFC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3.23 Extended ID AND Mask (XIDAM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.3.24 High Priority Message Status (HPMS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.3.25 New Data 1 (NDAT1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.3.26 New Data 2 (NDAT2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.3.27 Rx FIFO 0 Configuration (RXF0C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3.28 Rx FIFO 0 Status (RXF0S) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.3.29 Rx FIFO 0 Acknowledge (RXF0A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3.30 Rx Buffer Configuration (RXBC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3.31 Rx FIFO 1 Configuration (RXF1C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.3.32 Rx FIFO 1 Status (RXF1S) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.3.33 Rx FIFO 1 Acknowledge (RXF1A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.3.34 Rx Buffer / FIFO Element Size Configuration (RXESC) . . . . . . . . . . . . . . . . . . . . 36
2.3.35 Tx Buffer Configuration (TXBC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.3.36 Tx FIFO/Queue Status (TXFQS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.3.37 Tx Buffer Element Size Configuration (TXESC) . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.3.38 Tx Buffer Request Pending (TXBRP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.3.39 Tx Buffer Add Request (TXBAR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.3.40 Tx Buffer Cancellation Request (TXBCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.3.41 Tx Buffer Transmission Occurred (TXBTO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.42 Tx Buffer Cancellation Finished (TXBCF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.43 Tx Buffer Transmission Interrupt Enable (TXBTIE) . . . . . . . . . . . . . . . . . . . . . . . . 43
2.3.44 Tx Buffer Cancellation Finished Interrupt Enable (TXBCIE) . . . . . . . . . . . . . . . . . 43
2.3.45 Tx Event FIFO Configuration (TXEFC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
30.10.2018 ix
M_CAN Revision 3.3.0
x 30.10.2018
Chapter 1.
1. Overview
The M_CAN module is the new CAN Communication Controller IP-module that can be integrated
as stand-alone device or as part of an ASIC. It is described in VHDL on RTL level, prepared for
synthesis. The M_CAN performs communication according to ISO 11898-1:2015. Additional
transceiver hardware is required for connection to the physical layer.
The message storage is intended to be a single- or dual-ported Message RAM outside of the
module. It is connected to the M_CAN via the Generic Master Interface. Depending on the chosen
ASIC integration, multiple M_CAN controllers can share the same Message RAM.
All functions concerning the handling of messages are implemented by the Rx Handler and the Tx
Handler. The Rx Handler manages message acceptance filtering, the transfer of received messages
from the CAN Core to the Message RAM as well as providing receive message status information.
The Tx Handler is responsible for the transfer of transmit messages from the Message RAM to the
CAN Core as well as providing transmit status information.
Acceptance filtering is implemented by a combination of up to 128 filter elements where each one
can be configured as a range, as a bit mask, or as a dedicated ID filter.
The M_CAN can be connected to a wide range of Host CPUs via its 8/16/32-bit Generic Slave
Interface. The M_CAN’s clock domain concept allows the separation between the high precision
CAN clock and the Host clock, which may be generated by an FM-PLL.
1.1 Features
• Conform with ISO 11898-1:2015
• CAN FD with up to 64 data bytes supported
• CAN Error Logging
• AUTOSAR support
• SAE J1939 support
• Improved acceptance filtering
• Two configurable Receive FIFOs
• Separate signalling on reception of High Priority Messages
• Up to 64 dedicated Receive Buffers
• Up to 32 dedicated Transmit Buffers
• Configurable Transmit FIFO
• Configurable Transmit Queue
• Configurable Transmit Event FIFO
• Direct Message RAM access for Host CPU
• Multiple M_CANs may share the same Message RAM
• Programmable loop-back test mode
• Maskable module interrupts
• 8/16/32 bit Generic Slave Interface for connection customer-specific Host CPUs
• Two clock domains (CAN clock and Host clock)
• Power-down support
• Debug on CAN support
• DMA Support (DMU add-on required)
M_CAN Extension IF
Sync
Generic Slave IF
Timestamp
Interrupt &
Rx_State
Cfg & Ctrl
Clk
Rx Handler Acceptance Filter
Memory IF
32
CAN Core
CAN Protocol Controller and Rx/Tx Shift Register. Handles all ISO 11898-1:2015 protocol functions.
Supports 11-bit and 29-bit identifiers.
Sync
Synchronizes signals from the Host clock domain to the CAN clock domain and vice versa.
Clk
Synchronizes reset signal to the Host clock domain and to the CAN clock domain.
Interrupt control and 16-bit CAN bit time counter for receive and transmit timestamp generation. An
externally generated 16-bit vector may substitute the integrated 16-bit CAN bit time counter for
receive and transmit timestamp generation.
2 30.10.2018
Revision 3.3.0 M_CAN
Tx Handler
Controls the message transfer from the external Message RAM to the CAN Core. A maximum of 32
Tx Buffers can be configured for transmission. Tx buffers can be used as dedicated Tx Buffers, as
Tx FIFO, part of a Tx Queue, or as a combination of them. A Tx Event FIFO stores Tx timestamps
together with the corresponding Message ID. Transmit cancellation is also supported.
Rx Handler
Controls the transfer of received messages from the CAN Core to the external Message RAM. The
Rx Handler supports two Receive FIFOs, each of configurable size, and up to 64 dedicated Rx
Buffers for storage of all messages that have passed acceptance filtering. A dedicated Rx Buffer, in
contrast to a Receive FIFO, is used to store only messages with a specific identifier. An Rx
timestamp is stored together with each message. Up to 128 filters can be defined for 11-bit IDs and
up to 64 filters for 29-bit IDs.
Connects the M_CAN to a customer specific Host CPU. The Generic Slave Interface is capable to
connect to an 8/16/32-bit bus to support a wide range of interconnection structures.
Connects the M_CAN access to an external 32-bit Message RAM. The maximum Message RAM
size is 16K • 32 bit. A single M_CAN can use at most 4.25K • 32 bit.
Extension Interface
All flags from the Interrupt Register IR as well as selected internal status and control signals are
routed to this interface. The interface is intended for connection of the M_CAN to a module-external
interrupt unit or to other module-external components. The connection of these signals is optional.
Within the M_CAN module there is a synchronization mechanism implemented to ensure save data
transfer between the two clock domains.
Note: In order to achieve a stable function of the M_CAN, the Host clock must always be faster
than or equal to the CAN clock. Also the modulation depth of a spread spectrum clock
has to be regarded.
30.10.2018 3
M_CAN Revision 3.3.0
4 30.10.2018
Chapter 2.
2. Programmer’s Model
0x01C NBTP Nominal Bit Timing & Prescaler Register 13 0600 0A03 RP
0x020 TSCC Timestamp Counter Configuration 14 0000 0000 RP
0x024 TSCV Timestamp Counter Value 14 0000 0000 RC
0x028 TOCC Timeout Counter Configuration 15 FFFF 0000 RP
0x02C TOCV Timeout Counter Value 15 0000 FFFF RC
0x030-03C reserved (4) 0000 0000 R
0x040 ECR Error Counter Register 16 0000 0000 RX
0x044 PSR Protocol Status Register 17 0000 0707 RXS
0x048 TDCR Transmitter Delay Compensation Register 19 0000 0000 RP
0x04C reserved (1) 0000 0000 R
0x050 IR Interrupt Register 20 0000 0000 RW
0x054 IE Interrupt Enable 23 0000 0000 RW
0x058 ILS Interrupt Line Select 25 0000 0000 RW
0x05C ILE Interrupt Line Enable 26 0000 0000 RW
0x060-07C reserved (8) 0000 0000 R
0x080 GFC Global Filter Configuration 27 0000 0000 RP
0x084 SIDFC Standard ID Filter Configuration 28 0000 0000 RP
Table 1 M_CAN Register Map
M_CAN - Revision 3.3.0 - 30.10.2018 5
M_CAN Revision 3.3.0
In case the application software wants to access one of the reserved addresses in the M_CAN
register map (read or write access), interrupt flag IR.ARA is set, and if enable the interrupt is
signalled via the assigned interrupt line (m_can_int0 or m_can_int1). If the CPU interface allows
byte or half-word accesses, this interrupt flag is only set for accesses to reserved addresses where
all four bytes are reserved. In case one of the optional add-on modules DMU and/or TSU is
connected to the M_CAN, this flag is also set when a reserved address of such a module is
accessed.
In addition accesses to reserved addresses are directly signalled to the Host CPU by activating
output signal m_can_aei_ara when accessing a reserved address.
6 30.10.2018
Revision 3.3.0 M_CAN
2.3 Registers
Address 0x08 is reserved for an optional 32 bit customer-specific register. The Customer Register
is intended to hold customer-specific configuration, control, and status bits. A description of the
functionality is not part of this document.
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MON[7:0] DAY[7:0]
R-d R-d
30.10.2018 7
M_CAN Revision 3.3.0
0x04 ETV[31:16]
R-0x8765
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ETV[15:0]
R-0x4321
This register is only writable if bits CCCR.CCE and CCCR.INIT are set. The CAN bit time may be
programed in the range of 4 to 49 time quanta. The CAN time quantum may be programmed in the
range of 1 to 32 m_can_cclk periods. tq = (DBRP + 1) mtq.
Therefore the length of the bit time is (programmed values) [DTSEG1 + DTSEG2 + 3] tq
or (functional values) [Sync_Seg + Prop_Seg + Phase_Seg1 + Phase_Seg2] tq.
The Information Processing Time (IPT) is zero, meaning the data for the next bit is available at the
first clock edge after the sample point.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
8 30.10.2018
Revision 3.3.0 M_CAN
Write access to the Test Register has to be enabled by setting bit CCCR.TEST to ‘1’. All Test
Register functions are set to their reset values when bit CCCR.TEST is reset.
Loop Back Mode and software control of pin m_can_tx are hardware test modes. Programming of
TX ≠ “00” may disturb the message transfer on the CAN bus.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
30.10.2018 9
M_CAN Revision 3.3.0
The RAM Watchdog monitors the READY output of the Message RAM (m_can_aeim_ready). A
Message RAM access via the M_CAN’s Generic Master Interface (m_can_aeim_sel active) starts
the Message RAM Watchdog Counter with the value configured by RWD.WDC. The counter is
reloaded with RWD.WDC when the Message RAM signals successful completion by activating its
READY output. In case there is no response from the Message RAM until the counter has counted
down to zero, the counter stops and interrupt flag IR.WDI is set. The RAM Watchdog Counter is
clocked by the Host clock (m_can_hclk).
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0x14 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WDV[7:0] WDC[7:0]
R-0x0 RP-0x0
10 30.10.2018
Revision 3.3.0 M_CAN
For details about setting and resetting of single bits see Section 3.1.1.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0x18 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NISO TXP EFBI PXHD WMM UTSU BRSE FDOE TEST DAR MON CSR CSA ASM CCE INIT
RP-0 RP-0 RP-0 RP-0 RP-0 RP-0 RP-0 RP-0 Rp-0 RP-0 Rp-0 RW-0 R-0 Rp-0 RP-0 RW-1
When UTSU is set, 16-bit Wide Message Markers are also enabled regardless of the value of WMM.
0= Internal time stamping
1= External time stamping by TSU
30.10.2018 11
M_CAN Revision 3.3.0
Note: When generic parameter connected_tsu_g = ‘0’, there is no TSU connected to the M_CAN.
In this case bit UTSU is fixed to zero by synthesis.
12 30.10.2018
Revision 3.3.0 M_CAN
This register is only writable if bits CCCR.CCE and CCCR.INIT are set. The CAN bit time may be
programed in the range of 4 to 385 time quanta. The CAN time quantum may be programmed in the
range of 1 to 512 m_can_cclk periods. tq = (NBRP + 1) mtq.
Therefore the length of the bit time is (programmed values) [NTSEG1 + NTSEG2 + 3] tq
or (functional values) [Sync_Seg + Prop_Seg + Phase_Seg1 + Phase_Seg2] tq.
The Information Processing Time (IPT) is zero, meaning the data for the next bit is available at the
first clock edge after the sample point.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RP-0x3 RP-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
30.10.2018 13
M_CAN Revision 3.3.0
Configuration of the internal 16-bit Timestamp Counter. The use of the internal Timestamp Counter
is enabled by CCCR.UTSU = ‘0’. Handling of internal / external timestamps is described in Section
3.2, Timestamp Generation.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R-0x0 RP-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
res TSS[1:0]
R-0x0 RP-0x0
0x24 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TSC[15:0]
RC-0x0
For a description of the Timeout Counter see Section 3.3, Timeout Counter.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0x28 TOP[15:0]
RP-0xFFFF
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x2C res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TOC[15:0]
RC-0xFFFF
30.10.2018 15
M_CAN Revision 3.3.0
Note: Byte access: when TOCC.TOS = “00” writing one of the register bytes 3/2/1/0 will preset
the Timeout Counter.
R-0x0 X-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RP REC[6:0] TEC[7:0]
The counter is reset by read access to CEL. The counter stops at 0xFF; the next increment of TEC
or REC sets interrupt flag IR.ELO.
Note: Byte access: Reading byte 2 will reset CEL to zero, reading bytes 3/1/0 has no impact.
16 30.10.2018
Revision 3.3.0 M_CAN
R-0x0 R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R-0 X-0 X-0 X-0 X-0 S-0x7 R-0 R-0 R-0 R-0x0 S-0x7
30.10.2018 17
M_CAN Revision 3.3.0
0x048 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
30.10.2018 19
M_CAN Revision 3.3.0
The flags are set when one of the listed conditions is detected (edge-sensitive). The flags remain
set until the Host clears them. A flag is cleared by writing a ’1’ to the corresponding bit position.
Writing a ’0’ has no effect. A hard reset will clear the register. The configuration of IE controls
whether an interrupt is generated. The configuration of ILS controls on which interrupt line an
interrupt is signalled.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0x50 res ARA PED PEA WDI BO EW EP ELO BEU BEC DRX TOO MRAF TSW
R-0x0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TEFL TEFF TEFW TEFN TFE TCF TC HPM RF1L RF1F RF1W RF1N RF0L RF0F RF0W RF0N
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bit 28 PED: Protocol Error in Data Phase (Data Bit Time is used)
0= No protocol error in data phase
1= Protocol error in data phase detected (PSR.DLEC ≠ 0,7)
Bit 27 PEA: Protocol Error in Arbitration Phase (Nominal Bit Time is used)
0= No protocol error in arbitration phase
1= Protocol error in arbitration phase detected (PSR.LEC ≠ 0,7)
20 30.10.2018
Revision 3.3.0 M_CAN
The flag is also set when the Tx Handler was not able to read a message from the Message RAM
in time. In this case message transmission is aborted. In case of a Tx Handler access failure the
M_CAN is switched into Restricted Operation Mode (see Section 3.1.5). To leave Restricted
Operation Mode, the Host CPU has to reset CCCR.ASM.
0= No Message RAM access failure occurred
1= Message RAM access failure occurred
30.10.2018 21
M_CAN Revision 3.3.0
22 30.10.2018
Revision 3.3.0 M_CAN
The settings in the Interrupt Enable register determine which status changes in the Interrupt
Register will be signalled on an interrupt line.
0= Interrupt disabled
1= Interrupt enabled
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MRAF
0x54 res ARAE PEDE PEAE WDIE BOE EWE EPE ELOE BEUE BECE DRXE TOOE E
TSWE
R-0x0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TEFLE TEFFE TEFWE TEFNE TFEE TCFE TCE HPME RF1LE RF1FE RF1WE RF1NE RF0LE RF0FE RF0WE RF0NE
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
30.10.2018 23
M_CAN Revision 3.3.0
24 30.10.2018
Revision 3.3.0 M_CAN
The Interrupt Line Select register assigns an interrupt generated by a specific interrupt flag from the
Interrupt Register to one of the two module interrupt lines. For interrupt generation the respective
interrupt line has to be enabled via ILE.EINT0 and ILE.EINT1.
0= Interrupt assigned to interrupt line m_can_int0
1= Interrupt assigned to interrupt line m_can_int1
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MRAF
0x58 res ARAL PEDL PEAL WDIL BOL EWL EPL ELOL BEUL BECL DRXL TOOL L
TSWL
R-0x0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TEFLL TEFFL TEFWL TEFNL TFEL TCFL TCL HPML RF1LL RF1FL RF1WL RF1NL RF0LL RF0FL RF0WL RF0NL
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
30.10.2018 25
M_CAN Revision 3.3.0
Each of the two interrupt lines to the CPU can be enabled / disabled separately by programming bits
EINT0 and EINT1.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0x5C res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
26 30.10.2018
Revision 3.3.0 M_CAN
Global settings for Message ID filtering. The Global Filter Configuration controls the filter path for
standard and extended messages as described in Figure 6 and Figure 7.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0x80 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
30.10.2018 27
M_CAN Revision 3.3.0
Settings for 11-bit standard Message ID filtering. The Standard ID Filter Configuration controls the
filter path for standard messages as described in Figure 6.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R-0x0 RP-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FLSSA[15:2] res
RP-0x0 R-0x0
Settings for 29-bit extended Message ID filtering. The Extended ID Filter Configuration controls the
filter path for standard messages as described in Figure 7.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R-0x0 RP-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FLESA[15:2] res
RP-0x0 R-0x0
28 30.10.2018
Revision 3.3.0 M_CAN
R-0x0 RP-0x1FFF
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EIDM[15:0]
RP-0xFFFF
This register is updated every time a Message ID filter element configured to generate a priority
event matches. This can be used to monitor the status of incoming high priority messages and to
enable fast access to these messages.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0x94 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x98 ND31 ND30 ND29 ND28 ND27 ND26 ND25 ND24 ND23 ND22 ND21 ND20 ND19 ND18 ND17 ND16
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ND15 ND14 ND13 ND12 ND11 ND10 ND9 ND8 ND7 ND6 ND5 ND4 ND3 ND2 ND1 ND0
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
0x9C ND63 ND62 ND61 ND60 ND59 ND58 ND57 ND56 ND55 ND54 ND53 ND52 ND51 ND50 ND49 ND48
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ND47 ND46 ND45 ND44 ND43 ND42 ND41 ND40 ND39 ND38 ND37 ND36 ND35 ND34 ND33 ND32
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
30 30.10.2018
Revision 3.3.0 M_CAN
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
F0SA[15:2] res
RP-0x0 R-0x0
30.10.2018 31
M_CAN Revision 3.3.0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
32 30.10.2018
Revision 3.3.0 M_CAN
0xA8 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
res F0AI[5:0]
R-0x0 RW-0x0
0xAC res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RBSA[15:2] res
RP-0x0 R-0x0
30.10.2018 33
M_CAN Revision 3.3.0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
F1SA[15:2] res
RP-0x0 R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0xB8 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
res F1AI[5:0]
R-0x0 RW-0x0
30.10.2018 35
M_CAN Revision 3.3.0
Configures the number of data bytes belonging to an Rx Buffer / Rx FIFO element. Data field sizes
>8 bytes are intended for CAN FD operation only.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0xBC res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
36 30.10.2018
Revision 3.3.0 M_CAN
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TBSA[15:2] res
RP-0x0 R-0x0
30.10.2018 37
M_CAN Revision 3.3.0
The Tx FIFO/Queue status is related to the pending Tx requests listed in register TXBRP. Therefore
the effect of Add/Cancellation requests may be delayed due to a running Tx scan (TXBRP not yet
updated).
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
38 30.10.2018
Revision 3.3.0 M_CAN
Configures the number of data bytes belonging to a Tx Buffer element. Data field sizes > 8 bytes are
intended for CAN FD operation only.
Bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0xC8 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
res TBDS[2:0]
R-0x0 RP-0x0
30.10.2018 39
M_CAN Revision 3.3.0
0xCC TRP31 TRP30 TRP29 TRP28 TRP27 TRP26 TRP25 TRP24 TRP23 TRP22 TRP21 TRP20 TRP19 TRP18 TRP17 TRP16
R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TRP15 TRP14 TRP13 TRP12 TRP11 TRP10 TRP9 TRP8 TRP7 TRP6 TRP5 TRP4 TRP3 TRP2 TRP1 TRP0
R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0
TXBRP bits are set only for those Tx Buffers configured via TXBC. After a TXBRP bit has been set,
a Tx scan (see Section 3.5, Tx Handling) is started to check for the pending Tx request with the
highest priority (Tx Buffer with lowest Message ID).
A cancellation request resets the corresponding transmission request pending bit of register
TXBRP. In case a transmission has already been started when a cancellation is requested, this is
done at the end of the transmission, regardless whether the transmission was successful or not. The
cancellation request bits are reset directly after the corresponding TXBRP bit has been reset.
After a cancellation has been requested, a finished cancellation is signalled via TXBCF
• after successful transmission together with the corresponding TXBTO bit
• when the transmission has not yet been started at the point of cancellation
• when the transmission has been aborted due to lost arbitration
• when an error occurred during frame transmission
In DAR mode all transmissions are automatically cancelled if they are not successful. The
corresponding TXBCF bit is set for all unsuccessful transmissions.
0= No transmission request pending
1= Transmission request pending
Note: TXBRP bits which are set while a Tx scan is in progress are not considered during this
particular Tx scan. In case a cancellation is requested for such a Tx Buffer, this Add
Request is cancelled immediately, the corresponding TXBRP bit is reset.
40 30.10.2018
Revision 3.3.0 M_CAN
0xD0 AR31 AR30 AR29 AR28 AR27 AR26 AR25 AR24 AR23 AR22 AR21 AR20 AR19 AR18 AR17 AR16
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AR15 AR14 AR13 AR12 AR11 AR10 AR9 AR8 AR7 AR6 AR5 AR4 AR3 AR2 AR1 AR0
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
0xD4 CR31 CR30 CR29 CR28 CR27 CR26 CR25 CR24 CR23 CR22 CR21 CR20 CR19 CR18 CR17 CR16
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CR15 CR14 CR13 CR12 CR11 CR10 CR9 CR8 CR7 CR6 CR5 CR4 CR3 CR2 CR1 CR0
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
30.10.2018 41
M_CAN Revision 3.3.0
0xD8 TO31 TO30 TO29 TO28 TO27 TO26 TO25 TO24 TO23 TO22 TO21 TO20 TO19 TO18 TO17 TO16
R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TO15 TO14 TO13 TO12 TO11 TO10 TO9 TO8 TO7 TO6 TO5 TO4 TO3 TO2 TO1 TO0
R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0
0xDC CF31 CF30 CF29 CF28 CF27 CF26 CF25 CF24 CF23 CF22 CF21 CF20 CF19 CF18 CF17 CF16
R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CF15 CF14 CF13 CF12 CF11 CF10 CF9 CF8 CF7 CF6 CF5 CF4 CF3 CF2 CF1 CF0
R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0 R-0
42 30.10.2018
Revision 3.3.0 M_CAN
0xE0 TIE31 TIE30 TIE29 TIE28 TIE27 TIE26 TIE25 TIE24 TIE23 TIE22 TIE21 TIE20 TIE19 TIE18 TIE17 TIE16
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TIE15 TIE14 TIE13 TIE12 TIE11 TIE10 TIE9 TIE8 TIE7 TIE6 TIE5 TIE4 TIE3 TIE2 TIE1 TIE0
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
0xE4 CFIE31 CFIE30 CFIE29 CFIE28 CFIE27 CFIE26 CFIE25 CFIE24 CFIE23 CFIE22 CFIE21 CFIE20 CFIE19 CFIE18 CFIE17 CFIE16
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CFIE15 CFIE14 CFIE13 CFIE12 CFIE11 CFIE10 CFIE9 CFIE8 CFIE7 CFIE6 CFIE5 CFIE4 CFIE3 CFIE2 CFIE1 CFIE0
RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0 RW-0
30.10.2018 43
M_CAN Revision 3.3.0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EFSA[15:2] res
RP-0x0 R-0x0
44 30.10.2018
Revision 3.3.0 M_CAN
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0xF8 res
R-0x0
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
res EFAI[4:0]
R-0x0 RW-0x0
30.10.2018 45
M_CAN Revision 3.3.0
The Message RAM has a width of 32 bits. In case parity checking or ECC is used a respective
number of bits has to be added to each word. The M_CAN module can be configured to allocate up
to 4352 words in the Message RAM. It is not necessary to configure each of the sections listed in
Figure 2, nor is there any restriction with respect to the sequence of the sections.
When operated in CAN FD mode the required Message RAM size strongly depends on the element
size configured for Rx FIFO0, Rx FIFO1, Rx Buffers, and Tx Buffers via RXESC.F0DS,
RXESC.F1DS, RXESC.RBDS, and TXESC.TBDS.
Start Address
SIDFC.FLSSA
11-bit Filter 0-128 elements / 0-128 words
XIDFC.FLESA
29-bit Filter 0-64 elements / 0-128 words
RXF0C.F0SA
Rx FIFO 0 0-64 elements / 0-1152 words
RXBC.RBSA
Rx Buffers 0-64 elements / 0-1152 words
TXEFC.EFSA
Tx Event FIFO 0-32 elements / 0-64 words
TXBC.TBSA
Tx Buffers 0-32 elements / 0-576 words
32 bit
When the M_CAN addresses the Message RAM it addresses 32-bit words, not single bytes. The
configurable start addresses are 32-bit word addresses i.e. only bits 15 to 2 are evaluated, the two
least significant bits are ignored.
Note: The M_CAN does not check for erroneous configuration of the Message RAM. Especially
the configuration of the start addresses of the different sections and the number of
elements of each section has to be done carefully to avoid falsification or loss of data.
46 30.10.2018
Revision 3.3.0 M_CAN
Up to 64 Rx Buffers and two Rx FIFOs can be configured in the Message RAM. Each Rx FIFO
section can be configured to store up to 64 received messages. The structure of a Rx Buffer / FIFO
element is shown in Table 49 below. The element size can be configured for storage of CAN FD
messages with up to 64 bytes data field via register RXESC.
R1A: When no TSU is used (CCCR.UTSU = ‘0’), R1A.RXTS[15:0] holds the 16-bit timestamp
generated by the M_CAN’s internal timestamping logic.
R1B: When a TSU is used (CCCR.UTSU = ‘1’) and when bit SSYNC/ESYNC of the matching filter
element is set, R1B.TSC = ‘1’ and R1B.RXTSP[3:0] holds the number of the TSU’s Timestamp
register which holds the 32-bit timestamp captured by the TSU. Else R1B.TSC = ‘0’ and
R1B.RXTSP[3:0] is not valid.
31 24 23 16 15 8 7 0
RTR
XTD
ESI
R0 ID[28:0]
ANMF
BRS
FDF
res
RXTSP
BRS
TSC
FDF
res
30.10.2018 47
M_CAN Revision 3.3.0
Note: There are no remote frames in CAN FD format. In CAN FD frames (FDF = 1’), the dominant
RRS (Remote Request Substitution) bit replaces bit RTR (Remote Transmission Re-
quest).
Number of TSU Time Stamp register (TS0..15) where the related timestamp is stored.
48 30.10.2018
Revision 3.3.0 M_CAN
31 24 23 16 15 8 7 0
RTR
XTD
ESI
T0 ID[28:0]
TSCE
BRS
EFC
FDF
30.10.2018 49
M_CAN Revision 3.3.0
Note: When RTR = 1, the M_CAN transmits a remote frame according to ISO 11898-1:2015, even
if CCCR.FDOE enables the transmission in CAN FD format.
50 30.10.2018
Revision 3.3.0 M_CAN
Each element stores information about transmitted messages. By reading the Tx Event FIFO the
Host CPU gets this information in the order the messages were transmitted. Status information
about the Tx Event FIFO can be obtained from register TXEFS.
E1A: When CCCR.WMM = ‘0’ and no TSU is used (CCCR.UTSU = ‘0’), E1A.TXTS[15:0] holds the
16-bit timestamp generated by the M_CAN’s internal timestamping logic.
E1B: When 16-bit Message Markers are enabled (CCCR.WMM =’1’) or when CCCR.UTSU = ‘1’,
E1B.MM[15:8] holds the upper 8 bit of the Wide Message Marker. When a TSU is used
(CCCR.UTSU = ‘1’) and when bit TSCE of the related Tx Buffer element is set, E1B.TSC = ‘1’ and
E1B.TXTSP[3:0] holds the number of the TSU’s Timestamp register which holds the 32-bit
timestamp captured by the TSU. Else E1B.TSC = ‘0’ and E1B.TXTSP[3:0] is not valid.
31 24 23 16 15 8 7 0
RTR
XTD
ESI
E0 ID[28:0]
BRS
FDF
TXTSP
BRS
TSC
FDF
30.10.2018 51
M_CAN Revision 3.3.0
Up to 128 filter elements can be configured for 11-bit IDs. When accessing a Standard Message ID
Filter element, its address is the Filter List Standard Start Address SIDFC.FLSSA plus the index of
the filter element (0…127).
31 24 23 16 15 8 7 0
SFT[1:0]
SSYNC
SFID2[10:9] decides whether the received message is stored into an Rx Buffer or treated as
message A, B, or C of the debug message sequence.
00= Store message into an Rx Buffer
01= Debug Message A
10= Debug Message B
11= Debug Message C
SFID2[8:6] is used to control the filter event pins m_can_fe[2:0] at the Extension Interface. A one
at the respective bit position enables generation of a pulse at the related filter event pin with the
duration of one m_can_hclk period in case the filter matches.
SFID2[5:0] defines the offset to the Rx Buffer Start Address RXBC.RBSA for storage of a matching
message.
30.10.2018 53
M_CAN Revision 3.3.0
Up to 64 filter elements can be configured for 29-bit IDs. When accessing an Extended Message ID
Filter element, its address is the Filter List Extended Start Address XIDFC.FLESA plus two times
the index of the filter element (0…63).
31 24 23 16 15 8 7 0
F0 EFEC[2:0] EFID1[28:0]
EFT[1:0]
ESYNC
F1 EFID2[28:0]
First ID of extended ID filter element. When filtering for Rx Buffers, Sync messages, or for debug
messages this field defines the ID of an extended message to be stored. The received identifiers
must match exactly, only XIDAM masking mechanism (see Section 3.4.1.5) is used.
54 30.10.2018
Revision 3.3.0 M_CAN
EFID2[10:9] decides whether the received message is stored into an Rx Buffer or treated as
message A, B, or C of the debug message sequence.
00= Store message into an Rx Buffer
01= Debug Message A
10= Debug Message B
11= Debug Message C
EFID2[8:6] is used to control the filter event pins m_can_fe[2:0] at the Extension Interface. A one
at the respective bit position enables generation of a pulse at the related filter event pin with the
duration of one m_can_hclk period in case the filter matches.
EFID2[5:0] defines the offset to the Rx Buffer Start Address RXBC.RBSA for storage of a matching
message.
30.10.2018 55
M_CAN Revision 3.3.0
56 30.10.2018
Chapter 3.
3. Functional Description
Software initialization is started by setting bit CCCR.INIT, either by software or by a hardware reset,
when an uncorrected bit error was detected in the Message RAM, or by going Bus_Off. While
CCCR.INIT is set, message transfer from and to the CAN bus is stopped, the status of the CAN bus
output m_can_tx is recessive (HIGH). The counters of the Error Management Logic EML are
unchanged. Setting CCCR.INIT does not change any configuration register. Resetting CCCR.INIT
finishes the software initialization. Afterwards the Bit Stream Processor BSP synchronizes itself to
the data transfer on the CAN bus by waiting for the occurrence of a sequence of 11 consecutive
recessive bits (≡ Bus_Idle) before it can take part in bus activities and start the message transfer.
Access to the M_CAN configuration registers is only enabled when both bits CCCR.INIT and
CCCR.CCE are set (protected write).
CCCR.CCE can only be set/reset while CCCR.INIT = ‘1’. CCCR.CCE is automatically reset when
CCCR.INIT is reset.
In addition the state machines of the Tx Handler and Rx Handler are held in idle state while
CCCR.CCE = ‘1’.
Once the M_CAN is initialized and CCCR.INIT is reset to zero, the M_CAN synchronizes itself to the
CAN bus and is ready for communication.
After passing the acceptance filtering, received messages including Message ID and DLC are
stored into a dedicated Rx Buffer or into Rx FIFO 0 or Rx FIFO 1.
There are two variants in the CAN FD frame transmission, first the CAN FD frame without bit rate
switching. The second variant is the CAN FD frame where control field, data field, and CRC field are
transmitted with a higher bit rate than the beginning and the end of the frame.
The previously reserved bit in CAN frames with 11-bit identifiers and the first previously reserved bit
in CAN frames with 29-bit identifiers will now be decoded as FDF bit. FDF = recessive signifies a
CAN FD frame, FDF = dominant signifies a Classic CAN frame. In a CAN FD frame, the two bits
following FDF, res and BRS, decide whether the bit rate inside of this CAN FD frame is switched. A
CAN FD bit rate switch is signified by res = dominant and BRS = recessive. The coding of
res = recessive is reserved for future expansion of the protocol. In case the M_CAN receives a
frame with FDF = recessive and res = recessive, it will signal a Protocol Exception Event by setting
bit PSR.PXE. When Protocol Exception Handling is enabled (CCCR.PXHD = ‘0’), this causes the
operation state to change from Receiver (PSR.ACT = “10”) to Integrating (PSR.ACT = “00”) at the
next sample point. In case Protocol Exception Handling is disabled (CCCR.PXHD = ‘1’), the M_CAN
will treat a recessive res bit as an form error and will respond with an error frame.
With CCCR.FDOE = ‘0’, the setting of bits FDF and BRS is ignored and frames are transmitted in
Classic CAN format. With CCCR.FDOE = ‘1’ and CCCR.BRSE = ‘0’, only bit FDF of a Tx Buffer
element is evaluated. With CCCR.FDOE = ‘1’ and CCCR.BRSE = ‘1’, transmission of CAN FD
frames with bit rate switching is enabled. All Tx Buffer elements with bits FDF and BRS set are
transmitted in CAN FD format with bit rate switching.
A mode change during CAN operation is only recommended under the following conditions:
• The failure rate in the CAN FD data phase is significant higher than in the CAN FD arbitration
phase. In this case disable the CAN FD bit rate switching option for transmissions.
• During system startup all nodes are transmitting Classic CAN messages until it is verified that
they are able to communicate in CAN FD format. If this is true, all nodes switch to CAN FD
operation.
• Wake-up messages in CAN Partial Networking have to be transmitted in Classic CAN format.
• End-of-line programming in case not all nodes are CAN FD capable. Non CAN FD nodes are held
in Silent mode until programming has completed. Then all nodes switch back to Classic CAN
communication.
58 30.10.2018
Revision 3.3.0 M_CAN
In the CAN FD format, the coding of the DLC differs from the standard CAN format. The DLC codes
0 to 8 have the same coding as in standard CAN, the codes 9 to 15, which in standard CAN all code
a data field of 8 bytes, are coded according to Table 54 below.
DLC 9 10 11 12 13 14 15
Number of Data Bytes 12 16 20 24 32 48 64
The maximum configurable bit rate in the CAN FD data phase depends on the CAN clock frequency
(m_can_cclk). Example: with a CAN clock frequency of 20MHz and the shortest configurable bit
time of 4 tq, the bit rate in the data phase is 5 Mbit/s.
In both data frame formats, CAN FD and CAN FD with bit rate switching, the value of the bit ESI
(Error Status Indicator) is determined by the transmitter’s error state at the start of the transmission.
If the transmitter is error passive, ESI is transmitted recessive, else it is transmitted dominant.
During the data phase of a CAN FD transmission only one node is transmitting, all others are
receivers. The length of the bus line has no impact. When transmitting via pin m_can_tx the M_CAN
receives the transmitted data from its local CAN transceiver via pin m_can_rx. The received data is
delayed by the transmitter delay. In case this delay is greater than TSEG1 (time segment before
sample point), a bit error is detected. In order to enable a data phase bit time that is even shorter
than the transmitter delay, the delay compensation is introduced. Without transmitter delay
compensation, the bit rate in the data phase of a CAN FD frame is limited by the transmitter delay.
3.1.4.1 Description
The M_CAN’s protocol unit has implemented a delay compensation mechanism to compensate the
transmitter delay, thereby enabling transmission with higher bit rates during the CAN FD data phase
independent of the delay of a specific CAN transceiver.
To check for bit errors during the data phase of transmitting nodes, the delayed transmit data is
compared against the received data at the Secondary Sample Point SSP. If a bit error is detected,
the transmitter will react on this bit error at the next following regular sample point. During arbitration
phase the delay compensation is always disabled.
The transmitter delay compensation enables configurations where the data bit time is shorter than
the transmitter delay, it is described in detail in ISO 11898-1:2015. It is enabled by setting bit
DBTP.TDC.
The received bit is compared against the transmitted bit at the SSP. The SSP position is defined as
the sum of the measured delay from the M_CAN’s transmit output m_can_tx through the transceiver
to the receive input m_can_rx plus the transmitter delay compensation offset as configured by
TDCR.TDCO. The transmitter delay compensation offset is used to adjust the position of the SSP
inside the received bit (e.g. half of the bit time in the data phase). The position of the secondary
sample point is rounded down to the next integer number of mtq.
PSR.TDCV shows the actual transmitter delay compensation value. PSR.TDCV is cleared when
CCCR.INIT is set and is updated at each transmission of an FD frame while DBTP.TDC is set.
30.10.2018 59
M_CAN Revision 3.3.0
The following boundary conditions have to be considered for the transmitter delay compensation
implemented in the M_CAN:
• The sum of the measured delay from m_can_tx to m_can_rx and the configured transmitter
delay compensation offset TDCR.TDCO has to be less than 6 bit times in the data phase.
• The sum of the measured delay from m_can_tx to m_can_rx and the configured transmitter
delay compensation offset TDCR.TDCO has to be less or equal 127 mtq. In case this sum
exceeds 127 mtq, the maximum value of 127 mtq is used for transmitter delay compensation.
• The data phase ends at the sample point of the CRC delimiter, that stops checking of receive bits
at the SSPs
Transmitter
Delay E
S
FDF res BRS I DLC
Start Stop
Delay
m_can_cclk Delay Counter
SSP Position
Delay Compensation Offset
TDCR.TDCO
To avoid that a dominant glitch inside the received FDF bit ends the delay compensation
measurement before the falling edge of the received res bit, resulting in a to early SSP position, the
use of a transmitter delay compensation filter window can be enabled by programming TDCR.TDCF.
This defines a minimum value for the SSP position. Dominant edges on m_can_rx, that would result
in an earlier SSP position are ignored for transmitter delay measurement. The measurement is
stopped when the SSP position is at least TDCR.TDCF AND m_can_rx is low.
Note: The M_CAN always performs Transmitter Delay measurement, it does not support the
configuration of a static (fixed) Transmitter Delay.
60 30.10.2018
Revision 3.3.0 M_CAN
In Restricted Operation Mode the node is able to receive data and remote frames and to give
acknowledge to valid frames, but it does not send data frames, remote frames, active error frames,
or overload frames. In case of an error condition or overload condition, it does not send dominant
bits, instead it waits for the occurrence of bus idle condition to resynchronize itself to the CAN
communication. The error counters (ECR.REC, ECR.TEC) are frozen while Error Logging
(ECR.CEL) is active. The Host can set the M_CAN into Restricted Operation mode by setting bit
CCCR.ASM. The bit can only be set by the Host when both CCCR.CCE and CCCR.INIT are set to
‘1’. The bit can be reset by the Host at any time.
Restricted Operation Mode is automatically entered when the Tx Handler was not able to read data
from the Message RAM in time. To leave Restricted Operation Mode, the Host CPU has to reset
CCCR.ASM.
The Restricted Operation Mode can be used in applications that adapt themselves to different CAN
bit rates. In this case the application tests different bit rates and leaves the Restricted Operation
Mode after it has received a valid frame.
If the M_CAN is connected to a Clock Calibration on CAN unit, CCCR.ASM is controlled by input
m_can_cok. In case m_can_cok switches to ‘0’, bit CCCR.ASM is set. When m_can_cok switches
back to ‘1’, bit CCCR.ASM returns to the previously written value. When there is no Clock Calibration
on CAN unit connected input m_can_cok is hardwired to ‘1’.
Note: The Restricted Operation Mode must not be combined with the Loop Back Mode (internal
or external).
The M_CAN is set in Bus Monitoring Mode by programming CCCR.MON to one. In Bus Monitoring
Mode (see ISO 11898-1:2015, 10.14 Bus monitoring), the M_CAN is able to receive valid data
frames and valid remote frames, but cannot start a transmission. In this mode, it sends only
recessive bits on the CAN bus. If the M_CAN is required to send a dominant bit (ACK bit, overload
flag, active error flag), the bit is rerouted internally so that the M_CAN monitors this dominant bit,
although the CAN bus may remain in recessive state. In Bus Monitoring Mode register TXBRP is
held in reset state.
The Bus Monitoring Mode can be used to analyze the traffic on a CAN bus without affecting it by the
transmission of dominant bits. Figure 5 shows the connection of signals m_can_tx and m_can_rx
to the M_CAN in Bus Monitoring Mode.
m_can_tx m_can_rx
=1
• •
Tx Rx
M_CAN
30.10.2018 61
M_CAN Revision 3.3.0
According to the CAN Specification (see ISO 11898-1:2015, 8.3.4 Recovery Management), the
M_CAN provides means for automatic retransmission of frames that have lost arbitration or that
have been disturbed by errors during transmission. By default automatic retransmission is enabled.
To support time-triggered communication as described in ISO 11898-1:2015, chapter 9.2, the
automatic retransmission may be disabled via CCCR.DAR.
In DAR mode all transmissions are automatically cancelled after they started on the CAN bus. A Tx
Buffer’s Tx Request Pending bit TXBRP.TRPx is reset after successful transmission, when a
transmission has not yet been started at the point of cancellation, has been aborted due to lost
arbitration, or when an error occurred during frame transmission.
• Successful transmission:
Corresponding Tx Buffer Transmission Occurred bit TXBTO.TOx set
Corresponding Tx Buffer Cancellation Finished bit TXBCF.CFx not set
• Successful transmission in spite of cancellation:
Corresponding Tx Buffer Transmission Occurred bit TXBTO.TOx set
Corresponding Tx Buffer Cancellation Finished bit TXBCF.CFx set
• Arbitration lost or frame transmission disturbed:
Corresponding Tx Buffer Transmission Occurred bit TXBTO.TOx not set
Corresponding Tx Buffer Cancellation Finished bit TXBCF.CFx set
In case of a successful frame transmission, and if storage of Tx events is enabled, a Tx Event FIFO
element is written with Event Type ET = “10” (transmission in spite of cancellation).
The M_CAN can be set into power down mode controlled by input signal m_can_clkstop_req or
via CC Control Register CCCR.CSR. As long as the clock stop request signal m_can_clkstop_req
is active, bit CCCR.CSR is read as one.
When all pending transmission requests have completed, the M_CAN waits until bus idle state is
detected. Then the M_CAN sets then CCCR.INIT to one to prevent any further CAN transfers. Now
the M_CAN acknowledges that it is ready for power down by setting output signal
m_can_clkstop_ack to one and CCCR.CSA to one. Before the module clocks m_can_hclk and
m_can_cclk are switched off, further register accesses can be made except for CCCR.INIT which
is held at one.
Note: In case of a heavily disturbed CAN bus, it may happen that idle state is never reached
and CCCR.INIT is therefore not set by the M_CAN. This situation can be detected by
polling PSR.ACT. In case the M_CAN does not enter idle state, the software can write
CCCR.INIT = ‘1’ which stops CAN communication of the M_CAN immediately, regardless
whether there is a transmission/reception ongoing or not.
To leave power down mode, the application has to turn on the module clocks before resetting signal
m_can_clkstop_req resp. CC Control Register flag CCCR.CSR. The M_CAN will acknowledge this
by resetting output signal m_can_clkstop_ack and resetting CCCR.CSA. Afterwards, the
application can restart CAN communication by resetting bit CCCR.INIT.
62 30.10.2018
Revision 3.3.0 M_CAN
To enable write access to register TEST (see Section 2.3.5), bit CCCR.TEST has to be set to one.
This allows the configuration of the test modes and test functions.
Four output functions are available for the CAN transmit pin m_can_tx by programming TEST.TX.
Additionally to its default function – the serial data output – it can drive the CAN Sample Point signal
to monitor the M_CAN’s bit timing and it can drive constant dominant or recessive values. The actual
value at pin m_can_rx can be read from TEST.RX. Both functions can be used to check the CAN
bus’ physical layer.
Due to the synchronization mechanism between CAN clock and Host clock domain, there may be a
delay of several Host clock periods between writing to TEST.TX until the new configuration is visible
at output pin m_can_tx. This applies also when reading input pin m_can_rx via TEST.RX.
Note: Test modes should be used for production tests or self test only. The software control
for pin m_can_tx interferes with all CAN protocol functions. It is not recommended to
use test modes for application.
The M_CAN can be set in External Loop Back Mode by programming TEST.LBCK to one. In Loop
Back Mode, the M_CAN treats its own transmitted messages as received messages and stores
them (if they pass acceptance filtering) into an Rx Buffer or an Rx FIFO. Figure 5 shows the
connection of signals m_can_tx and m_can_rx to the M_CAN in External Loop Back Mode.
This mode is provided for hardware self-test. To be independent from external stimulation, the
M_CAN ignores acknowledge errors (recessive bit sampled in the acknowledge slot of a data/remote
frame) in Loop Back Mode. In this mode the M_CAN performs an internal feedback from its Tx
output to its Rx input. The actual value of the m_can_rx input pin is disregarded by the M_CAN. The
transmitted messages can be monitored at the m_can_tx pin.
Internal Loop Back Mode is entered by programming bits TEST.LBCK and CCCR.MON to one. This
mode can be used for a “Hot Selftest”, meaning the M_CAN can be tested without affecting a
running CAN system connected to the pins m_can_tx and m_can_rx. In this mode pin m_can_rx
is disconnected from the M_CAN and pin m_can_tx is held recessive. Figure 5 shows the
connection of m_can_tx and m_can_rx to the M_CAN in case of Internal Loop Back Mode.
=1
• • • •
Tx Rx Tx Rx
M_CAN M_CAN
30.10.2018 63
M_CAN Revision 3.3.0
For internal timestamp generation the M_CAN supplies a 16-bit wrap-around counter. A prescaler
TSCC.TCP can be configured to clock the counter in multiples of CAN bit times (1…16). The counter
is readable via TSCV.TSC. A write access to register TSCV resets the counter to zero. When the
timestamp counter wraps around interrupt flag IR.TSW is set.
On start of frame reception / transmission (SOF) the counter value is captured and stored into the
timestamp section of an Rx Buffer / Rx FIFO (RXTS[15:0]) or Tx Event FIFO (TXTS[15:0]) element.
By programming bit TSCC.TSS, the external 16-bit timebase vector input (m_can_ext_ts[15:0]) of
the M_CAN can be captured as timestamp instead of the internal 16-bit counter.
An external Time Stamping Unit (TSU) for generation of 32-bit timestamps according to CiA 603 can
be connected to the M_CAN’s TSU Interface. External timestamping is enabled when CCCR.UTSU
= ‘1’.
To filter for Sync messages a Standard or Extended Filter Element has to be configured with the
Sync message’s ID and bit SSYNC resp. ESYNC set to one.
At the end of frame reception / transmission (EOF), the timestamp is captured by the TSU, controlled
by the M_CAN’s output signals m_can_tsrx and m_can_tstx. The number of the TSU’s Timestamp
register which holds the captured timestamp is signalled to the M_CAN by m_can_tsp[2:0] and is
stored into the related Rx Buffer / Rx FIFO element (R1B.RXTSP[2:0]) resp. Tx Event FIFO element
(E1B.TXTSP[2:0]). For a detailed description see the TSU User’s Manual.
The operation mode is selected by TOCC.TOS. When operating in Continuous Mode, the counter
starts when CCCR.INIT is reset. A write to TOCV presets the counter to the value configured by
TOCC.TOP and continues down-counting.
When the Timeout Counter is controlled by one of the FIFOs, an empty FIFO presets the counter to
the value configured by TOCC.TOP. Down-counting is started when the first FIFO element is stored.
Writing to TOCV has no effect.
When the counter reaches zero, interrupt flag IR.TOO is set. In Continuous Mode, the counter is
immediately restarted at TOCC.TOP.
Note: The clock signal for the Timeout Counter is derived from the CAN Core’s sample point
signal. Therefore the point in time where the Timeout Counter is decremented may vary
due to the synchronization / re-synchronization mechanism of the CAN Core. If the bit
rate switch feature in CAN FD is used, the timeout counter is clocked differently in arbi-
tration and data field.
64 30.10.2018
Revision 3.3.0 M_CAN
3.4 Rx Handling
The Rx Handler controls the acceptance filtering, the transfer of received messages to the Rx
Buffers or to one of the two Rx FIFOs, as well as the Rx FIFO’s Put and Get Indices.
The M_CAN offers the possibility to configure two sets of acceptance filters, one for standard
identifiers and one for extended identifiers. These filters can be assigned to an Rx Buffer or to Rx
FIFO 0,1. For acceptance filtering each list of filters is executed from element #0 until the first
matching element. Acceptance filtering stops at the first matching element. The following filter
elements are not evaluated for this message.
Rx Buffer
New Data flag of matching Rx Buffer is not set, but Rx Buffer (partly) overwritten with received data.
For error type see PSR.LEC respectively PSR.DLEC.
Rx FIFO
Put index of matching Rx FIFO is not updated, but related Rx FIFO element (partly) overwritten with
received data. For error type see PSR.LEC respectively PSR.DLEC. In case the matching Rx FIFO
is operated in overwrite mode, the boundary conditions described in Section 3.4.2.2 have to be
considered.
30.10.2018 65
M_CAN Revision 3.3.0
Note: When an accepted message is written to one of the two Rx FIFOs, or into an Rx Buffer,
the unmodified received identifier is stored independent of the filter(s) used. The result
of the acceptance filter process is strongly depending on the sequence of configured
filter elements.
The filter matches for all received frames with Message IDs in the range defined by SF1ID/SF2ID
resp. EF1ID/EF2ID.
There are two possibilities when range filtering is used together with extended frames:
EFT = “00”: The Message ID of received frames is ANDed with the Extended ID AND Mask (XIDAM)
before the range filter is applied
EFT = “11”: The Extended ID AND Mask (XIDAM) is not used for range filtering
A filter element can be configured to filter for one or two specific Message IDs. To filter for one
specific Message ID, the filter element has to be configured with SF1ID = SF2ID resp. EF1ID =
EF2ID.
Classic bit mask filtering is intended to filter groups of Message IDs by masking single bits of a
received Message ID. With classic bit mask filtering SF1ID/EF1ID is used as Message ID filter, while
SF2ID/EF2ID is used as filter mask.
A zero bit at the filter mask will mask out the corresponding bit position of the configured ID filter,
e.g. the value of the received Message ID at that bit position is not relevant for acceptance filtering.
Only those bits of the received Message ID where the corresponding mask bits are one are relevant
for acceptance filtering.
In case all mask bits are one, a match occurs only when the received Message ID and the Message
ID filter are identical. If all mask bits are zero, all Message IDs match.
66 30.10.2018
Revision 3.3.0 M_CAN
Figure 6 below shows the flow for standard Message ID (11-bit Identifier) filtering. The Standard
Message ID Filter element is described in Section 2.4.5.
Controlled by the Global Filter Configuration GFC and the Standard ID Filter Configuration SIDFC
Message ID, Remote Transmission Request bit (RTR), and the Identifier Extension bit (IDE) of
received frames are compared against the list of configured filter elements.
11 bit 29 bit
11 / 29 bit identifier
SIDFC.LSS[7:0] > 0
reject
match filter element #SIDFC.LSS yes acceptance / rejection
no accept
GFC.ANFS[1] = ‘1’
accept non-matching frames discard frame
GFC.ANFS[1] = ‘0’
store frame
30.10.2018 67
M_CAN Revision 3.3.0
Figure 7 below shows the flow for extended Message ID (29-bit Identifier) filtering. The Extended
Message ID Filter element is described in Section 2.4.6.
Controlled by the Global Filter Configuration GFC and the Extended ID Filter Configuration XIDFC
Message ID, Remote Transmission Request bit (RTR), and the Identifier Extension bit (IDE) of
received frames are compared against the list of configured filter elements.
The Extended ID AND Mask XIDAM is ANDed with the received identifier before the filter list is
executed.
11 bit 29 bit
11 / 29 bit identifier
XIDFC.LSE[6:0] = 0
XIDFC.LSE[6:0] > 0
reject
acceptance / rejection yes match filter element #XIDFC.LSE
accept no
GFC.ANFE[1] = ‘1’
discard frame accept non-matching frames
GFC.ANFE[1] = ‘0’
store frame
68 30.10.2018
Revision 3.3.0 M_CAN
3.4.2 Rx FIFOs
Rx FIFO 0 and Rx FIFO 1 can be configured to hold up to 64 elements each. Configuration of the
two Rx FIFOs is done via registers RXF0C and RXF1C.
Received messages that passed acceptance filtering are transferred to the Rx FIFO as configured
by the matching filter element. For a description of the filter mechanisms available for Rx FIFO 0 and
Rx FIFO 1 see Section 3.4.1. The Rx FIFO element is described in Section 2.4.2.
To avoid an Rx FIFO overflow, the Rx FIFO watermark can be used. When the Rx FIFO fill level
reaches the Rx FIFO watermark configured by RXFnC.FnWM, interrupt flag IR.RFnW is set. When
the Rx FIFO Put Index reaches the Rx FIFO Get Index an Rx FIFO Full condition is signalled by
RXFnS.FnF. In addition interrupt flag IR.RFnF is set.
Get Index
RXFnS.FnGI
7 0
6 1
5 2
Put Index 4 3
RXFnS.FnPI
Fill Level
RXFnS.FnFL
When reading from an Rx FIFO, Rx FIFO Get Index RXFnS.FnGI • FIFO Element Size has to be
added to the corresponding Rx FIFO start address RXFnC.FnSA.
30.10.2018 69
M_CAN Revision 3.3.0
The Rx FIFO blocking mode is configured by RXFnC.FnOM = ‘0’. This is the default operation mode
for the Rx FIFOs.
When an Rx FIFO full condition is reached (RXFnS.FnPI = RXFnS.FnGI), no further messages are
written to the corresponding Rx FIFO until at least one message has been read out and the Rx FIFO
Get Index has been incremented. An Rx FIFO full condition is signalled by RXFnS.FnF = ‘1’. In
addition interrupt flag IR.RFnF is set.
In case a message is received while the corresponding Rx FIFO is full, this message is discarded
and the message lost condition is signalled by RXFnS.RFnL = ‘1’. In addition interrupt flag IR.RFnL
is set.
When an Rx FIFO full condition (RXFnS.FnPI = RXFnS.FnGI) is signalled by RXFnS.FnF = ‘1’, the
next message accepted for the FIFO will overwrite the oldest FIFO message. Put and get index are
both incremented by one.
When an Rx FIFO is operated in overwrite mode and an Rx FIFO full condition is signalled, reading
of the Rx FIFO elements should start at least at get index + 1. The reason for that is, that it might
happen, that a received message is written to the Message RAM (put index) while the CPU is
reading from the Message RAM (get index). In this case inconsistent data may be read from the
respective Rx FIFO element. Adding an offset to the get index when reading from the Rx FIFO
avoids this problem. The offset depends on how fast the CPU accesses the Rx FIFO. Figure 9 shows
an offset of two with respect to the get index when reading the Rx FIFO. In this case the two
messages stored in element 1 and 2 are lost.
RXFnS.FnPI
= RXFnS.FnGI element 0 overwritten
7 0 7 0 RXFnS.FnPI
= RXFnS.FnGI
6 1 6 1
5 2 5 2
4 3 4 3
After reading from the Rx FIFO, the number of the last element read has to be written to the Rx FIFO
Acknowledge Index RXFnA.FnA. This increments the get index to that element number. In case the
put index has not been incremented to this Rx FIFO element, the Rx FIFO full condition is reset
(RXFnS.FnF = ‘0’).
70 30.10.2018
Revision 3.3.0 M_CAN
The M_CAN supports up to 64 dedicated Rx Buffers. The start address of the dedicated Rx Buffer
section is configured via RXBC.RBSA.
For each Rx Buffer a Standard or Extended Message ID Filter Element with SFEC / EFEC = “111”
and SFID2 / EFID2[10:9] = “00” has to be configured (see Section 2.4.5 and Section 2.4.6).
After a received message has been accepted by a filter element, the message is stored into the Rx
Buffer in the Message RAM referenced by the filter element. The format is the same as for an Rx
FIFO element. In addition the flag IR.DRX (Message stored in Dedicated Rx Buffer) in the interrupt
register is set.
While an Rx Buffer’s New Data flag is set, a Message ID Filter Element referencing this specific Rx
Buffer will not match, causing the acceptance filtering to continue. Following Message ID Filter
Elements may cause the received message to be stored into another Rx Buffer, or into an Rx FIFO,
or the message may be rejected, depending on filter configuration.
30.10.2018 71
M_CAN Revision 3.3.0
Debug messages are stored into Rx Buffers. For debug handling three consecutive Rx buffers (e.g.
#61, #62, #63) have to be used for storage of debug messages A, B, and C. The format is the same
as for an Rx Buffer or an Rx FIFO element (see M_CAN User’s Manual section 2.4.2).
Advantage: Fixed start address for the DMA transfers (relative to RXBC.RBSA), no additional
configuration required.
For filtering of debug messages Standard / Extended Filter Elements with SFEC / EFEC = “111”
have to be set up. Messages matching these filter elements are stored into the Rx Buffers addressed
by SFID2 / EFID2[5:0].
After message C has been stored, the DMA request output m_can_dma_req is activated and the
three messages can be read from the Message RAM under DMA control. The RAM words holding
the debug messages will not be changed by the M_CAN while m_can_dma_req is activated. The
behaviour is similar to that of an Rx Buffers with its New Data flag set.
After the DMA has completed the DMA unit sets m_can_dma_ack. This resets m_can_dma_req.
Now the M_CAN is prepared to receive the next set of debug messages.
Filtering for debug messages is done by configuring one Standard / Extended Message ID Filter
Element for each of the three debug messages. To enable a filter element to filter for debug
messages SFEC / EFEC has to be programmed to “111”. In this case fields SFID1 / SFID2 and
EFID1 / EFID2 have a different meaning (see Section 2.4.5 and Section 2.4.6). While SFID2 /
EFID2[10:9] controls the debug message handling state machine, SFID2 / EFID2[5:0] controls the
location for storage of a received debug message.
When a debug message is stored, neither the respective New Data flag nor IR.DRX are set. The
reception of debug messages can be monitored via RXF1S.DMS.
The debug message handling state machine assures that debug messages are stored to three
consecutive Rx Buffers in correct order. In case of missing messages the process is restarted. The
DMA request is activated only when all three debug messages A, B, C have been received in correct
order.
72 30.10.2018
Revision 3.3.0 M_CAN
The status of the debug message handling state machine is signalled via RXF1S.DMS.
HW reset or T0
Init state
DMS = 00
T7 T1
T8 T2
T3
DMS = 11 T5 DMS = 01
T6 T4
DMS = 10
30.10.2018 73
M_CAN Revision 3.3.0
3.5 Tx Handling
The Tx Handler handles transmission requests for the dedicated Tx Buffers, the Tx FIFO, and the
Tx Queue. It controls the transfer of transmit messages to the CAN Core, the Put and Get Indices,
and the Tx Event FIFO. Up to 32 Tx Buffers can be set up for message transmission. The CAN mode
for transmission (Classic CAN or CAN FD) can be configured separately for each Tx Buffer element.
The Tx Buffer element is described in Section 2.4.3. Table 58 below describes the possible
configurations for frame transmission.
The Tx Handler starts a Tx scan of the Message RAM to check for the highest priority pending Tx
request (Tx Buffer with lowest Message ID) when the Tx Buffer Request Pending register TXBRP is
updated. TXBRP is updated when a transmission finishes, or after the Host has requested a
transmission by writing to TXBAR, or when the Host has cancelled a pending transmission by
writing to TXBCR.
When there is a new scan-result, the temporary buffers holding the preloaded first four RAM words
of the two messages with the highest Tx priority are updated. The time required for a Tx scan and
the preloading depends on the Host clock frequency, on the number of configured Tx Buffers, and
on the number of M_CANs connected the Message RAM.
As the Tx scan of the Message RAM takes some time, the following scenarios are possible:
• Temporary buffer preloaded before ongoing transmission/reception finished:
Transmission of preloaded Tx message starts at first opportunity
• Preloading of temporary buffer not completed before ongoing transmission/reception finished:
Tx message cannot be started at first opportunity. In this case another node may start a
transmission without having to arbitrate against the transmit message of the M_CAN. If this other
message has lower priority, that may be regarded as an outer priority inversion.
The transmit pause feature is intended for use in CAN systems where the CAN message identifiers
are (permanently) specified to specific values and cannot easily be changed. These message
identifiers may have a higher CAN arbitration priority than other defined messages, while in a
specific application their relative arbitration priority should be inverse. This may lead to a case where
one ECU sends a burst of CAN messages that cause another ECU’s CAN messages to be delayed
because that other messages have a lower CAN arbitration priority.
If e.g. CAN ECU-1 has the transmit pause feature enabled and is requested by its application
software to transmit four messages, it will, after the first successful message transmission, wait for
two CAN bit times of bus idle before it is allowed to start the next requested message. If there are
other ECUs with pending messages, those messages are started in the idle time, they would not
need to arbitrate with the next message of ECU-1. After having received a message, ECU-1 is
allowed to start its next transmission as soon as the received message releases the CAN bus.
74 30.10.2018
Revision 3.3.0 M_CAN
The transmit pause feature is controlled by bit CCCR.TXP. If the bit is set, the M_CAN will, each time
it has successfully transmitted a message, pause for two CAN bit times before starting the next
transmission. This enables other CAN nodes in the network to transmit messages even if their
messages have lower prior identifiers. Default is transmit pause disabled (CCCR.TXP = ‘0’).
This feature looses up burst transmissions coming from a single node and it protects against
"babbling idiot" scenarios where the application program erroneously requests too many
transmissions.
Dedicated Tx Buffers are intended for message transmission under complete control of the Host
CPU. Each Dedicated Tx Buffer is configured with a specific Message ID. In case that multiple Tx
Buffers are configured with the same Message ID, the Tx Buffer with the lowest buffer number is
transmitted first.
If the data section has been updated, a transmission is requested by an Add Request via
TXBAR.ARn. The requested messages arbitrate internally with messages from an optional Tx FIFO
or Tx Queue and externally with messages on the CAN bus, and are sent out according to their
Message ID.
A Dedicated Tx Buffer allocates Element Size 32-bit words in the Message RAM (see Table 59).
Therefore the start address of a dedicated Tx Buffer in the Message RAM is calculated by adding
transmit buffer index (0…31) • Element Size to the Tx Buffer Start Address TXBC.TBSA.
3.5.3 Tx FIFO
New transmit messages have to be written to the Tx FIFO starting with the Tx Buffer referenced by
the Put Index TXFQS.TFQPI. An Add Request increments the Put Index to the next free Tx FIFO
element. When the Put Index reaches the Get Index, Tx FIFO Full (TXFQS.TFQF = ‘1’) is signalled.
In this case no further messages should be written to the Tx FIFO until the next message has been
transmitted and the Get Index has been incremented.
When a single message is added to the Tx FIFO, the transmission is requested by writing a ‘1’ to
the TXBAR bit related to the Tx Buffer referenced by the Tx FIFO’s Put Index.
30.10.2018 75
M_CAN Revision 3.3.0
When multiple (n) messages are added to the Tx FIFO, they are written to n consecutive Tx Buffers
starting with the Put Index. The transmissions are then requested via TXBAR. The Put Index is then
cyclically incremented by n. The number of requested Tx buffers should not exceed the number of
free Tx Buffers as indicated by the Tx FIFO Free Level.
When a transmission request for the Tx Buffer referenced by the Get Index is cancelled, the Get
Index is incremented to the next Tx Buffer with pending transmission request and the Tx FIFO Free
Level is recalculated. When transmission cancellation is applied to any other Tx Buffer, the Get
Index and the FIFO Free Level remain unchanged.
A Tx FIFO element allocates Element Size 32-bit words in the Message RAM (see Table 59).
Therefore the start address of the next available (free) Tx FIFO Buffer is calculated by adding Tx
FIFO/Queue Put Index TXFQS.TFQPI (0…31) • Element Size to the Tx Buffer Start Address
TXBC.TBSA.
3.5.4 Tx Queue
New messages have to be written to the Tx Buffer referenced by the Put Index TXFQS.TFQPI. An
Add Request cyclically increments the Put Index to the next free Tx Buffer. In case that the Tx Queue
is full (TXFQS.TFQF = ’1’), the Put Index is not valid and no further message should be written to
the Tx Queue until at least one of the requested messages has been sent out or a pending
transmission request has been cancelled.
The application may use register TXBRP instead of the Put Index and may place messages to any
Tx Buffer without pending transmission request.
A Tx Queue Buffer allocates Element Size 32-bit words in the Message RAM (see Table 59).
Therefore the start address of the next available (free) Tx Queue Buffer is calculated by adding Tx
FIFO/Queue Put Index TXFQS.TFQPI (0…31) • Element Size to the Tx Buffer Start Address
TXBC.TBSA.
In this case the Tx Buffers section in the Message RAM is subdivided into a set of Dedicated Tx
Buffers and a Tx FIFO. The number of Dedicated Tx Buffers is configured by TXBC.NDTB. The
number of Tx Buffers assigned to the Tx FIFO is configured by TXBC.TFQS. In case TXBC.TFQS
is programmed to zero, only Dedicated Tx Buffers are used.
Buffer Index 0 1 2 3 4 5 6 7 8 9
Tx Sequence 1. 5. 4. 6. 2. 3.
Tx prioritization:
• Scan Dedicated Tx Buffers and oldest pending Tx FIFO Buffer (referenced by TXFS.TFGI)
• Buffer with lowest Message ID gets highest priority and is transmitted next
76 30.10.2018
Revision 3.3.0 M_CAN
In this case the Tx Buffers section in the Message RAM is subdivided into a set of Dedicated Tx
Buffers and a Tx Queue. The number of Dedicated Tx Buffers is configured by TXBC.NDTB. The
number of Tx Queue Buffers is configured by TXBC.TFQS. In case TXBC.TFQS is programmed to
zero, only Dedicated Tx Buffers are used.
Buffer Index 0 1 2 3 4 5 6 7 8 9
Tx Sequence 2. 5. 4. 6. 3. 1.
Put Index
Tx prioritization:
• Scan all Tx Buffers with activated transmission request
• Tx Buffer with lowest Message ID gets highest priority and is transmitted next
The M_CAN supports transmit cancellation. This feature is especially intended for gateway applica-
tions and AUTOSAR based applications. To cancel a requested transmission from a dedicated Tx
Buffer or a Tx Queue Buffer the Host has to write a ‘1’ to the corresponding bit position (=number of
Tx Buffer) of register TXBCR. Transmit cancellation is not intended for Tx FIFO operation.
Successful cancellation is signalled by setting the corresponding bit of register TXBCF to ‘1’.
30.10.2018 77
M_CAN Revision 3.3.0
To support Tx event handling the M_CAN has implemented a Tx Event FIFO. After the M_CAN has
transmitted a message on the CAN bus, Message ID and timestamp are stored in a Tx Event FIFO
element. To link a Tx event to a Tx Event FIFO element, the Message Marker from the transmitted
Tx Buffer is copied into the Tx Event FIFO element.
Whether an 8-bit Message Marker or a 16-bit Wide Message Marker is used can be configured by
CCCR.WMM.
Note: With CCCR.WMM = ‘1’, internal timestamping is disabled (see Section 2.4.4).
The Tx Event FIFO can be configured to a maximum of 32 elements. The Tx Event FIFO element
is described in Section 2.4.4.
The purpose of the Tx Event FIFO is to decouple handling transmit status information from transmit
message handling i.e. a Tx Buffer holds only the message to be transmitted, while the transmit
status is stored separately in the Tx Event FIFO. This has the advantage, especially when operating
a dynamically managed transmit queue, that a Tx Buffer can be used for a new message
immediately after successful transmission. There is no need to save transmit status information from
a Tx Buffer before overwriting that Tx Buffer.
When a Tx Event FIFO full condition is signalled by IR.TEFF, no further elements are written to the
Tx Event FIFO until at least one element has been read out and the Tx Event FIFO Get Index has
been incremented. In case a Tx event occurs while the Tx Event FIFO is full, this event is discarded
and interrupt flag IR.TEFL is set.
To avoid a Tx Event FIFO overflow, the Tx Event FIFO watermark can be used. When the Tx Event
FIFO fill level reaches the Tx Event FIFO watermark configured by TXEFC.EFWM, interrupt flag
IR.TEFW is set.
When reading from the Tx Event FIFO, two times the Tx Event FIFO Get Index TXEFS.EFGI has to
be added to the Tx Event FIFO start address TXEFC.EFSA.
When only a single element has been read from the FIFO (the one being pointed to by the Get
Index), this Get Index value is written to the FIFO Acknowledge Index.
When a sequence of elements has been read from the FIFO, it is sufficient to write the FIFO
Acknowledge Index only once at the end of that read sequence (value: Index of the last element
read), to update the FIFO’s Get Index.
Due to the fact that the CPU has free access to the M_CAN’s Message RAM, special care has to
be taken when reading FIFO elements in an arbitrary order (Get Index not considered). This might
be useful when reading a High Priority Message from one of the two Rx FIFOs. In this case the
FIFO’s Acknowledge Index should not be written because this would set the Get Index to a wrong
position and also alters the FIFO’s Fill Level. In this case some of the older FIFO elements would be
lost.
Note: The application has to ensure that a valid value is written to the FIFO Acknowledge Index.
The M_CAN does not check for erroneous values.
78 30.10.2018
Chapter 4.
4. Appendix
Symbol
Address 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset Value
ENDN
0x04 ETV[31:0]
8765_4321
CUST
0x08 CUST[31:0]
t.b.d.
DTSEG2[3:0]
DBTP
TDC
TX[1:0]
LBCK
TEST
SVAL
PVAL
RX
RWD
0x14 WDV[7:0] WDC[7:0]
0000_0000
PXHD
FDOE
UTSU
BRSE
WMM
TEST
CCCR
NISO
MON
EFBI
ASM
CSR
CCE
DAR
CSA
TXP
INIT
0x18
0000_0001
NBTP
0x1C NSJW[6:0] NBRP[8:0] NTSEG1[7:0] NTSEG2[6:0]
0000_0A33
TSS[1:0]
TSCC
0x20 TCP[3:0]
0000_0000
TSCV
0x24 TSC[15:0]
0000_0000
TOS[1:0]
ETOC
TOCC
0x28 TOP[15:0]
FFFF_0000
Symbol
Address 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset Value
TOCV
0x2C TOC[15:0]
0000_FFFF
ECR
RP
0x40 CEL[7:0] REC[6:0] TEC[7:0]
0000_0000
DLEC[2:0]
ACT[1:0]
LEC[2:0]
RBRS
RESI
RFDF
PSR
PXE
EW
BO
TDCV[6:0]
EP
0x44
0000_0707
TDCR
0x48 TDCO[6:0] TDCF[6:0]
0000_0000
MRAF
TEFW
RF1W
RF0W
TEFN
RF1N
RF0N
IR
TEFF
RF1F
RF0F
TEFL
RF1L
RF0L
TSW
HPM
TOO
DRX
ARA
PED
BEU
BEC
PEA
ELO
WDI
TCF
TFE
EW
BO
EP
TC
0x50
0000_0000
MRAFE
TEFWE
RF1WE
RF0WE
TEFNE
RF1NE
RF0NE
TEFFE
RF1FE
RF0FE
TEFLE
RF1LE
RF0LE
TSWE
HPME
TOOE
DRXE
ARAE
PEDE
BEUE
BECE
PEAE
ELOE
WDIE
TCFE
TFEE
IE
EWE
BOE
EPE
TCE
0x54
0000_0000
MRAFL
TEFWL
RF1WL
RF0WL
TEFNL
RF1NL
RF0NL
TEFFL
RF1FL
RF0FL
TEFLL
RF1LL
RF0LL
TSWL
HPML
TOOL
DRXL
ARAL
PEDL
BEUL
BECL
PEAL
ELOL
ILS
WDIL
TCFL
TFEL
EWL
BOL
EPL
TCL
0x58
0000_0000
EINT1
EINT0
ILE
0x5C
0000_0000
ANFS[1:0]
ANFE[1:0]
RRFS
RRFE
GFC
0x80
0000_0000
SIDFC
0x84 LSS[7:0] FLSSA[15:2]
0000_0000
XIDFC
0x88 LSE[6:0] FLESA[15:2]
0000_0000
XIDAM
0x90 EIDM[28:0]
1FFF_FFFF
MSI[1:0]
HPMS
FLST
80 30.10.2018
Revision 3.3.0 M_CAN
Symbol
Address 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset Value
ND31
ND30
ND29
ND28
ND27
ND26
ND25
ND24
ND23
ND22
ND21
ND20
ND19
ND18
ND17
ND16
ND15
ND14
ND13
ND12
ND11
ND10
NDAT1
ND9
ND8
ND7
ND6
ND5
ND4
ND3
ND2
ND1
ND0
0x98
0000_0000
ND63
ND62
ND61
ND60
ND59
ND58
ND57
ND56
ND55
ND54
ND53
ND52
ND51
ND50
ND49
ND48
ND47
ND46
ND45
ND44
ND43
ND42
ND41
ND40
ND39
ND38
ND37
ND36
ND35
ND34
ND33
ND32
NDAT2
0x9C
0000_0000
F0OM
RXF0C
0xA0 F0WM[6:0] F0S[6:0] F0SA[15:2]
0000_0000
RXF0S
RF0L
F0F
RXF0A
0xA8 F0AI[5:0]
0000_0000
RXBC
0xAC RBSA[15:2]
0000_0000
F1OM
RXF1C
0xB0 F1WM[6:0] F1S[6:0] F1SA[15:2]
0000_0000
DMS[1:0]
RXF1S
RF1L
F1F
RXF1A
0xB8 F1AI[5:0]
0000_0000
RBDS[2:0]
F1DS[2:0]
F0DS[2:0]
RXESC
0xBC
0000_0000
TFQM
TXBC
0xC0 TFQS[5:0] NDTB[5:0] TBSA[15:2]
0000_0000
TFQF
TXFQS
0xC4 TFQPI[4:0] TFGI[4:0] TFFL[5:0]
0000_0000
TBDS[2:0]
TXESC
0xC8
0000_0000
30.10.2018 81
82
M_CAN
0xF8
0xF4
0xF0
0xE4
0xE0
0xD8
0xD4
0xD0
0xDC
0xCC
Address
Table 60
31
EFWM[5:0]
25
EFS[5:0]
17
EFPI[4:0]
CFIE17 TIE17 CF17 TO17 CR17 AR17 TRP17
EFGI[4:0]
8
EFSA[15:2]
CFIE7 TIE7 CF7 TO7 CR7 AR7 TRP7
6
EFFL[5:0]
1
EFAI[4:0]
CFIE1 TIE1 CF1 TO1 CR1 AR1 TRP1
0
TXEFA
Symbol
TXEFS
TXEFC
TXBCF
TXBTO
TXBAR
TXBRP
TXBCR
TXBTIE
TXBCIE
0000_0000
0000_0000
0000_0000
0000_0000
0000_0000
0000_0000
0000_0000
0000_0000
0000_0000
0000_0000
Reset Value
30.10.2018
Revision 3.3.0
Revision 3.3.0 M_CAN
List of Figures
Figure 1 M_CAN Block Diagram ............................................................................................................ 2
Figure 2 Message RAM Configuration................................................................................................. 46
Figure 3 Transmitter Delay Measurement ............................................................................................ 60
Figure 4 Pin Control in Bus Monitoring Mode ...................................................................................... 61
Figure 5 Pin Control in Loop Back Modes ........................................................................................... 63
Figure 6 Standard Message ID Filter Path........................................................................................... 67
Figure 7 Extended Message ID Filter Path .......................................................................................... 68
Figure 8 Rx FIFO Status ...................................................................................................................... 69
Figure 9 Rx FIFO Overflow Handling ................................................................................................... 70
Figure 10 Debug Message Handling State Machine ............................................................................. 73
Figure 11 Example of mixed Configuration Dedicated Tx Buffers / Tx FIFO ......................................... 76
Figure 12 Example of mixed Configuration Dedicated Tx Buffers / Tx Queue....................................... 77
30.10.2018 83
M_CAN Revision 3.3.0
List of Tables
Table 1 M_CAN Register Map.............................................................................................................. 5
Table 2 Core Release Register (addresses 0x00) ............................................................................... 7
Table 3 Example for Coding of Revisions............................................................................................. 7
Table 4 Endian Register (address 0x04) .............................................................................................. 8
Table 5 Data Bit Timing & Prescaler Register (address 0x0C) ............................................................ 8
Table 6 Test Register (address 0x10)................................................................................................... 9
Table 7 RAM Watchdog (address 0x14)............................................................................................. 10
Table 8 CC Control Register (address 0x18) ..................................................................................... 11
Table 9 Nominal Bit Timing & Prescaler Register (address 0x1C) ..................................................... 13
Table 10 Timestamp Counter Configuration (address 0x20)................................................................ 14
Table 11 Timestamp Counter Value (address 0x24) ............................................................................ 14
Table 12 Timeout Counter Configuration (address 0x28) .................................................................... 15
Table 13 Timeout Counter Value (address 0x2C) ................................................................................ 15
Table 14 Error Counter Register (address 0x40) ................................................................................. 16
Table 15 Protocol Status Register (address 0x44)............................................................................... 17
Table 16 Transmitter Delay Compensation Register (address 0x048) ................................................. 19
Table 17 Interrupt Register (address 0x50).......................................................................................... 20
Table 18 Interrupt Enable (address 0x54) ............................................................................................ 23
Table 19 Interrupt Line Select (address 0x58) ..................................................................................... 25
Table 20 Interrupt Line Select (address 0x5C)..................................................................................... 26
Table 21 Global Filter Configuration (address 0x80) ............................................................................ 27
Table 22 Standard ID Filter Configuration (address 0x84) ................................................................... 28
Table 23 Extended ID Filter Configuration (address 0x88) .................................................................. 28
Table 24 Extended ID AND Mask (address 0x90)................................................................................ 29
Table 25 High Priority Message Status (address 0x94) ....................................................................... 29
Table 26 New Data 1 (address 0x98) ................................................................................................... 30
Table 27 New Data 2 (address 0x9C) .................................................................................................. 30
Table 28 Rx FIFO 0 Configuration (address 0xA0) .............................................................................. 31
Table 29 Rx FIFO 0 Status (address 0xA4) ......................................................................................... 32
Table 30 Rx FIFO 0 Acknowledge (address 0xA8) .............................................................................. 33
Table 31 Rx Buffer Configuration (address 0xAC) ............................................................................... 33
Table 32 Rx FIFO 1 Configuration (address 0xB0) .............................................................................. 34
Table 33 Rx FIFO 1 Status (address 0xB4) ......................................................................................... 34
Table 34 Rx FIFO 1 Acknowledge (address 0xB8) .............................................................................. 35
Table 35 Rx Buffer / FIFO Element Size Configuration (address 0xBC) .............................................. 36
Table 36 Tx Buffer Configuration (address 0xC0) ................................................................................ 37
Table 37 Tx FIFO/Queue Status (address 0xC4)................................................................................. 38
Table 38 Tx Buffer Element Size Configuration (address 0xC8) .......................................................... 39
Table 39 Tx Buffer Request Pending (address 0xCC).......................................................................... 40
Table 40 Tx Buffer Add Request (address 0xD0)................................................................................. 41
Table 41 Tx Buffer Cancellation Request (address 0xD4) ................................................................... 41
Table 42 Tx Buffer Transmission Occurred (address 0xD8)................................................................. 42
Table 43 Transmit Buffer Cancellation Finished (address 0xDC) ......................................................... 42
Table 44 Tx Buffer Transmission Interrupt Enable (address 0xE0) ...................................................... 43
Table 45 Tx Buffer Cancellation Finished Interrupt Enable (address 0xE4)......................................... 43
Table 46 Tx Event FIFO Configuration (address 0xF0)........................................................................ 44
Table 47 Tx Event FIFO Status (address 0xF4) ................................................................................... 45
Table 48 Tx Event FIFO Acknowledge (address 0xF8) ........................................................................ 45
Table 49 Rx Buffer and FIFO Element ................................................................................................. 47
Table 50 Tx Buffer Element .................................................................................................................. 49
Table 51 Tx Event FIFO Element ......................................................................................................... 51
84 30.10.2018
Revision 3.3.0 M_CAN
30.10.2018 85