3.3.13 Protocol Status Register (M_CAN_PSR)............................................................................................................42
3.4.1Rx Buffer and FIFO Element...............................................................................................................................79
3.4.4Standard Message ID Filter Element...................................................................................................................84
3.4.5Extended Message ID Filter Element..................................................................................................................85
3.5.7Interface to DMA Controller................................................................................................................................114
For users of maskset 2N45H, this addendum supplements—and must be used in
conjunction with—the latest version of the MPC5777C Reference Manual. The primary
objective of this document is to define the major differences in functionality of maskset
2N45H from maskset 3N45H for software and hardware developers.
The information in this document is subject to change. As with any technical
documentation, it is the reader’s responsibility to ensure he or she is using the most recent
version of the documentation.
To locate any published errata or updates for this document, visit the Freescale Web site
at http://www.freescale.com.
1.2Device versions
This document is necessary for users of maskset 2N45H. It describes the functionality
and programming model of maskset 2N45H that differ from maskset 3N45H.
For 2N45H, the body chapters in this addendum replace the corresponding chapters of the
latest MPC5777C Reference Manual (document number MPC5777CRM). Other chapters
in the latest MPC5777C Reference Manual accurately describe 2N45H.
This addendum is intended for system software and hardware developers and applications
programmers who want to develop products with maskset 2N45H of the MPC5777C. It is
assumed that the reader understands operating systems, microprocessor system design,
basic principles of software and hardware, and basic details of the Power Architecture®
developed by Freescale.
1.4Document organization
This document contains two chapters whose content differs from the corresponding
chapters of the MPC5777C Reference Manual:
• Platform Configuration Module (PCM)
• Modular CAN (M_CAN)
These addendum chapters describe the indicated modules for maskset 2N45H. The
corresponding chapters of the MPC5777C Reference Manual describe the indicated
modules for maskset 3N45H.
1.5
Conventions
1.5.1Numbering systems
The following suffixes identify different numbering systems:
This suffixIdentifies a
bBinary number. For example, the binary equivalent of the number 5 is written 101b. In some cases,
binary numbers are shown with the prefix 0b.
dDecimal number. Decimal numbers are followed by this suffix only when the possibility of confusion
exists. In general, decimal numbers are shown without a suffix.
hHexadecimal number. For example, the hexadecimal equivalent of the number 60 is written 3Ch. In
some cases, hexadecimal numbers are shown with the prefix 0x.
The following typographic notation is used throughout this document:
ExampleDescription
placeholder, xItems in italics are placeholders for information that you provide. Italicized text is also used for
the titles of publications and for emphasis. Plain lowercase letters are also used as
placeholders for single letters and numbers.
code
SR[SCM]A mnemonic in brackets represents a named field in a register. This example refers to the
REVNO[6:4], XAD[7:0]Numbers in brackets and separated by a colon represent either:
Fixed-width type indicates text that must be typed exactly as shown. It is used for instruction
mnemonics, directives, symbols, subcommands, parameters, and operators. Fixed-width type
is also used for example code. Instruction mnemonics and directives in text and tables are
shown in all caps; for example, BSR.
Scaling Mode (SCM) field in the Status Register (SR).
• A subset of a register's named field
For example, REVNO[6:4] refers to bits 6–4 that are part of the COREREV field that
occupies bits 6–0 of the REVNO register.
• A continuous range of individual signals of a bus
For example, XAD[7:0] refers to signals 7–0 of the XAD bus.
1.5.3Special terms
The following terms have special meanings:
TermMeaning
assertedRefers to the state of a signal as follows:
• An active-high signal is asserted when high (1).
• An active-low signal is asserted when low (0).
deassertedRefers to the state of a signal as follows:
• An active-high signal is deasserted when low (0).
• An active-low signal is deasserted when high (1).
In some cases, deasserted signals are described as negated.
reservedRefers to a memory space, register, field, or programming setting. Writes to a reserved location can
result in unpredictable functionality or behavior.
• Do not modify the default value of a reserved programming setting, such as the reset value of
a reserved register field.
• Consider undefined locations in memory to be reserved.
w1cWrite 1 to clear: Refers to a register bitfield that must be written as 1 to be "cleared."
The Platform Configuration Module contains three miscellaneous configuration registers
for the chip. Currently, the configuration registers are related to the operation of the FEC
and intelligent bus bridging gasket. The module is mapped to AIPS_0 (PBRIDGE_B) onplatform slot 27 with a base address of FFF6_C000h.
NOTE
These registers can be accessed only in supervisor mode.
2.1.1FEC Burst Optimization Master Control Register
(PCM_FBOMCR)
This register controls FEC burst optimization behavior on the system bus.
Address: 0h base + 0h offset = 0h
Bit0123456789101112131415
R
W
Reset
Reset
0000000000000000
16171819202122232425262728293031
Bit
R
W
0000000000000000
0
RBENFXSBE[7:0]
WBEN
ACCERR
PCM_FBOMCR field descriptions
FieldDescription
0–20
Reserved
21
ACCERR
This field is reserved.
This read-only field is reserved and always has the value 0.
Accumulate Error
This field determines whether an error response for the first half of the write burst is accumulated to the
second half of the write burst or discarded. To complete the burst, the FEC interface to the system bus
responds by indicating that the first half of the burst completed without error before it actually writes the
data so that it can fetch the second half of the write data from the FIFO. When actually written onto the
system bus, the first half of the write burst can have an error. Because this half initially responded without
an error to the FIFO, the error is discarded or accumulated with the error response for the second half of
the burst.
0
0Any error to the first half of the write burst is discarded.
1Any actual error response to the first half of the write burst is accumulated in the second half's
response. In other words, an error response to the first half is seen in the response to the second half,
even if the second half does not contain an error.
22
WBEN
23
RBEN
Global write burst enable to XBAR slave port designated by FXSBEn
0Write bursting to all XBAR slave ports is disabled.
1Write bursting is enabled to any XBAR slave port whose FXSBEn bit is 1.
Global read burst enable from XBAR slave port designated by FXSBEn
0Read bursting from all XBAR slave ports is disabled.
1Read bursting is enabled from any XBAR slave port whose FXSBEn bit is 1.
This field enables bursting by the FEC interface to the XBAR slave port controlled by each FXSBEn bit.
• When a particular FXSBEn bit is 1, the XBAR slave port enabled by that bit can support the bursts
allowed by RBEN and WBEN. RBEN enables read bursts from the XBAR slave port, and WBEN
enables write bursts to the XBAR slave port.
• When a particular FXSBEn bit is 0, the FEC interface does not burst to the XBAR slave port
controlled by that FXSBEn bit.
This bit controls the bus gasket’s handling of pending read transactions.
0Pending reads are disabled.
1Pending reads are enabled.
Burst Read Enable Core1 Data
This bit controls the bus gasket’s handling of burst read transactions.
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
Burst Write Enable Core1 Data
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
This field is reserved.
This read-only field is reserved and always has the value 0.
Pending Read Enable Core1 Instruction
This bit controls the bus gasket’s handling of pending read transactions.
14
BRE_CORE1_I
15
BWE_CORE1_I
16–20
Reserved
21
PRE_CORE0_D
22
BRE_CORE0_D
0Pending reads are disabled.
1Pending reads are enabled.
Burst Read Enable Core1 Instruction
This bit controls the bus gasket’s handling of burst read transactions.
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
Burst Write Enable Core1 Instruction
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
This field is reserved.
This read-only field is reserved and always has the value 0.
Pending Read Enable Core0 Data
This bit controls the bus gasket’s handling of pending read transactions.
0Pending reads are disabled
1Pending reads are enabled.
Burst Read Enable Core0 Data
This bit controls the bus gasket’s handling of burst read transactions.
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
23
BWE_CORE0_D
24–28
Reserved
29
PRE_CORE0_I
30
BRE_CORE0_I
Burst Write Enable Core0 Data
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
This field is reserved.
This read-only field is reserved and always has the value 0.
Pending Read Enable Core0 Instruction
This bit controls the bus gasket’s handling of pending read transactions.
0Pending reads are disabled.
1Pending reads are enabled.
Burst Read Enable Core0 Instruction
This bit controls the bus gasket’s handling of burst read transactions.
Chapter 2 Platform Configuration Module (PCM)
31
BWE_CORE0_I
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
Burst Write Enable Core0 Instruction
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
This field is reserved.
This read-only field is reserved and always has the value 0.
Pending Read Enable FEC
This bit controls the bus gasket’s handling of pending read transactions.
0Pending reads are disabled.
1Pending reads are enabled.
Burst Read Enable FEC
This bit controls the bus gasket’s handling of burst read transactions.
0
PRE_
M6
BRE_M6
BWE_M6
0
PRE_DMA_A
BRE_DMA_A
BWE_DMA_A
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
7
Burst Write Enable FEC
BWE_FEC
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
8–12
Reserved
13
This field is reserved.
This read-only field is reserved and always has the value 0.
Pending Read Enable Master Port 6 Concentrator
PRE_M6
This bit controls the bus gasket’s handling of pending read transactions.
0Pending reads are disabled.
1Pending reads are enabled.
14
BRE_M6
15
BWE_M6
16–20
Reserved
21
PRE_DMA_B
Burst Read Enable Master Port 6 Concentrator
This bit controls the bus gasket’s handling of burst read transactions.
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
Burst Write Enable Master Port 6 Concentrator
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
This field is reserved.
This read-only field is reserved and always has the value 0.
Pending Read Enable eDMA_B
This bit controls the bus gasket’s handling of pending read transactions.
Chapter 2 Platform Configuration Module (PCM)
22
BRE_DMA_B
23
BWE_DMA_B
24–28
Reserved
29
PRE_DMA_A
30
BRE_DMA_A
0Pending reads are disabled
1Pending reads are enabled.
Burst Read Enable eDMA_B
This bit controls the bus gasket’s handling of burst read transactions.
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
Burst Write Enable eDMA_B
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
This field is reserved.
This read-only field is reserved and always has the value 0.
Pending Read Enable eDMA_A
This bit controls the bus gasket’s handling of pending read transactions.
0Pending reads are disabled.
1Pending reads are enabled.
Burst Read Enable eDMA_A
This bit controls the bus gasket’s handling of burst read transactions.
0Burst reads are converted into a series of single transactions on the slave side of the gasket.
1Burst reads are optimized for best system performance.
This bit controls the bus gasket’s handling of burst write transactions.
0Burst writes are converted into a series of single transactions on the slave side of the gasket.
1Burst writes are optimized for best system performance. Note this setting treats writes as “imprecise”
such that an error response on any beat of the burst is reported on the last beat.
On this chip, each M_CAN instance can address 1216 words in the Message RAM.
As a result, the Message RAM shared by the two M_CAN instances supports 2432
words, or 9.5 KB.
3.1.2Introduction
The M_CAN subsystem includes:
• Two M_CAN modules
• A Message RAM controller
The M_CAN subsystem block diagram is shown in the following figure.
*Refer to the Clocking chapter for M_CAN clock details.
Chip-specific M_CAN information
Figure 3-1. M_CAN subsystem block diagram
3.1.3Functional Description
3.1.3.1Message RAM Controller
The Message RAM Controller has the arbiter for the accesses to the external Message
RAM and the ECC (Error Code Correction) Controller for the external Message RAM
data.
3.1.3.1.1Message RAM Arbiter
The Message RAM Arbiter is a dynamic round robin arbiter that selects which request is
sent to the external Message RAM. These requests are made by the CPU, M_CAN_0, or
M_CAN_1.
• 50% bandwidth for CPU accesses to the external Message RAM. The CPU does not
wait for more than one clock cycle to access the external Message RAM (see
examples 1 and 3).
• 50% bandwidth is shared between M_CAN_0 and M_CAN_1 accesses to the
external Message RAM. Each M_CAN waits at least one clock cycle to access the
external Message RAM (see examples 1, 2, and 3).
• If there is no CPU request, all bandwidth is distributed to M_CAN_0 and M_CAN_1
(see example 2).
• If there are no M_CAN_0 and M_CAN_1 requests, all bandwidth is distributed to the
CPU.
• If there are requests from only one M_CAN, the other M_CAN's bandwidth is
distributed to the first M_CAN (see example 1).
The following examples illustrate the dynamic arbiter scheme.
• Example 1: The following figure shows who accesses the external Message RAM
when only CPU and M_CAN_0 try to access to it.
• Example 2: The following figure shows who accesses the external Message RAM
when only M_CAN_0 and M_CAN_1 try to access to it.
• Example 3: The following figure shows who accesses the external Message RAM
when the CPU, M_CAN_0, and M_CAN_1 try to access to it.
The read or write accesses to the external Message RAM use two clock cycles. In the first
clock cycle, the address is available, and in the second, the data is available.
The arbiter has a pseudo address pre-fetching mechanism that allows the data of the
previous access to overlap with the address of the current access. The pseudo address prefetching scheme saves multiple clock cycles when there are multiples accesses to the
external Message RAM.
3.1.3.1.2ECC Controller
The ECC Controller provides Single Error Correction / Double Error Detection
(SECDED). It guarantees single bit error correction and double bit error detection
(without correction). The SECDED code is not guaranteed to detect more than two bits
with error.
Each 32 data bits of the external Message RAM is associated with 7 ECC bits. If all these
39 bits are zero or one, then it is flagged as non-correctable error.
For writes to the external Message RAM, the ECC bits (7-bit) are calculated using the
data bits (32-bit). The data bits plus ECC bits (39-bit) are written into the specified
memory address. The error detection and correction are performed on the reads from the
external Message RAM.
When an M_CAN accesses the external Message RAM, the ECC bits are calculated by
the ECC Controller and they are sent to this M_CAN.
3.1.3.2External Message RAM
The external Message RAM supports only 32-bit write and read accesses.
The CPU can access the external Message RAM through the M_CAN subsystem. In this
case, the CPU can do 8/16/32-bit read accesses to the external Message RAM.
3.1.3.3Transfer Error
The M_CAN subsystem does not report any transfer error.
3.1.4External Signals
The M_CAN subsystem external signals are shown in the following table.
M_CAN_0_RxinputM_CAN_0 CAN Rx signal
M_CAN_0_TxoutputM_CAN_0 CAN Tx signal
M_CAN_1_RxinputM_CAN_1 CAN Rx signal
M_CAN_1_TxoutputM_CAN_1 CAN Tx signal
3.2Overview
The M_CAN module is the new CAN Communication Controller IP-module. The
M_CAN performs communication according to ISO11898-1 (Bosch CAN specification
2.0 part A,B) and to Bosch CAN FD specification V1.0. 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 device, 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.
3.2.1Features
The following are the features of M_CAN.
• Conforms with CAN protocol version 2.0 part A, B and ISO 11898-1
• CAN Core: CAN Protocol Controller and Rx/Tx Shift Register. Handles all ISO
11898-1 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.
• Cfg and Ctrl: CAN Core related configuration and control bits.
• Interrupt and Timestamp: Interrupt control and 16-bit CAN bit time counter for
receive and transmit timestamp generation.
• 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.
• Generic Slave Interface: Connects the M_CAN to a 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.
• Generic Master Interface: Connects the M_CAN access to an external 32-bit
Message RAM. The maximum Message RAM size is 16 KB × 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 other
module-external components. The connection of these signals is optional.
3.2.3Dual Clock Sources
To improve the EMC behavior, a spread spectrum clock can be used for the Host clock
domain. Due to the high precision clocking requirements of the CAN Core, a separate
clock without any modulation has to be provided as CAN clock.
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 must be
regarded.
3.2.4Dual Interrupt Lines
The module provides two interrupt lines. Interrupts can be routed either to M_CAN
interrupt 0 or to M_CAN interrupt 1. By default all interrupts are routed to interrupt line
M_CAN interrupt 0. By programming ILE[EINT0] and ILE[EINT1], the interrupt lines
can be enabled or disabled separately.
After hardware reset, the registers of the M_CAN hold the reset values. Additionally the
Bus_Off state is reset and the M_CAN Tx is set to recessive (HIGH). The value 0x0001
(CCCR[INIT] = 1) in the CC Control Register enables software initialization. The
M_CAN does not influence the CAN bus until the CPU resets CCCR[INIT] to 0.
The M_CAN module allocates an address space of 256 bytes. All registers are organized
as 32-bit registers. The M_CAN is accessible by the CPU using a data width of 8-bit
(byte access), 16-bit (half-word access), or 32-bit (word access).
The CPU has write access to Protected Write registers and fields when both CCCR[CCE]
is 1 and CCCR[INIT] is 1.
There is a delay from writing to a command register until the update of the related status
register bits due to clock domain crossing.
CAUTION
Any write access to reserved or not implemented registers in
the slot assigned by to the M_CAN IP will not generate any bus
access error.
3.3.3Fast Bit Timing and Prescaler Register (M_CAN_FBTP)
The CAN bit time may be programed in the range of 4 to 25 time quanta. The CAN time
quantum may be programmed in the range of 1 to 32 M_CAN clock periods. tq = (FBRP
+ 1) M_CAN clock period.
FTSEG1 is the sum of Prop_Seg and Phase_Seg1. FTSEG2 is Phase_Seg2. Therefore the
length of the bit time is (programmed values) [FTSEG1 + FTSEG2 + 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.
NOTE
With a M_CAN clock of 8 MHz, the reset value of
0x00000A33 configures the M_CAN for a fast bit rate of 500
kbit/s.
The bit rate configured for the CAN FD data phase via FBTP
must be higher or equal to the bit rate configured for the
arbitration phase via BTP.
Address: 0h base + Ch offset = Ch
Bit0123456789101112131415
Reset
Bit
Reset
R
W
0000000000000000
16171819202122232425262728293031
R
W
0000101000110011
0
0
TDCOTDC
FTSEG1
0
0
FTSEG2
FBRP
0
M_CAN_FBTP field descriptions
FSJW
FieldDescription
0–2
Reserved
30Freescale Semiconductor, Inc.
This field is reserved.
This read-only field is reserved and always has the value 0.