IMX6DQRM
IMX6DQRM
IMX6DQRM
MX 6Dual/6Quad Applications
Processor Reference Manual
Chapter 1
Introduction
1.1 About This Document...................................................................................................................................................23
1.2 Introduction...................................................................................................................................................................31
1.4 Features......................................................................................................................................................................... 32
Chapter 2
Memory Maps
2.1 Memory system overview.............................................................................................................................................41
Chapter 3
Interrupts and DMA Events
3.1 Overview.......................................................................................................................................................................49
Chapter 4
External Signals and Pin Multiplexing
4.1 Overview.......................................................................................................................................................................57
Chapter 5
Fusemap
5.1 Fusemap........................................................................................................................................................................ 163
Chapter 6
External Memory Controllers
6.1 Overview.......................................................................................................................................................................181
6.2 Multi-mode DDR controller (MMDC) overview and feature summary...................................................................... 181
Chapter 7
System Debug
7.1 Overview.......................................................................................................................................................................189
Chapter 8
System Boot
8.1 Overview.......................................................................................................................................................................203
Chapter 9
Multimedia
9.1 Video Graphics Sub System......................................................................................................................................... 281
Chapter 10
Clock and Power Management
10.1 Introduction...................................................................................................................................................................335
Chapter 11
System Security
11.1 Overview.......................................................................................................................................................................371
Chapter 12
ARM Cortex A9 MPCore Platform (ARM)
12.1 Overview.......................................................................................................................................................................379
Chapter 13
AHB to IP Bridge (AIPSTZ)
13.1 Overview.......................................................................................................................................................................391
Chapter 14
AHB-to-APBH Bridge with DMA (APBH-Bridge-DMA)
14.1 Overview.......................................................................................................................................................................415
Chapter 15
Asynchronous Sample Rate Converter (ASRC)
15.1 Overview.......................................................................................................................................................................455
Chapter 16
Digital Audio Multiplexer (AUDMUX)
16.1 Overview.......................................................................................................................................................................513
Chapter 17
40-BIT Correcting ECC Accelerator (BCH)
17.1 Overview.......................................................................................................................................................................561
17.2 Operation.......................................................................................................................................................................563
Chapter 18
Clock Controller Module (CCM)
18.1 Overview.......................................................................................................................................................................621
Chapter 19
MIPI CSI to IPU Gasket (CSI2IPU)
19.1 Overview.......................................................................................................................................................................767
Chapter 20
Display Content Integrity Checker (DCIC)
20.1 Overview.......................................................................................................................................................................781
Chapter 21
Enhanced Configurable SPI (ECSPI)
21.1 Overview.......................................................................................................................................................................795
Chapter 22
External Interface Module (EIM)
22.1 Overview.......................................................................................................................................................................829
Chapter 23
10/100/1000-Mbps Ethernet MAC (ENET)
23.1 Introduction...................................................................................................................................................................899
23.2 Overview.......................................................................................................................................................................899
Chapter 24
Enhanced Periodic Interrupt Timer (EPIT)
24.1 Overview.......................................................................................................................................................................1041
Chapter 25
Enhanced Serial Audio Interface (ESAI)
25.1 Overview.......................................................................................................................................................................1053
Chapter 26
Flexible Controller Area Network (FLEXCAN)
26.1 Overview.......................................................................................................................................................................1121
Chapter 27
General Power Controller (GPC)
27.1 Overview.......................................................................................................................................................................1201
Chapter 28
General Purpose Input/Output (GPIO)
28.1 Overview.......................................................................................................................................................................1217
Chapter 29
General Purpose Media Interface (GPMI)
29.1 Overview.......................................................................................................................................................................1249
Chapter 30
General Purpose Timer (GPT)
30.1 Overview.......................................................................................................................................................................1301
Chapter 31
2D Graphics Processing Unit (GPU2D)
31.1 Overview.......................................................................................................................................................................1325
Chapter 32
3D Graphics Processing Unit (GPU3D)
32.1 Overview.......................................................................................................................................................................1337
Chapter 33
HDMI Transmitter (HDMI)
33.1 Overview.......................................................................................................................................................................1347
Chapter 34
HDMI 3D Tx PHY (HDMI_PHY)
34.1 Overview.......................................................................................................................................................................1607
Chapter 35
I2C Controller (I2C)
35.1 Overview.......................................................................................................................................................................1695
Chapter 36
IOMUX Controller (IOMUXC)
36.1 Overview.......................................................................................................................................................................1719
Chapter 37
Image Processing Unit (IPU)
37.1 Overview.......................................................................................................................................................................2515
Chapter 38
Keypad Port (KPP)
38.1 Overview ......................................................................................................................................................................3327
Chapter 39
LVDS Display Bridge (LDB)
39.1 Overview.......................................................................................................................................................................3347
Chapter 40
MIPI - Camera Serial Interface Host Controller (MIPI_CSI)
40.1 Overview.......................................................................................................................................................................3357
40.3 Architecture...................................................................................................................................................................3358
Chapter 41
MIPI DSI Host Controller (MIPI_DSI)
41.1 Overview.......................................................................................................................................................................3407
41.4 Architecture...................................................................................................................................................................3409
41.5 Programming.................................................................................................................................................................3433
Chapter 42
MIPI HSI Host Controller (MIPI_HSI)
42.1 Overview.......................................................................................................................................................................3463
Chapter 43
MediaLB (MLB)
43.1 Overview.......................................................................................................................................................................3563
Chapter 44
Multi Mode DDR Controller (MMDC)
44.1 Overview.......................................................................................................................................................................3619
Chapter 45
Network Interconnect Bus System (NIC-301)
45.1 Overview ......................................................................................................................................................................3813
Chapter 46
On-Chip OTP Controller (OCOTP_CTRL)
46.1 Overview.......................................................................................................................................................................3821
Chapter 47
On-Chip RAM Memory Controller (OCRAM)
47.1 Overview.......................................................................................................................................................................3859
Chapter 48
PCI Express (PCIe)
48.1 Overview.......................................................................................................................................................................3865
48.2 Architecture...................................................................................................................................................................3867
48.6 App Note: Calculating Gen1 PCI Express and AXI Bridge Throughput..................................................................... 3992
Chapter 49
PCI Express PHY (PCIe_PHY)
49.1 Overview.......................................................................................................................................................................4189
Chapter 50
Power Management Unit (PMU)
50.1 Overview.......................................................................................................................................................................4253
Chapter 51
Pulse Width Modulation (PWM)
51.1 Overview.......................................................................................................................................................................4281
Chapter 52
ROM Controller with Patch (ROMC)
52.1 Overview.......................................................................................................................................................................4297
Chapter 53
Serial Advanced Technology Attachment Controller (SATA)
53.1 Introduction...................................................................................................................................................................4313
53.3 Architecture...................................................................................................................................................................4317
53.4 Programming.................................................................................................................................................................4366
Chapter 54
Serial Advanced Technology Attachment PHY (SATA PHY)
54.1 Overview.......................................................................................................................................................................4419
Chapter 55
Smart Direct Memory Access Controller (SDMA)
55.1 Overview.......................................................................................................................................................................4519
55.10 SDMA Internal (Core) Memory Map and Internal Register Definitions..................................................................... 4736
Chapter 56
System JTAG Controller (SJC)
56.1 Overview.......................................................................................................................................................................4753
Chapter 57
Secure Non-Volatile Storage (SNVS)
57.1 SNVS overview............................................................................................................................................................ 4791
Chapter 58
Shared Peripheral Bus Arbiter (SPBA)
58.1 Overview.......................................................................................................................................................................4827
Chapter 59
Sony/Philips Digital Interface (SPDIF)
59.1 Overview ......................................................................................................................................................................4841
Chapter 60
System Reset Controller (SRC)
60.1 SRC Overview.............................................................................................................................................................. 4873
60.4 Top-level resets, power-up sequence and external supply integration......................................................................... 4875
Chapter 61
Synchronous Serial Interface (SSI)
61.1 Overview.......................................................................................................................................................................4909
Chapter 62
Temperature Monitor (TEMPMON)
62.1 Overview.......................................................................................................................................................................4981
Chapter 63
TrustZone Address Space Controller (TZASC)
63.1 Overview.......................................................................................................................................................................4987
Chapter 64
Universal Asynchronous Receiver/Transmitter (UART)
64.1 Overview.......................................................................................................................................................................4991
64.10 Reset..............................................................................................................................................................................5033
64.14 References.....................................................................................................................................................................5037
Chapter 65
Universal Serial Bus Controller (USB)
65.1 Overview.......................................................................................................................................................................5069
Chapter 66
Universal Serial Bus 2.0 Integrated PHY (USB-PHY)
66.1 USB PHY Overview..................................................................................................................................................... 5339
66.2 Operation.......................................................................................................................................................................5340
Chapter 67
Ultra Secured Digital Host Controller (uSDHC)
67.1 Overview.......................................................................................................................................................................5385
Chapter 68
Video Data Order Adapter (VDOA)
68.1 Overview.......................................................................................................................................................................5517
Chapter 69
Video Processing Unit (VPU)
69.1 Overview.......................................................................................................................................................................5533
Chapter 70
Watchdog Timer (WDOG)
70.1 Overview.......................................................................................................................................................................5575
Chapter 71
Crystal Oscillator (XTALOSC)
71.1 Overview.......................................................................................................................................................................5595
1.1.1 Audience
The reference manual is intended for the board-level product designers and product
software developers. This manual assumes that the reader has a background in computer
engineering and/or software engineering and understands the concepts of the digital
system design, microprocessor architecture, input/output (I/O) devices, industry standard
communication, and device interface protocols.
1.1.2 Organization
The reference manual describes the chip at a system level and provides an architectural
overview. It also describes the system memory map, system-level interrupt events,
external pins and pin multiplexing, external memory, system debug, system boot,
multimedia subsystem, power management, and system security.
1.1.4 Conventions
The reference manual uses the following notational conventions:
cleared / set
When a bit has a value of zero, it is said to be cleared; when it has a value of one, it is
said to be set.
mnemonics
Instruction mnemonics are shown in lowercase bold.
italics
Italics indicate variable command parameters, for example, bcctrx.
The book titles in the text are set in italics.
15
An integer in decimal.
0x
the prefix to denote a hexadecimal number.
0b
The prefix to denote a binary number. Binary values of 0 and 1 are written without a
prefix.
n'H4000CA00
The n-bit hexadecimal number.
BLK_REG_NAME
The register names are all uppercase. The block mnemonic is prepended with an
underscore delimiter (_).
BLK_REG[FIELD]
The fields within registers appear in brackets. For example, ESR[RLS] refers to the
Receive Last Slot field of the ESAI Status Register.
BLK_REG[ n]
The bit number n within the BLK.REG register.
BLK_REG[ l:r]
The register bit ranges. The ranges are indicated by the left-most bit number l and the
right-most bit number r, separated by a colon (:). For example, ESR[15:0] refers to the
lower half word in the ESAI Status Register.
x, U
In some contexts, such as signal encodings, an unitalicized x indicates a "don't care" or
"uninitialized". The binary value can be 1 or 0.
x
An italicized x indicates an alphanumeric variable.
n, m
Italicized n or m represent integer variables.
!
Binary logic operator NOT.
&&
Binary logic operator AND.
||
Binary logic operator OR.
^ or <O+>
Binary logic operator XOR. For example, A <O+> B.
|
Bit-wise OR. For example, 0b0001 | 0b1000 yields the value of 0b1001.
&
Bit-wise AND. For example, 0b0001 and 0b1000 yields the value of 0b0000.
{A,B}
Concatenation, where the n-bit value A is prepended to the m-bit value B to form an (n
+m)-bit value. For example, {0, REGm [14:0]} yeilds a 16-bit value with 0 in the most
significant bit.
- or grey fill
Indicates a reserved bit field in a register. Although these bits can be written to with
ones or zeros, they always read zeros.
>>
Shift right logical one position.
<<
Shift left logical one position.
<=
Assignment.
==
Compare equal.
!=
Compare not equal.
>
Greater than.
<
Less than.
NOTE
For reserved register fields, the software should mask off the
data in the field after a read (the software can't rely on the
contents of data read from a reserved field) and always write all
zeros.
In the sub-section that describes one of these sets of registers, a short-hand convention is
used to denote that a register has the SCT register set. There is an italicized n appended to
the end of the short register name. Using the above example, the name used for this
register is CCM_ANALOG_PLL_ARMn. When you see this designation, there is a SCT
register set associated with the register, and you can verify this by checking it in the
memory map table. The address offset for each of these registers is given in the form of
the following example:
Address: 20C_8000h base + 0h offset + (4d × i), where i=0d to 3d
In this example, the address for each of the base registers and their three SCT registers
can be calculated as:
Register Address
CCM_ANALOG_PLL_ARM 20C_8000h
CCM_ANALOG_PLL_ARM_SET 20C_8004h
CCM_ANALOG_PLL_ARM_CLR 20c_8008h
CCM_ANALOG_PLL_ARM_TOG 20C_800Ch
Term Meaning
ADC Analog-to-Digital Converter
AHB Advanced High-performance Bus
AIPS Arm IP Bus
ALU Arithmetic Logic Unit
Term Meaning
AMBA Advanced Microcontroller Bus Architecture
APB Advanced Peripheral Bus
ASRC Asynchronous Sample Rate Converter
AXI Advanced eXtensible Interface
BIST Built-In Self Test
CA/CM Arm Cortex-A/Cortex-M
CAAM Cryptographic Acceleration and Assurance Module
CAN Controller Area Network
CCM Clock Controller Module
CPU Central Processing Unit
CSI CMOS Sensor Interface
CSU Central Security Unit
CTI Cross Trigger Interface
D-cache Data cache
DAP Debug Access Port
DDR Double data rate
DMA Direct memory access
DPLL Digital phase-locked loop
DRAM Dynamic random access memory
ECC Error correcting codes
ECSPI Enhanced Configurable SPI
EDMA Enhanced Direct Memory Access
EIM External Interface Module
ENET Ethernet
EPIT Enhanced Periodic Interrupt Timer
EPROM Erasable Programmable Read-Only Memory
ETF Embedded Trace FIFO
ETM Embedded Trace Macrocell
FIFO First-In-First-Out
GIC General Interrupt Controller
GPC General Power Controller
GPIO General-Purpose I/O
GPR General-Purpose Register
GPS Global Positioning System
GPT General-Purpose Timer
GPU Graphics Processing Unit
GPV Global Programmers View
HAB High-Assurance Boot
I-cache Instruction cache
I2C or I2C Inter-Integrated Circuit
IC Integrated Circuit
Term Meaning
IEEE Institute of Electrical and Electronics Engineers
IOMUX Input-Output Multiplexer
IP Intellectual Property
IrDA Infrared Data Association
JTAG Joint Test Action Group (a serial bus protocol usually used for test purposes)
LCDIF Liquid Crystal Display Interface
LDO Low-Dropout
LIFO Last-In-First-Out
LRU Least-Recently Used
LSB Least-Significant Byte
LUT Look-Up Table
LVDS Low Voltage Differential Signaling
MAC Medium Access Control
MCM Miscellaneous control Module
MMC Multimedia Card
MMDC Multi Mode DDR Controller
MSB Most-Significant Byte
MT/s Mega Transfers per second
OCRAM On-Chip Random-Access Memory
OCOTP On-Chip One-Time Programmable Controller
PCI Peripheral Component Interconnect
PCIe PCI express
PCMCIA Personal Computer Memory Card International Association
PGC Power Gating Controller
PIC Programmable Interrupt Controller
PMU Power Management Unit
POR Power-On Reset
PSRAM Pseudo-Static Random Access Memory
PWM Pulse Width Modulation
PXP Pixel Pipeline
QoS Quality of Service
R2D Radians to Degrees
RISC Reduced Instruction Set Computing
ROM Read-Only Memory
ROMCP ROM Controller with Patch
RTOS Real-Time Operating System
Rx Receive
SAI Synchronous Audio Interface
SCU Snoop Control Unit
SD Secure Digital
SDIO Secure Digital Input/Output
Term Meaning
SDLC Synchronous Data Link Control
SDMA Smart DMA
SIM Subscriber Identification Module
SNVS Secure Non-Volatile Storage
SoC System-on-Chip
SPBA Shared Peripheral Bus Arbiter
SPDIF Sony Phillips Digital Interface
SPI Serial Peripheral Interface
SRAM Static Random-Access Memory
SRC System Reset Controller
TFT Thin-Film Transistor
TPIU Trace Port Interface
TSGEN Time Stamp Generator
Tx Transmit
TZASC TrustZone Address Space Controller
UART Universal Asynchronous Receiver/Transmitter
USB Universal Serial Bus
USDHC Ultra Secured Digital Host Controller
WDOG Watchdog
WLAN Wireless Local Area Network
WXGA Wide Extended Graphics Array
1.2 Introduction
This chapter introduces the architecture of the i.MX 6Dual/6Quad Multimedia
Applications Processors. The i.MX 6Dual/6Quad processors represent NXP's latest
achievement in integrated multimedia applications processors.
It is part of a growing i.MX family of multimedia-focused products, offering high-
performance processing optimized for the lowest power consumption.
1.4 Features
The i.MX 6Dual/6Quad Application Processor (AP) is based on the ARM Cortex A9
MPCore™ Platform, which has the following features:
• ARM Cortex A9 MPCore™Dual or Quad core CPU configurations (with TrustZone)
• Symmetric CPU configuration where each CPU includes:
• 32 Kbyte L1 Instruction Cache
• 32 Kbyte L1 Data Cache
• Private Timer and Watchdog
• Cortex-A9 NEON MPE (Media Processing Engine) Co-processor.
The ARM Cortex A9 MPCore™ complex includes:
• General Interrupt Controller (GIC) with 128 interrupt support
• Global Timer
• Snoop Control Unit (SCU)
• 1 Megabyte unified L2 cache shared by all CPU cores (Dual or Quad)
• Two Master AXI (64-bit) bus interfaces output of L2 cache
• NEON MPE coprocessor
• SIMD Media Processing Architecture
• NEON register file with 32x64-bit general-purpose registers
• NEON Integer execute pipeline (ALU, Shift, MAC)
• NEON dual, single-precision floating point execute pipeline (FADD, FMUL)
• NEON load/store and permute pipeline
• Supports single and double-precision add, subtract, multiply, divide, multiply
and accumulate, and square root operations as described in the ARM VFPv3
architecture.
• Provides conversions between 16-bit, 32-bit and 64-bit floating-point formats
and ARM integer word formats
The i.MX 6Dual/6Quad processor makes use of dedicated HW accelerators in order to
meet the targeted multimedia performance. The use of HW accelerators is a key factor in
obtaining high performance at low power consumption numbers, while keeping the CPU
core relatively free to perform other tasks.
The i.MX 6Dual/6Quad processor incorporates the following hardware accelerators:
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 6, 05/2020
32 NXP Semiconductors
Chapter 1 Introduction
• USB
• High Speed (HS) USB 2.0 OTG (Up to 480 Mbps), with integrated HS USB Phy
• Three USB 2.0 (480 Mbps) hosts:
• HS host, with integrated HS Phy.
• Two HS host, with integrated HS-IC USB (High Speed Inter-Chip USB)
Phy.
• Low Power modes
The i.MX 6Dual/6Quad integrates advanced power management unit and controllers:
• PMU, including LDO supplies for on-chip resources
• Temperature Sensor for monitoring the die temperature
• Supporting DVFS techniques for low power modes
• Uses SW State Retention, and Power Gating for ARM and MPE
• Support for various levels of system power modes
• Flexible clock gating control scheme
• Expansion PCI Express port (PCIe) v2.0 one lane
• PCI express (Gen 2.0) dual mode complex supporting Root complex operations
and Endpoint operations. x1 PHY configuration.
• Miscellaneous IPs and interfaces:
• Three SSI's that support I2S/AC97, up to 1.4 Mbps each
• Enhanced Serial Audio Interface (ESAI), up to 1.4 Mbps each channel
• Five UART, up to 4.0 Mbps each
• Providing RS232 interface
• Supporting 9-bit RS485 multidrop mode
• One of the five supports 8-wire (uart1) while the other four support 4-wire.
(Due to SoC IOMUX limitation, as all UART IP are identical).
• Five eCSPI (Enhanced CSPI). Using chip selects to support multiple peripherals.
• Three I2C, supports 400 Kbps
• Gigabit Ethernet Controller (IEEE1588 compliant), 1Gbps/10/100 Mbps
• Four Pulse Width Modulators (PWM)
• System JTAG Controller (SJC)
• GPIO with interrupt capabilities
• 8x8 Key Pad Port (KPP)
• Sony Philips Digital Interface (SPDIF), Rx and Tx
• Two Controller Area Network (FlexCAN), 1 Mbps each
• Two Watchdog timers (WDOG)
• Audio MUX (AUDMUX)
• MLB (MediaLB) provides interface to MOST Networks (MOST25,MOST50,
MOST150) with DTCP cipher accelerator
Raw / ONFI 2.2 LP-DDR2/DDR3 NOR Flash Battery Ctrl 4x Camera 1 / 2 LVDS 1 / 2 LCD HDMI 1.4 MIPI
Nand-Flash 532MHz(DDR1066) PSRAM Device Parall/MIPI (WUXGA+) Displays Display Display
• Smart DMA enables data transfer between non-mastering peripherals and external or
internal memories
• System Control is supported via:
• Clock Control Module (CCM)
• Eight PLLs and two PFDs
• XTALOSC- 24 MHz Crystal oscillator source support
• OSC32KHz - 32.768 Hz Crystal oscillator source support
• System Reset Controller (SRC)
• General Power Controller (GPC)
• Temperature Sensor for monitoring and alarming on high temperature situations.
• Multimedia is supported with:
• Two independent Image Processing Units-IPUv3H
• Connectivity to displays and controllers (Parallel, LVDS, MIPI, HDMI),
cameras (parallel, MIPI).
• Display Processing: video/graphics combining, image enhancement
• Image conversions: resizing, rotation/inversion, color conversion, de-
interlacing
• Synchronization and control capabilities, allowing autonomous operation
• Video Processing Unit (VPU), supports various decoding/encoding formats in
HW, up to 1080p plus SD 30 fps decoding (H.264, VC1, RV10, DivX, etc.), and
up to 1080p 30 fps encoding (H.264, etc.).
• Graphics Processing Unit (GPU3Dv4) graphics processing compliant with the
following:
• OpenGL ES 1.1 and 2.0 including extensions.
• OpenVG 1.1
• Windows Direct3D
• OpenCL EP
• Graphics Processing Unit (GPU2Dv2)
• Vector graphics processing unit (GPU2Dv2):
• Real-time hardware curve tesselation of lines, quadratic and cubic Bezier
curves
• 16x Line Anti-aliasing
• OpenVG 1.1 support
• Vector Drawing functions
• Audio
• Audio codecs are provided by SW, which runs on ARM core, supporting
(but not limited to) MP3, WMA, AAC, HE-AAC and Pro10
• 3x SSIs
• ESAI
• SPDIF Tx/Rx
• Audmux
• Audio sample rate conversion accelerator (ASRC)
• Security is supported by:
• High Assurance Boot (HAB4) System
• ARM TrustZone (TZ) Trusted Execution environment
• DDR Memory secure region protection by TrustZone Address Space Controller
• On-chip RAM (OCRAM) single region TrustZone protection
• Peripheral access policy control, using Central Security Unit (CSU)
• One-Time Programmable (OTP) electrical fuse array (Total of 3840-bit e-fuses)
via the On-chip electrical fuse controller (OCOTP_CTRL)
• CAAM and SNVS security architecture, providing:
• 16 KB Secure RAM
• Secure Real Time Counters
• Security State Controller
• Encryption and Hashing functions, Random Number Generator (RNG)
• Security Violation/Tamper Detection & Reporting
• System JTAG controller (SJC)
• Secure Real Time Clock (SRTC)
• TrustZone Watchdog (TZ WDOG)
• Connectivity peripherals, timers and External Memory Interfaces:
• Embedded DMAs
• 3.3V IO voltage for seamless integration
• Four USB 2.0 ports, including four PHYs: 2x HS-USB (OTG) and 2x HS-IC
USB integrated PHYs
• Memory, 1066 MT/s per Line, supports LP-DDR2 (2x16, 2x32, 2x32 interleaved
mode - x64), DDR3 (x16/x32/x64) and DDR3L (x16/x32/x64)
• Nand-Flash (MLC up to 40-bit ECC) and NOR Flash memory interface via
GPMI Nand-Flash controller
• Timers: 2xEPIT, GPT and two Watch Dog timers (one of which is used for TZ),
in addition to the timers and watchdog timers integrated within the ARM Cortex
A9 MPCore™ platform.
• Miscellaneous connectivity support - SATA, PCIe, FLEXCAN, MLB,
MMC/SD, I2C, SPI, UART, PWM and Keypad interface
The table below shows the Arm IP Bus (AIPS) detailed memory map.
The table below shows the Debug Access Port (DAP) detailed memory map.
Table 2-4. DAP memory map
Start Address End Address Region Allocation Size
0216_0000 0216_0FFF Platform Control 4 KB
0215_F000 0215_FFFF PTM3 4 KB
0215_E000 0215_EFFF PTM2 4 KB
0215_D000 0215_DFFF Arm Cortex A9 PTM1 4 KB
MPCore
0215_C000 0215_CFFF Platform, DAP PTM0 4 KB
0215_B000 0215_BFFF CTI3 4 KB
0215_A000 0215_AFFF CTI2 4 KB
0215_9000 0215_9FFF CTI1 4 KB
NOTE
Accessing the reserved memory regions can result in
unpredictable behavior.
1. In the 4KB interleaving mode the system bus maps each consecutive 4KB region to a 4KB region in the other MMDC port,
such that "odd" 4KB spaces are mapped to MMDC0, and "even" 4KB regions mapped to MMDC1.
NOTE
Accessing the reserved memory regions can result in an
unpredictable behavior.
3.1 Overview
This section describes the assignments of interrupts from the Arm domain in Cortex A9
interruptsand from the DMA events in SDMA event mapping.
As shown in the table, some of the events are the output of a mux of two signals or
triggers. The selection of this mux is controlled by the general-purpose registers in
IOMUXC.
4.1 Overview
The chip contains a limited number of pins, most of which have multiple signal options.
These signal-to-pin and pin-to-signal options are selected by the input-output multiplexer
called IOMUX. The IOMUX is also used to configure other pin characteristics, such as
voltage level, drive strength, and hysteresis.
Pin Assignments lists the pad names of the chip, the various signals that can be assigned
to each of the pads, and the default settings for each pad. The muxing options table lists
the external signals grouped by the module instance, the muxing options for each signal,
and the registers used to route the signal to the chosen pad.
ODT - DISABLED
DSE - 37_OHM
RGMII_TX_CTL ALT0 USB_H2_STROBE DDR_SEL - 1P2V_IO SW_PAD_CTL_PAD_RGMII_TX_CTL
ALT1 RGMII_TX_CTL HYS - ENABLED SW_PAD_CTL_GRP_DDR_TYPE_RGMII
ALT5 GPIO6_IO26 PUS - 100K_OHM_PD
ALT7 ENET_REF_CLK PUE - PULL
PKE - ENABLED
ODT - DISABLED
DSE - 37_OHM
RTC_XTALI XTALOSC_RTC_XTALI
RTC_XTALO XTALOSC_RTC_XTALO
SATA_RXM SATA_PHY_RX_N
SATA_RXP SATA_PHY_RX_P
SATA_TXM SATA_PHY_TX_N
5.1 Fusemap
This section details the various modes and selection of the required boot devices. A
separate map is given for each and every boot device.
The device select is specified by BOOT_CFG1[7:3] fuses listed in the following table.
Table 5-1. Boot Device Select
Boot Device BOOT _CFG1[7] BOOT_CFG1[6] BOOT_CFG1[5] BOOT_CFG1[4] BOOT_CFG1[3]
EIM - Table 5-3 0 0 0 0 Memory Type:
0 - NOR Flash
1 - OneNAND
SATA - Table 5-4 0 0 1 0 X
Serial ROM - Table 0 0 1 1 X
5-5
SD/eSD - Table 5-6 0 1 0 X X
MMC/eMMC - 0 1 1 X X
Table 5-7
NAND Flash - 1 X X X X
Table 5-8
NOTE
Fuses marked as “Reserved” are reserved for NXP internal (and
future) use only. Customers should not attempt to burn these, as
the IC behavior may be unpredictable. The reserved fuses can
be read as either ‘0’ or ‘1’.
Table 5-2. Lock Fuses
Addr 7 6 5 4 3 2 1 0
0x400[7:0] Reserved SJC_RESP MEM_TRIM_LOCK BOOT_CFG_LOCK TESTER_LOCK
_LOCK
Table continues on the next page...
01 - 852MHz (Automotive
grade)
10 - 1000 MHz
11 - 1200 MHZ
0x450[7:0] BOOT_CFG1 8 BOOT configuration register See Table 5-1 for details. BOOT_CFG_LO
#1, Usage varies, depending CK
on selected boot device.
0x450[15:8] BOOT_CFG2 8 BOOT configuration register Refer to the respective boot BOOT_CFG_LO
#2, Usage varies, depending fusemap tables for details. CK
on selected boot device.
0x450[23:16] BOOT_CFG3 8 BOOT configuration register Refer to the respective boot BOOT_CFG_LO
#3 fusemap tables for details. CK
0x450[31:24] BOOT_CFG4 8 BOOT configuration register Refer to the respective boot BOOT_CFG_LO
#4 fusemap tables for details. CK
0x460[0] SDP_DISABLE 1 Enable/disable serial 0 – Serial download BOOT_CFG_LO
download support supported (default) CK
This fuse is available only on
silicon revision 1.6 or later
Table continues on the next page...
If BOOT_MODE[1:0] = 0b00
0 - BOOT configuration
eFuses are not yet
programmed. Boot flow
jumps to serial downloader.
1 - BOOT configuration
eFuses have been
programmed. Regular boot
flow is performed.
0x460[15:8] DDR3_CONFIG[7:0 8 TBD (DDR3 config options) BOOT_CFG_LO
] CK
0x460[16] HDCP 1 HDCP encryption disable 0 - enabled BOOT_CFG_LO
CK
1 - disabled
0x460[20] SJC_DISABLE 1 Disable/Enable the Secure 0 - Secure JTAG Controller BOOT_CFG_LO
JTAG Controller module. is enabled CK
This fuse is used to create
Table continues on the next page...
6.1 Overview
This chip has these external memory interfaces and controllers:
• Multi-Mode DDR Controller (MMDC)
• Raw NAND flash controller, consisting of GPMI2, BCH40 and APBH_DMA
components including the Randomizer module.
• EIM-PSRAM/NOR flash controller
MMDC
128@533MHz
32@1066
DDR
AXI MMDC0 DDRIF_0 PHY_0
DDR
ADOPT logic
clk_0
DDR DDR
MUX IO MUX
128@533MHz
AXI MMDC1
DDR
ADOPT logic DDR 32@1066
clk_1 DDRIF_1 PHY_1
DMA DMA
Chan x4 FIFO M
Memory
Access
Bridge
4 x DMA
Control
M S
CPU
Access
APBH Bus
GPMI BCH AXI Bus
Data I/F
RAWNAND (4xCE)
(ML C, SL C)
(ONFI 2.2, Toggle)
• EF-NAND (Samsung)
• Samsung's "Toggle-mode" NAND (clock rate of up to 66 Mhz and 80 Mhz, with a
data rate of up to 133 MB/s and 160 MB/s respectively)
• Configurable page size of 2 KB, 4 KB, or 8 KB
• Configurable spare area per page of up to 512 B
• Support for non-identical NAND devices is not required
7.1 Overview
This section describes the hardware and software debug and application development
features and resources of the chip. It describes the following:
• Core/platform-specific resources
• Resources associated with complex IP blocks
• Chip-wide resources
• Interface to the external debug and development tools
The debug and trace architecture is designed around the following:
• Arm CoreSight architecture, adapted to i.MX 6Dual/6Quad SoC (for 2x and 4x core
debug), including a cross-trigger subsystem for cross-domain triggering of debug
resources
• JTAG port used to interact with cores under the debug by means of SJC, the system
JTAG controller port
• DAP, the debug access port that supports the interface to the Arm RealView
Debugging tools and other third-party tools
• TPIU, a trace port interface unit that efficiently accesses the program trace
information from the system
• Various chip-wide resources, such as debug features built into the IP blocks and
critical signal visibility available through alternate pin functions or observability
muxes
i.MX 6Dual
JTAG DE_B
port pin
Cortex-A9 CTI0
MPCore dbg_req[3:0]
CPU0 SJC
PTM0
JTAG
Cortex-A9 CTI3
MPCore ATB 16KB
CPU3 PTM3 ATB Trace Buffer
(ETB)
ATB
Replicator EVENTI
Funnel
ATB
ATB
i.MX 6Quad EVENTO
ATB
dbg_ack[3:0] ATB
IOMUX
FIFO TPIU
IOMUXC
GPR3[16:13] dbg_ack_out Routed to internal 16-bit
Mask logic and peripherals , TRACDATA
as debug indication
The CTM is a relatively simple block with no configuration options. There are two CTM
instances in i.MX6Dual/6Quad in the Arm platform.
One of them is used to route 4x Core's CTI's, while the second one is used for the
additional CoreSight CTIs. Each CTI has four channel lines, to which the CTI events are
mapped. The exact mapping is configured in the CTI logic.
ATB
ATB slave port i/f Formatter
Trace RAM
interface
TraceRAM
TRIGIN Control
(from ETM Trigger out)
APB
APB Register Bank
i/f
• Register bank—Contains the management, control, and status registers for triggers,
flushing behavior, and external control.
• Trace RAM interface—Controls reads and writes to the Trace RAM.
ATCLK
ATDATA A A B
ATSIZE
ATVALID
ATREADY
7.2.3.2 JTAG ID
Table 7-1. i.MX JTAG ID
Device Silicon revision JTAG ID
i.MX 6Dual Rev 1.0 0191_E01Dh1
i.MX 6Quad Rev 1.0 0191_C01Dh2
1. In follow-on silicon revisions, the ID value is subject to change by incrementing the first nibble as follows: 1191_E01Dh for
Rev 1.1, 2191_E01Dh for Rev 1.2 , etc.
2. In follow-on silicon revisions, the ID value is subject to change by incrementing the first nibble as follows: 1191_C01Dh for
Rev 1.1, 2191_C01Dh for Rev 1.2 , etc.
• TRSTB
• TDI
• TDO
• TCK
• TMS
• Core Control (Core Status / Single Stepping) - Commands are provided to monitor
and control processor activity. The commands can halt the core, rerun the core from
another address location, and get processor status.
• Trace Buffer - a 32x32 buffer which records the last 32 changes of flow during
program execution. The buffer stores data in a modulo fashion (i.e. the 33rd
instruction change replaces the 1st). Captured trace information is retrieved via reads
to the Trace Buffer Register.
7.4 Miscellaneous
The Miscellaneous function described in this section provide useful general capabilities.
7.4.1 Clock/Reset/Power
CDBGPWRUPREQ and CDBGPWRUPACK are the handshake signals between the
DAP and the clock control module to ensure debug power and clocks are turned on. If the
debug components are always powered on, the handshake becomes a mechanism to turn
debug clocks on. Similarly, there is a register bit in the CCM which allows internal
software to turn debug clocks on as well because the CDBGPWRUPREQ is in the TCLK
domain and is inaccessible to software.
The Cortex-A9 and VSP cores can receive resets from the following sources:
• Debug Reset (CDBGRSTREQ bit within the SWJ-DP CTRL/STAT register of the
DAP) in the TCLK domain. This allows the debug tools to reset the debug logic.
• System POR reset
8.1 Overview
The boot process begins at the Power-On Reset (POR) where the hardware reset logic
forces the Arm core to begin the execution starting from the on-chip boot ROM.
The boot ROM code uses the state of the internal register BOOT_MODE[1:0] as well as
the state of various eFUSEs and/or GPIO settings to determine the boot flow behavior of
the device.
The main features of the ROM include:
• Support for booting from various boot devices
• Serial downloader support (USB OTG)
• Device Configuration Data (DCD) and plugin
• Digital signature and encryption based High-Assurance Boot (HAB)
• Wake-up from the low-power modes
• Wake-up secondary core
The boot ROM supports these boot devices:
• NOR flash
• NAND flash
• OneNAND flash
• SD/MMC
• Serial ATA (SATA) HDD (only i.MX 6Dual/6Quad)
• Serial (I2C/SPI) NOR flash and EEPROM
The boot ROM uses the state of the BOOT_MODE and eFUSEs to determine the boot
device. For development purposes, the eFUSEs used to determine the boot device may be
overridden using the GPIO pin inputs.
The boot ROM code also allows to download the programs to be run on the device. The
example is a provisioning program that can make further use of the serial connection to
provide a boot device with a new image. Typically, the provisioning program is
downloaded to the internal RAM and allows to program the boot devices, such as the
SD/MMC flash. The ROM serial downloader uses a high-speed USB in a non-stream
mode connection.
The boot ROM allows waking up from the low-power modes and waking up the
secondary core of Cortex-A9. On reset, the ROM checks the Arm core ID and the power
gating status register. When waking from the low-power mode, the primary core (ID=0)
skips loading an image from the boot device and jumps to the address saved in
PERSISTENT_ENTRY0. The secondary cores (ID!=0) jump to the address in
PERSISTENT_ENTRY<X> where 0<X<4 in all power modes.
The Device Configuration Data (DCD) feature allows the boot ROM code to obtain the
SOC configuration data from an external program image residing on the boot device. As
an example, the DCD can be used to program the DDR controller for optimal settings,
improving the boot performance. The DCD is restricted to the memory areas and
peripheral addresses that are considered essential for the boot purposes (see Write data
command).
A key feature of the boot ROM is the ability to perform a secure boot, also known as a
High-Assurance Boot (HAB). This is supported by the HAB security library which is a
subcomponent of the ROM code. The HAB uses a combination of hardware and software
together with the Public Key Infrastructure (PKI) protocol to protect the system from
executing unauthorized programs. Before the HAB allows the user image to execute, the
image must be signed. The signing process is done during the image build process by the
private key holder and the signatures are then included as a part of the final program
image. If configured to do so, the ROM verifies the signatures using the public keys
included in the program image. In addition to supporting the digital signature verification
to authenticate the program images, the encrypted boot is also supported. The encrypted
boot can be used to prevent the cloning of the program image directly off the boot device.
A secure boot with HAB can be performed on all boot devices supported on the chip in
addition to the serial downloader. The HAB library in the boot ROM also provides the
API functions, allowing the additional boot chain components (bootloaders) to extend the
secure boot chain. The out-of-fab setting for the SEC_CONFIG is the open configuration,
in which the ROM/HAB performs the image authentication, but all authentication errors
are ignored and the image is still allowed to execute.
NOTE
Silicon Revision 1.6 and later supports additional fuses related
to Serial Download mode. Fuse SDP_DISABLE enables/
disables Serial Download mode support. Fuse
internal BOOT_MODE register may be read from the BMOD[1:0] field of the SRC Boot
Mode Register (SRC_SBMR2). The available boot modes are: Boot From Fuses, serial
boot via USB, and Internal Boot. See this table for settings:
Table 8-1. Boot MODE pin settings
BOOT_MODE[1:0] Boot Type
00 Boot From Fuses
01 Serial Downloader
10 Internal Boot
11 Reserved
NOTE
Silicon Revision 1.6 and later, the
FORCE_INTERNAL_BOOT has been implemented. This fuse
causes the BOOT_MODE inputs to be ignored and the boot
ROM will force the boot mode to “Internal Boot”. This
prevents impact from physically tampering with the
BOOT_MODE pins and is recommended for security-enabled
application. For detailed information on this fuses, see
Fusemap.
Normal
Check CPU ID
Check Boot Mode (using Cortex-A9
(using fuses and/or MPIDR)
GPIOs)
1,2,3
Internal
Serial
Download initial boot image
(primary or secondary Fail Update wakeup error
depending on persistent bit) status register
No
Pass System
Wait For Reset
Execute Image Yes Reset
The first time a board is used, the default eFUSEs may be configured incorrectly for the
hardware on the platform. In such case, the Boot ROM code may try to boot from a
device that does not exist. This may cause an electrical/logic violation on some pads.
Using the Boot From Fuses mode addresses this problem.
Setting the BT_FUSE_SEL=0 forces the ROM code to jump directly to the Serial
Downloader. This allows a bootloader to be downloaded which can then provision the
boot device with a program image and blow the BT_FUSE_SEL and the other boot
configuration eFUSEs. After the reset, the boot ROM code determines that the
BT_FUSE_SEL is blown (BT_FUSE_SEL = 1) and the ROM code performs an internal
boot according to the new eFUSE settings. This allows the user to set
BOOT_MODE[1:0]=00b on a production device and burn the fuses on the same device
(by forcing the entry to the Serial Downloader), without changing the value of the
BOOT_MODE[1:0] or the pullups/pulldowns on the BOOT_MODE pins.
START
Configure USBOTG1,
, program WDOG for 32 sec timer
Poll USBOTG1 No
WDOG_ENABLE
Activity
No == 1 &&
Detected
90 sec over
Yes
Yes
This includes the boot device selection (SPI, EIM, NOR, SD, MMC, and so on), boot
device configuration (SD bus width, speed, and so on), and other. In general, the source
for this configuration comes from the eFUSEs embedded inside the chip. However,
certain configuration parameters can be sourced from the GPIO pins, allowing further
flexibility during the development process.
.
OVERRIDE_HYS_SD OEM Overrides the HYS bit for No 0 Override the IO PAD setting HYS to 1 for
MMC_PADS the SD pads the SD pads.
eMMC_4.4_RESET_T OEM ROM resets the boot device No 0 Applicable for booting from the eMMC 4.4
O_PRE-IDLE_STATE in the pre-idle state using spec or greater version devices. The fuse
the eMMC 4.4 feature, must not be blown for the eMMC 4.3 or
CMD0 with the argument lesser spec version devices.
value 0xf0f0f0f0.
1. This setting can be overridden by the GPIO settings when the BT_FUSE_SEL fuse is intact. See GPIO Boot Overrides for
the corresponding GPIO pin.
2. 0 = intact fuse and 1= blown fuse
The input pins provided are sampled at boot, and can be used to override the
corresponding eFUSE values, depending on the setting of the BT_FUSE_SEL fuse.
• Clock initialization
• Enabling the MMU/L2 cache
• Exception handling and interrupt handling
0x00017FFF 0x0093FFFF
RAM Exception Vector
0x0093FFB8
Stack
(8120 bytes)
0x0093E000
MMU Table
(24KB)
ROM Boot Strap 0x00938000
Figure 8-3. Internal ROM and RAM memory map for i.MX 6Dual/6Quad
NOTE
If no ROM/HAB APIs are being used, the entire OCRAM
region can be used freely after the boot.
The ROM configures and uses the following blocks (listed in an alphabetical order)
during the boot process. Note that the blocks actually used depend on the boot mode and
the boot device selection:
• APBH—the DMA engine to drive the GPMI module
• BCH—40-bit error correction hardware engine with the AXI bus master and a
private connection to the GPMI
• CCM—Clock Control Module
• ECSPI—Enhanced Configurable Serial Peripheral Interface
• EIM—External Interface Module used for the NOR and OneNAND devices
• I2C—I2C controller
• GPMI—NAND controller pin interface
• OCOTP_CTRL—On-Chip OTP Controller; the OCOTP contains the eFUSEs
• IOMUXC—I/O Multiplexer Control which allows the GPIO use to override the
eFUSE boot settings;
• IOMUXC GPR—I/O Multiplexer Control General-Purpose Registers
• CAAM—Cryptographic Acceleration and Assurance Module
• SNVS—Secure Non-Volatile Storage
• SRC—System Reset Controller
• USB—used for the serial download of a boot device provisioning program
• USDHC—Ultra-Secure Digital Host Controller
• WDOG-1—Watchdog timer
• DTCP—Digital Transmission Content Protection
• HDCP—High-bandwidth Digital Content Protection
After the reset, each Arm core has access to all peripherals. The ROM code disables the
clocks listed in the following table, except for the boot devices listed in the second
column.
Table 8-5. List of disabled clocks
Clock name Enabled for boot device
CCGR0_APBHDMA
CCGR1_ECSPI1 ECSPI1
CCGR1_ECSPI2 ECSPI2
CCGR1_ECSPI3 ECSPI3
CCGR1_ECSPI4 ECSPI4
CCGR1_FEC
CCGR1_EPIT1
CCGR1_EPIT2
CCGR2_I2C1_SERIAL I2C1
CCGR2_I2C2_SERIAL I2C2
CCGR2_I2C3_SERIAL I2C3
CCGR3_OPENVGAXICLK
CCGR4_PWM1
CCGR4_PWM2
CCGR4_PWM3
CCGR4_PWM4
CCGR5_SDMA
CCGR5_SPDIF
CCGR5_SSI1
CCGR5_SSI2
CCGR5_SSI3
CCGR5_UART
After the boot, the program image can overwrite the vectors as required. The code shown
below is used to map the ROM exception vector table to the duplicate exception vector
table in the RAM.
Mapping ROM Exception Vector Table
;; Define linker area for ROM exception vector table
AREA IROM_VECTORS, CODE, READONLY
LDR PC, Reset_Addr
LDR PC, Undefined_Addr
LDR PC, SWI_Addr
LDR PC, Prefetch_Addr
LDR PC, Abort_Addr
NOP ; Reserved vector
LDR PC, IRQ_Addr
LDR PC, FIQ_Addr
• EEPROM boot via SPI (serial flash) and I2C (via ECSPI and I2C blocks
respectively).
• Serial ATA (SATA) boot via the SATA interface.
The selection of the external boot device type is controlled by the BOOT_CFG1[7:4]
eFUSEs. See this table for more details:
Table 8-7. Boot device selection
BOOT_CFG1[7:4] Boot device
0000 NOR/OneNAND (EIM)
0001 Reserved
0010 SSD/Hard Disk
(SATA)
0011 Serial ROM (I2C/SPI)
010x SD/eSD/SDXC
011x MMC/eMMC
1xxx Raw NAND
1. This setting can be overridden by the GPIO settings when the BT_FUSE_SEL fuse is intact. See GPIO Boot Overrides for
the corresponding GPIO pin.
Remainder of Image
Before accessing the OneNAND device, the chip waits approximately 500 μs after the
Power-On Reset. This delay is required for the OneNAND device to become ready. After
this initial 500 μs delay, it can take additional 70 μs for the OneNAND device to load the
Initial Load Region of 1 KB into its boot RAM. The chip polls the OneNAND device
Interrupt Status Register to confirm that the first 1 KB was loaded to the OneNAND boot
RAM before continuing with the boot flow.
1. The setting can be overridden by the GPIO settings when the BT_FUSE_SEL fuse is intact. See Table 3 for the
corresponding GPIO pin.
8.5.2.2 NAND flash boot flow and Boot Control Blocks (BCB)
There are two BCB data structures:
• FCB
• DBBT
As a part of the NAND media initialization, the ROM driver uses safe NAND timings to
search for the Firmware Configuration Block (FCB) that contains the optimum NAND
timings, the page address of the Discovered Bad Block Table (DBBT) Search Area, and
the start page address of the primary and secondary firmware.
The hardware ECC level to use is embedded inside the FCB block. The FCB data
structure is also protected using the ECC. The driver reads raw 2112 bytes of the first
sector and runs through the software ECC engine that determines whether the FCB data is
valid or not.
If the FCB is found, the optimum NAND timings are loaded for further reads. If the ECC
fails, or the fingerprints do not match, the Block Search state machine increments the
page number to the Search Stride number of pages to read for the next BCB until the
SearchCount pages have been read.
If the search fails to find a valid FCB, the NAND driver responds with an error and the
boot ROM enters the serial download mode.
The FCB contains the page address of the DBBT Search Area, and the page address for
primary and secondary boot images. The DBBT is searched in the DBBT Search Area,
just like the FCB is searched. After the FCB is read, the DBBT is loaded, and the primary
or secondary boot image is loaded using the starting page address from the FCB.
This figure shows the state diagram of the FCB search:
START
Current Page = 0,
Search Stride = Stride Size Fuse Value,
Search Count = Boot Search Count Fuse Value
YES
YES NO
Recovery Device/
NCB Found
Serial Loader
When the FCB is found, the boot ROM searches for the Discovered Bad Blocks Table
(DBBT). If the DBBT Search Area is 0 in the FCB, the ROM assumes that there are no
bad blocks on the NAND device boot area. See this figure for the DBBT search flow:
START
YES
YES
NO
DBBT Found, Copy to IRAM
The BCB search and load function also monitors the ECC correction threshold and sets
the PERSIST_BLOCK_REWRITE persistent bit if the threshold exceeds the maximum
ECC correction ability.
If there is a page with a number of errors higher than ECC can correct during the primary
image read, the boot ROM turns on the PERSIST_SECONDARY_BOOT bit and
performs the software reset (After the software reset, the secondary image is used).
If there is a page with number of errors higher than ECC can correct during secondary
image read, the boot ROM goes to the serial loader.
If the Bad Block table start page is null, check the manufactory made Bad Block marker.
The location of the Bad Block maker is at the first three or last three pages in every block
of the NAND flash. The NAND manufacturers normally use one byte in the spare area of
certain pages within a block to mark that a block is bad or not. A value of 0xFF means
good block, non-FF means bad block.
To preserve the BI (bad block information), the flash updater or gang programmer
applications must swap the Bad Block Information (BI) data to byte 0 of the metadata
area for every page before programming the NAND flash. When the ROM loads the
firmware, it copies back the value at metadata[0] to the BI offset in the page data. This
figure shows how the factory bad block marker is preserved:
64 B
2 KB Main area spare
512 main parity 512 main parity 512 main parity 512 main parity
meta
data Bad block information at
fourth block of data area
Swap byte
If the BOOT_CFG1[5] is set (toggle mode), the GPMI/BCH CLK source is PLL2PFD4,
and running at 66 MHz, otherwise the GPMI/ BCH CLK souce is PLL3, running at 24
MHz. The ROM sets the default values to timing0, timing1, and timing2 gpmi registers
for 24 MHz clock speed. It uses the BOOT_CFG2[7:5] fuse to configure the GPMI
timing2 register parameters preamble delay and read latency. The default value for these
parameters is 2 when the fuses are not blown.
The default timing parameter values used by the ROM for the toggle-mode device are:
• Timing0.ADDRESS_SETUP = 5
• Timing0.DATA_SETUP = 10
• Timing0.DATA_HOLD = 10
• Timing1.DEVICE_BUSY_TIMEOUT = 0 x 500
• Timing2.READ_LATENCY = BOOT_CFG2[7:5] if blown, otherwise 2
• Timing2.CE_DELAY = 2
• Timing2.PREAMBLE_DELAY = BOOT_CFG2[7:5] if blown, otherwise 2
• Timing2.POSTAMBLE_DELAY = 3
• Timing2.CMDADD_PAUSE = 4
• Timing2.DATA_PAUSE = 6
The default timing parameters can be overriden by the TMTiming2_ReadLatency,
TMTiming2_PreambleDelay, TMTiming2_CEDelay, TMTiming2_PostambleDelay,
TMTiming2_CmdAddPause, and TMTiming2_DataPause parameters of the FCB.
• 6—100 MHz
• 7—133 MHz
• 8—160 MHz
• 9—200 MHz
The GPMI timing0 register fields data_setup, data_hold, and address_setup are set to the
values specified for the data_setup and data_hold and address_setup in the FCB member
m_NANDTiming.
The GPMI timing1.DEVICE_BUSY_TIMEOUT is set to the value specified in the FCB
member TMTiming1_BusyTimeout.
The GPMI timing2 register values are set using the FCB members
TMTiming2.READ_LATENCY, CE_DELAY, PREAMBLE_DELAY,
POSTAMBLE_DELAY, CMDADD_PAUSE, and DATA_PAUSE.
The example below is for 13 bits of parity (GF13). The number of ECC bits required for
a data block is calculated using the (ECC_Correction_Level * 13) bits.
In the above layout, the ECC size for EccB0 and EccBN must be selected to not exceed a
total page size of 2112 bytes. The EccB0 and EccBN can be one of the 2, 4, 6, 8, 10, 12,
14, 16, 18, and 20 bits on the ECC correction level. The total bytes are:
[M + (data_block_size x 4) + ([EccB0 + (EccBN x 3)] x 13) / 8] <= 2112;
M = metadata bytes and data_block_size is 512.
There are four data blocks of 512 bytes each in a page of 2-KB page sized NAND. The
values of EccB0 and EccBN must be such that the above calculation does not result in a
value greater than 2112 bytes.
Different NAND manufacturers have different sizes for a 4-KB page; 4314 bytes is
typical.
[M + (data_block_size x 8) + ([EccB0 + (EccBN x 7)] x 13) / 8] <= 4314;
M= metadata bytes and data_block_size is 512.
There are eight data blocks of 512 bytes each in a page of a 4-KB page sized NAND. The
values of the EccB0 and EccBN must be such that the above calculation does not result in
a value greater than the size of a page in a 4-KB page NAND.
8.5.2.7.2 Metadata
The number of bytes used for the metadata is specified in the FCB. The metadata for the
BCH encoded pages is placed at the beginning of a page. The ROM only cares about the
first byte of metadata to swap it with a bad block marker byte in the page data after each
page read; it is important to have at least one byte for the metadata bytes field in the FCB
data structure.
1. The setting can be overridden by the GPIO settings when the BT_FUSE_SEL fuse is intact. See GPIO boot overrides for
the corresponding GPIO pin.
extraction, the ROM code extracts from the Boot Data Structure the destination pointer
and length of image to be copied to the RAM device from where the code execution
occurs.
The maximum image size to load into the SD/MMC boot is 32 MB. This is due to a
limited number of uSDHC ADMA Buffer Descriptors allocated by the ROM.
NOTE
The initial 4 KB of the program image must contain the IVT,
DCD, and the Boot Data structures.
Table 8-15. SD/MMC frequencies
SD MMC MMC (DDR mode)
Identification (KHz) 347.22
Normal-speed mode (MHz) 25 20 25
High-speed mode (MHz) 50 40 50
UHSI SDR50 (MHz) 100
UHSI SDR104 (MHz) 200
NOTE
The boot ROM code reads the application image length and the
application destination pointer from the image.
Start
No
Command Successful? 5
Yes
SD MMC
1 Check SD/MMC Selection fuse 2
Start GPT with 1s delay MMC Boot Set MMC card CSD Set operating frequency MMC Boot
Voltage Validation (Issue CMD9) to 20 MHz Device Init
for CMD1
Set Weak pull-up Put card data Transfer
For CMD line Mode (Issue CMD7)
Issue CMD1 with HV Increment loop counter
Yes Yes
No No
Command Successful? Command Successful?
No Yes
Command Successful? 5
No Send CMD13 to read
Yes Set RCA (Issue CMD3) status
Yes Loop Cntr < 3000 and Yes
Busy Bit == 1 Yes
looping period < 1s Card State ==
No 5
Command Successful? TRANS?
No
Is Response OCR for Yes Yes
Card Is HC MMC
HC Get CID from card(Issue No
Spec ver >= 4.0?
CMD2)
No Yes
Card Is LC MMC
Send CMD8 to get
Ext_CSD
No
Command Successful?
Yes
Set CMD13 poll timeout
to 100ms
Command Successful?
No Yes
CMD13 Poll No Card State ==
timeout? TRANS?
Yes Yes
End
Issue CMD55
Set ACMD41 ARG bit 28
for SDXC power control
No
Command Successful?
Yes Yes
FAST_BOOT Yes
selected? No Loop Cntr < 3000 and
Issue ACMD41 2
looping period < 1s
No
No
Command Successful?
Bit 24 of response No
2
0 set?
Yes
8 SD Boot
Switch Voltage
No
Command Successful?
Yes
No
DATA lines driven low?
Yes
switch supply voltage
to 1.8v
No
Voltage high No DATA lines
poll timeout? driven high?
Yes Yes
2 7
No No
Put card data Transfer
5 Mode (Issue CMD7)
No
No
Card State == Send CMD13 to read Yes
TRANS? Command Successful?
status
Yes
Yes
UHSI mode selected? 9
No
No
Command Successful? 4
9 SD Boot
UHSI init
Check response of
CMD7
Yes No
Card is locked?
No
No Send ACMD6 with Yes
Command Successful? Command Successful? Send CMD55
argument of 4 bit width
Yes
Set CMD13 poll timeout Yes Change USDHC bus
Check Status Success?
to 100ms width
No
Yes
Change USDHC clock Loopback clock Yes Set loopback clock bit in
speed fuse set? USDHC register
No
Init failed
11
No
Command Successful?
Yes
CMD13 Poll No Card State ==
timeout? TRANS?
Yes
Failure Success Failure
End
4 SD/MMC Boot
Data Read
Yes
No
Send CMD18 (multiple
block read)
No
Command Successful? 5
Yes
End
6
eMMC 4.x Boot
Fast Boot
Acknowledge token Set GPT poll counter to Wait for block gap or
accepted? 1s timeout
End
2
SD Boot
11 sample point tuning
Yes
Set the USDHC into Exceed limit?
tuning mode
No
Configure the block
Set delay cell number to
length and block number
current value
4 10
1. Active-low
Where:
• The tag is used as an indication of the valid secondary image table. It must be
0x00112233.
• The firstSectorNumber is the first 512-byte sector number of the secondary image.
For the secondary image support, the primary image must reserve the space for the
secondary image table. See this figure for the typical structures layout on an expansion
device.
0x00000200
Reserved for Secondary
Image Table (optional)
0x00000400
Media Partitions
For the Closed mode, if there are failures during primary image authentication, the boot
ROM turns on the PERSIST_SECONDARY_BOOT bit (see Table 8-6) and performs the
software reset. (After the software reset, the secondary image is used.)
1. The setting can be overridden by the GPIO settings when the BT_FUSE_SEL fuse is intact. See Table 1 for the
corresponding GPIO pin.
The boot ROM sends the IDENTIFY command to the hard disk during the initialization.
When the identification block is received, the boot ROM assumes that the device is
ready. The boot ROM sends a separate command for each sector of 512 bytes in the PIO
mode.
The boot ROM copies 4 KB of data from the hard disk or SSD device to the internal
RAM. After checking the Image Vector Table header value (0xD1) from the program
image, the ROM code performs a DCD check. After a successful DCD extraction, the
ROM code extracts the destination pointer and length of image to be copied to the RAM
device from the Boot Data Structure, where the code execution occurs.
NOTE
The Initial 4 KB of program image must contain the IVT, DCD,
and the Boot Data structures.
Where:
0x00000200
Reserved for Secondary
Image Table (optional)
0x00000400
Media Partitions
For the Closed mode, if there are failures during the primary image authentication, the
boot ROM turns on the PERSIST_SECONDARY_BOOT bit (see Table 8-6) and
performs a software reset. (After software reset, the secondary image is used).
1. The setting can be overridden by the GPIO settings when the BT_FUSE_SEL fuse is intact. See GPIO Boot Overrides for
the corresponding GPIO pin.
1. These address bits must be configured at the memory device to match this '000' value.
Start
Read
Data
Start
yes
1. The N/A in the ROM code indicates that the pins are not available or not used.
type is defined in the table below. The location of the IVT is the only fixed requirement
by the ROM. The remainder or the image memory map is flexible and is determined by
the contents of the IVT.
Table 8-25. Image Vector Table Offset and Initial Load Region Size
Boot Device Type Image Vector Table Offset Initial Load Region Size
NOR 4 Kbyte = 0x1000 bytes Entire Image Size
NAND 1 Kbyte = 0x400 bytes 4 Kbyte
OneNAND 256 bytes = 0x100 bytes 1 Kbyte
SD/MMC/eSD/eMMC/SDXC 1 Kbyte = 0x400 bytes 4 Kbyte
I2C/SPI EEPROM 1 Kbyte = 0x400 bytes 4 Kbyte
SATA 1 Kbyte = 0x400 bytes 4 Kbyte
Initial
Load Region
where:
Tag: A single byte field set to 0xD1
Length: a two byte field in big endian format containing the overall length of the IVT,
in bytes, including the header. (the length is fixed and must have a value of
32 bytes)
Version: A single byte field set to 0x40 or 0x41
Header
[CMD]
[CMD]
...
where:
where:
Tag: a single-byte field set to 0xCC
Length: a two-byte field in a big-endian format, containing the length of the Write Data
Command (in bytes) including the header
Address: the target address to which the data must be written
Value/Mask: the data value (or bitmask) to be written to the preceding address
The parameter field is a single byte divided into the bitfields, as follows:
Table 8-29. Write data command parameter field
7 6 5 4 3 2 1 0
flags bytes
where
bytes: the width of the target locations in bytes (either 1, 2, or 4)
flags: control flags for the command behavior
Data Mask = bit 3: if set, only specific bits may be overwritten at the target address
(otherwise all bits may be overwritten)
Data Set = bit 4: if set, the bits at the target address are overwritten with this flag
(otherwise it is ignored)
One or more target address and value/bitmask pairs can be specified. The same bytes' and
flags' parameters apply to all locations in the command.
When successful, this command writes to each target address in accordance with the flags
as follows:
Table 8-30. Interpretation of write data command flags
"Mask" "Set" Action Interpretation
0 0 *address = val_msk Write value
0 1 *address = val_msk Write value
1 0 *address &= ~val_msk Clear bitmask
1 1 *address |= val_msk Set bitmask
NOTE
If any of the target addresses does not have the same alignment
as the data width indicated in the parameter field, none of the
values are written.
If any of the values are larger or any of the bitmasks are wider
than permitted by the data width indicated in the parameter
field, none of the values are written.
If any of the target addresses do not lie within the allowed
region, none of the values are written. The list of allowable
blocks and target addresses for the chip are provided below.
Table 8-31. Valid DCD address ranges
Address range Start address Last address
IOMUX Control (IOMUXC) registers 0x020E0000 0x020E3FFF
CCM register set 0x020C4000 0x020C7FFF
ANADIG registers 0x020C8000 0x020C8FFF
MMDC register set 0x021B0000 0x021B7FFF
IRAM free space 0x00907000 0x00937FF0
EIM memory 0x08000000 0x0FFEFFFF
EIM registers 0x021B8000 0x021BBFFF
DDR 0x10000000 0xFFFFFFFF
The check data command is a big-endian byte array with the format shown in this table:
Table 8-32. Check data command format
Tag Length Parameter
Address
Mask
[Count]
where:
Tag: a single-byte field set to 0xCF
Length: a two-byte field in the big-endian format containing the length of the check data
command (in bytes) including the header
Address: the source address to test
Mask: the bit mask to test
Count: an optional poll count; If the count is not specified, this command polls
indefinitely
until the exit condition is met. If count = 0, this command behaves as for the NOP.
where
bytes: the width of target locations in bytes (either 1, 2, or 4)
flags: control flags for the command behavior
Data Mask = bit 3: if set, only the specific bits may be overwritten at a target address
(otherwise all bits may be overwritten)
Data Set = bit 4: if set, the bits at the target address are overwritten with this flag
(otherwise it is ignored)
This command polls the source address until either the exit condition is satisfied, or the
poll count is reached. The exit condition is determined by the flags as follows:
Table 8-34. Interpretation of check data command flags
"Mask" "Set" Action Interpretation
0 0 (*address & mask) == 0 All bits clear
0 1 (*address & mask) == mask All bits set
1 0 (*address & mask)!= mask Any bit clear
1 1 (*address & mask)!= 0 Any bit set
NOTE
If the source address does not have the same alignment as the
data width indicated in the parameter field, the value is not
read.
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 6, 05/2020
NXP Semiconductors 265
Program image
where:
Tag: a single-byte field set to 0xC0
Length: a two-byte field in big endian containing the length of the NOP command in bytes
(fixed to a
value of 4)
Undefined: this byte is ignored and can be set to any value.
where:
NOTE
This command may not be used in the DCD structure if the
SEC_CONFIG is configured as closed.
In this mode, the ROM programs the WDOG1 for a 90-second time-out if the
WDOG_ENABLE eFuse is 1 and continuously polls for the USB connection. If no
activity is found on the USB OTG1 and the watchdog timer expires, the Arm core is
reset.
NOTE
After the downloaded image is loaded, it is responsible for
managing the watchdog resets properly.
This figure shows the USB boot flow:
START
Configure USBOTG1,
, program WDOG for 32 sec timer
Poll USBOTG1 No
WDOG_ENABLE
Activity
No == 1 &&
Detected
90 sec over
Yes
Yes
8.8.1 USB
The USB support is composed of the USBOH3 (USB OTG1 core controller, compliant
with the USB 2.0 specification) and the USBPHY (HS USB transceiver).
The ROM supports the USB OTG port for boot purposes. The other USB ports on the
chip are not supported for boot purposes.
The USB Driver is implemented as a USB HID class. A collection of four HID reports
are used to implement the SDP protocol for data transfers, as described in Table 8-37.
Table 8-37. USB HID reports
Report ID (first byte) Transfer endpoint Direction Length Description
1 control OUT Host to device 17 B SDP command from the
host to the device.
2 control OUT Host to device Up to 1025 B Data associated with
the report 1 SDP
command.
3 interrupt Device to host 5B HAB security
configuration. The
device sends
0x12343412 in the
closed mode and
0x56787856 in the
open mode.
4 interrupt Device to host Up to 65 B Data in response to the
SDP command in report
1.
Table 8-38. VID/PID and strings for USB device driver (continued)
Descriptor Value
String Descriptor4 NXP Flash
String Descriptor5 NXP Flash
8.8.2.1.1 READ_REGISTER
The transaction for the READ_REGISTER command consists of these reports: Report1
for the command, Report3 for the security configuration, and Report4 for the response or
the register value.
The register to read is specified in the ADDRESS field of the SDP command. The first
device sends Report3 with the security configuration followed by the Report4 with the
bytes read at a given address. If the count is greater than 64, multiple reports with the
report id 4 are sent until the entire data requested by the host is sent. The STATUS is
either 0x12343412 for the closed parts and 0x56787856 for the open or field return parts.
Report1, Command, Host to Device:
1 Valid values for the READ_REGISTER COMMAND, ADDRESS, FORMAT, DATA_COUNT
ID 4 bytes status
Report4, Response, Device to Host: first response report
4 Register value
ID 4 bytes of data containing the register value. If the number of bytes requested is less
than 4, the remaining bytes must be ignored by the host.
Multiple reports of the report id 4 are sent until the entire requested data is sent.
Report4, Response, Device to Host: last response report
4 Register value
ID 64 bytes of data containing the register value. If the number of bytes requested is less
than 64, the remaining bytes must be ignored by the host.
8.8.2.1.2 WRITE_REGISTER
The transaction for the WRITE_REGISTER command consists of these reports: Report1
for the command, Report3 for the security configuration and Report4 for the write status.
The host sends Report1 with the WRITE_REGISTER command. The register to write is
specified in the ADDRESS field of the SDP command of Report1, with the FORMAT
field set to the data type (number of bits to write, either 8, 16, or 32) and the value to
write in the DATA field of the SDP command. The device writes the DATA to the
register address and returns the WRITE_COMPLETE code using Report4 and the
security configuration using Report3 to complete the transaction.
Report1, Command, Host to Device:
1 Valid values for WRITE_REGISTER COMMAND, ADDRESS, FORMAT, DATA_COUNT and DATA
ID 4 bytes status
Report4, Response, Device to Host:
4 WRITE_COMPLETE (0x128A8A12) status
ID 64 bytes data with the first 4 bytes to indicate that the write is completed with code
0x128A8A12. On failure, the device reports the HAB error status.
8.8.2.1.3 WRITE_FILE
The transaction for the WRITE_FILE command consists of these reports: Report1 for the
command phase, Report2 for the data phase, Report3 for the HAB mode, and Report4 to
indicate that the data are received in full.
The size of each Report2 is limited to 1024 bytes (limitation of the USB HID protocol).
Hence, multiple Report2 packets are sent by the host in the data phase until the entire
data is transferred to the device. When the entire data (DATA_COUNT bytes) is
received, the device sends Report3 with the HAB mode and Report4 with 0x88888888,
indicating that the file download completed.
Report1, Host to Device:
1 Valid values for WRITE_FILE COMMAND, ADDRESS, DATA_COUNT
========================Optional Begin=================
Host sends the ERROR_STATUS command to query if the HAB rejected the address
======================== Optional End==================
Report2, Host to Device:
2 File data
ID 4 bytes status
ID 64 bytes data with the first four bytes to indicate that the file download completed
with code 0x88888888. On failure, the device reports the HAB error status.
8.8.2.1.4 ERROR_STATUS
The transaction for the SDP command ERROR_STATUS consists of three reports.
Report1 is used by the host to send the command; the device sends global error status in
four bytes of Report4 after returning the security configuration in Report3. When the
device receives the ERROR_STATUS command, it returns the global error status that is
updated for each command. This command is useful to find out whether the last
command resulted in a device error or succeeded.
Report1, Command, Host to Device:
1 ERROR_STATUS COMMAND
ID 4 bytes status
Report4, Response, Device to Host:
4 Four bytes Error status
8.8.2.1.5 DCD_WRITE
The SDP command DCD_WRITE is used by the host to send multiple register writes in
one shot. This command is provided to speed up the process of programming the register
writes (such as to configure an external RAM device).
The command goes with Report1 from the host with COMMAND TYPE set to
DCD_WRITE, ADDRESS which is used as a temporary location of the DCD data, and
DATA_COUNT to the number of bytes sent in the data out phase. In the data phase, the
host sends the data for a number of registers using Report2. The device completes the
transaction with Report3 indicating the security configuration and Report4 with the
WRITE_COMPLETE code 0x12828212.
Report1, Command, Host to Device:
1 DCD_WRITE COMMAND, ADDRESS, DATA_COUNT
ID 4 bytes status
Report4, Response, Device to Host:
4 WRITE_COMPLETE (0x128A8A12) status
ID 64 bytes report with the first four bytes to indicate that the write completed with the
code 0x128A8A12. On failure, the device reports the HAB error status.
See Device Configuration Data (DCD) for the DCD format description.
8.8.2.1.6 JUMP_ADDRESS
The SDP command JUMP_ADDRESS is the last command that the host can send to the
device. After this command, the device jumps to the address specified in the ADDRESS
field of the SDP command and starts to execute.
This command usually follows after the WRITE_FILE command. The command is sent
by the host in the command-phase of the transaction using Report1. There is no data
phase for this command, but the device sends the status Report3 to complete the
transaction. If the authentication fails, it also sends Report4 with the HAB error status.
Report1, Command, Host to Device:
ID 4 bytes status
This report is sent by the device only in case of an error jumping to the given address, or
if the device reports error in Report4, Response, Device to Host:
4 Four bytes HAB error status
LPB_BOOT fuses value (see the table below). The polarity of the low-power boot
condition on the GPIO_3 pad is set by the BT _LPB_POLARITY fuse (see the following
figure).
Table 8-40. USB low-power boot frequencies
LPB_BOOT Boot Frequencies=0 Boot Frequencies=1
00 ARM_CLK_ROOT=792 MHz ARM_CLK_ROOT=396 MHz
MMDC_CH0_AXI_CLK_ROOT=528 MHz MMDC_CH0_AXI_CLK_ROOT=352 MHz
MMDC_CH1_AXI_CLK_ROOT=528 MHz MMDC_CH1_AXI_CLK_ROOT=352 MHz
AXI_CLK_ROOT=264 MHz AHB_CLK_ROOT=132 AXI_CLK_ROOT=176 MHz AHB_CLK_ROOT=88
MHz MHz
01 ARM_CLK_ROOT=792 MHz ARM_CLK_ROOT=396 MHz
MMDC_CH0_AXI_CLK_ROOT=528 MHz MMDC_CH0_AXI_CLK_ROOT=352 MHz
MMDC_CH1_AXI_CLK_ROOT=528 MHz MMDC_CH1_AXI_CLK_ROOT=352 MHz
AXI_CLK_ROOT=264 MHz AHB_CLK_ROOT=132 AXI_CLK_ROOT=176 MHz AHB_CLK_ROOT=88
MHz MHz
10 ARM_CLK_ROOT=396 MHz ARM_CLK_ROOT=264 MHz
MMDC_CH0_AXI_CLK_ROOT=264 MHz MMDC_CH0_AXI_CLK_ROOT=176 MHz
MMDC_CH1_AXI_CLK_ROOT=264 MHz MMDC_CH1_AXI_CLK_ROOT=176 MHz
AXI_CLK_ROOT=132 MHz AHB_CLK_ROOT=66 AXI_CLK_ROOT=88 MHz AHB_CLK_ROOT=44
MHz MHz
11 ARM_CLK_ROOT=264 MHz ARM_CLK_ROOT=132 MHz
MMDC_CH0_AXI_CLK_ROOT=132 MHz MMDC_CH0_AXI_CLK_ROOT=88 MHz
MMDC_CH1_AXI_CLK_ROOT=132 MHz MMDC_CH1_AXI_CLK_ROOT=88 MHz
AXI_CLK_ROOT=66 MHz AHB_CLK_ROOT=66 AXI_CLK_ROOT=44 MHz AHB_CLK_ROOT=44
MHz MHz
Start
No
No
GPIO_3 pad equals
LPB_POLARITY fuse?
Yes
No
Enable PLLs
End
CAAM
Flash
ROM
HAB
Core Processor
SNVS
RAM
The figure above illustrates the components used during a secure boot using HAB. The
HAB interfaces with the SNVS to make sure that the system security state is as expected.
The HAB also uses the CAAM hardware block to accelerate the SHA-256 message
digest operations performed during the signature verifications and AES-128 operations
for the encrypted boot operations. The HAB also includes a software implementation of
SHA-256 for cases where a hardware accelerator can't be used. The RSA key sizes
supported are 1024, 2048, and 3072 bits. The RSA signature verification operations are
performed by a software implementation contained in the HAB library. The main features
supported by the HAB are:
• X.509 public key certificate support
• CMS signature format support
• Proprietary encrypted boot support. Note that the encrypted boot depends on the
CAAM hardware module. When the CAAM is disabled (when the
EXPORT_CONTROL fuse is blown), the encrypted boot is not available.
NOTE
NXP provides the reference Code Signing Tool (CST) for key
generation, certificate generation, and code signing for use with
the HAB library. The CST can be found by searching for
"IMX_CST_TOOL" at http://www.nxp.com.
NOTE
For further details on using the secure boot feature using HAB,
refer to Secure Boot on i.MX 50, i.MX 53, i.MX 6 and i.MX 7
Series using HABv4 (AN4581).
NOTE
For additional information on the secure boot including the
HAB API, refer to HABv4 RVT Guidelines and
Recommendations (AN12263).
Memory Interface
Video Sources
GPUs
Bridges
IPUs
External
Memories
DCICs VDOA
Displays
VPU
IRAM
• Each IPU has 2 display ports, up to four external ports can be active at any given
time. (Additional asynchronous data flows can be sent though the parallel ports
and the MIPI/DSI port.)
• Read access is supported as follows
• For the Parallel0 port: through DI00
• For the Parallel1 port: through DI10
• For the MIPI/DSI port: through DI01 or DI11
• Inputs to either of the DCICs are taken from one of the following buses
• For each of the parallel interfaces: probing the I/O loopback (essentially
equivalent to probing the external wires).
• For other integrated interfaces (e.g. LVDS): probing the DI1 output of each of
the IPUs (essentially equivalent to the inputs to the serializers)
• For the data enable signal, two control signals are probed from each of the above
buses.
For visual view of display signal routing, see the following figure. The chip MUX select
signals are driven by configuration bits as specified in the IOMUX controller (IOMUXC)
chapter in the IOMUXC_IOMUXC_GPR registers description fields.
IPU #1 IPU #2
DI0 DI1 DI0 DI1
MIPI
LVDS #0 LVDS #1 HDMI
DPI
PADS PADS
Parallel #0 Parallel #1
Video Sources
i.MX 6Dual/6Quad
Parallel 0
mux
CSI0
IPU #1
CSI1
CSI2IPU
MIPI/CSI-2 MIPI/CSI-2 Bridge/
Receiver gasket
CSI0
IPU #2
mux
CSI1
Parallel 1
NOTE: The parallel interface works up to 200 MHz, and the HDMI interface
works up to 240 MHz (IPU).
Special features:
• On-the-fly image conversion: rotation, inversion, resizing, color-space conversion and
combining
• On-the-fly image quality enhancement: color adjustment (including special effects) and gamut
mapping, gamma correction and contrast stretching
• Low-light compensation, allowing back-light reduction
• Scrolling/panning
Updating the display Buffer either in system memory or in an external display controller (accessed through the display
buffer (from a port)
background buffer)
Special features:
• On-the-fly processing - as for screen refresh
• Optimized update - only modified parts are transferred
• Synchronization with screen refresh, to prevent tearing
• Scrolling (e.g. a running banner or a short animation)
Video
Camera preview Input rate (from sensor): up to 240 MHz
(displaying a view-
Additional features:
finder window)
• Window-of-interest
• On-the-fly image conversion: de-interlacing, resizing, color space conversion, rotation,
inversion
• Combining with graphics
• Synchronization, to prevent tearing
Still image capture Rate:
• Burst mode (off-line processing): up to 180 Mpixels/sec (while still leaving headroom for up to
35% blanking overhead)
• Continuous: up to 160 Mpixels/sec
Additional features:
• Image quality enlacement before compression - as for camera preview
• Image conversion before compression - as for camera preview; with independent parameters
• Synchronization with a flash, a mechanical shutter and a mechanical iris
Motion Video Record Resolution and rate: up to 1080p (1920x1080 at 48 fps in unit test without multimedia framework)
Image processing before compression - as for still image capture
Motion Video Playback Resolution and rate - up to 1080i/p (1920x1080) at 60 fps in unit test (without multimedia framework)
Additional features:
• Post-filtering: de-blocking and de-ringing
Table continues on the next page...
The following figure provides the sample processing flow of multimedia application.
Camera Display
Image Enhancement
Image Signal Processing
Processing
Unit (IPU) Video/Graphics
Combining
Camera Preview
Image Image Graphics
Conversions Conversions Generation
De-blocking
Graphics
Video De-ringing
Compression Processing
Processing
Units (GPUs)
Unit (VPU) De-compression
And ARM
Memory
Combining Separation
with Audio from Audio
Communication
Network
Audio Compression
ARM Audio De-compression
The goal of the IPU is to provide comprehensive support for the flow of data from an
image sensor and/or to a display device. This support covers all aspects of these
activities:
• Connectivity to relevant devices - cameras, displays, graphics coprocessors, TV
encoders and decoders.
CSI SMFC
(Camera Sensor I/F) (Sensor Multi FIFO Ctrl.)
VDIC
(Video De-Interlacer
IPUv3H & Combiner)
Cameras
DI
(Display I/F) IC IDMAC 64-bit
Image Converter Memory
(Image DMA Controller) AXI
DP
(Display Processor)
DC DMFC
(Display Contr.) (Display Multi FIFO Ctrl.)
Display
CM IRT
(Control Module) (Image Rotator)
32-bit AHB
MCU
9.2.2 Processing
The IPU processes rectangular blocks of pixels. The processing is performed in four
modules - VDIC, IC, DP and IRT.
(see Figure 9-5 and Table 9-3). Several time-shared data flows are supported, as
described in the following table.
Table 9-4. Time-Shared Data Flows Through The IPU
Name Number Type Flow Target Restrictions
Display Refresh/ 5 flows (at DS1 Fmem -> DP -> Display Synchronous Access (e.g. —
Update most two of display refresh;
them of type
controlled by the DI)
DS1)
DS2 Fmem -> DP -> Display Asynchronous Access —
(e.g. display update)
DS3 Fmem <-> Display Generic Data Transfer —
1. Specified pixel clocks frequencies are applicable for internal clocks, but may be limited by IO buffers speed
capability. Final numbers are subjected to AC characterization.
Typically, there are extended periods of time in which there is no other activity in the
system. The MCU - being idle - can be put to a low-power mode, reducing the power
consumption and extending significantly the battery life.
The IPU supports several techniques to reduce further the power consumption of the
display system:
• Dynamic backlight control, with low-light compensation by image enhancement
Further features and capabilities of the automatic procedures include:
• Automatic display of a changing image (animation) or moving image (scrolling).
The purpose of the LDB is to support flow of synchronous RGB data from the IPU to
external display devices through the LVDS interface. This support covers all aspects of
these activities:
• Connectivity to relevant devices - Displays with LVDS receivers.
• Arranging the data as required by the external display receiver and by LVDS display
standards.
• Synchronization and control capabilities.
Total of up to 28 bits per data interface are transferred per pixel clock cycle.
Rates supported:
• For dual-channel output: Up to 170 MHz pixel clock (e.g. UXGA - 1600x1200 @ 60
Hz + 35% blanking)
• For single-channel output: Up to 85 MHz per interface. (e.g. WXGA - 1366x768 @
60 Hz + 35% blanking).
9.4.2.1 Input
• Source: a frame buffer in system memory
• Addressing: tile-based
• Order: raster-scan of tiles
• Maximal bursts (up to 64 bytes)
9.4.2.2 Output
• Destination: a frame buffer or band buffer in system memory (band = row of tiles; to
be used when the buffering is in internal memory)
• Addressing: raster-scan of rows
• Order: full bursts of 64 bytes (requires data from several tiles)
Input/output - additional aspects
• Pixel format: YUV 4:2:0 partially-interleaved
• Pixel format: YUV 4:2:2 interleaved
• Total rate: at least up to 220 MP/sec (e.g. 1080i @ 60 fps + 480i @ 60 fps, three
fields per frame)
• Frame width: even; up to 4096 pixels
• Frame height: even; up to 2048 pixels
• Addresses [bytes]
• Base address: 32-bit integer, multiple of 8
• Offset from the Y buffer to the UV buffer: 23-bit integer, multiple of 8
• Line stride (same for both buffers): 12-bit integer, multiple of 8
9.4.3 Control
Each VDOA task is activated individually by the CPU and consists of
• Reordering a single buffer of pixels;
or
• Reordering concurrently three buffers or pixels (needed for the 3 input fields used for
de-interlacing in the IPU).
When reordering concurrently three buffers
• The buffers differ only in their base addresses.
• The switching between them is performed at the end of a band (= row of tiles), in a
fixed order: buffer 0 band 0 -> buffer 1 band 0 -> buffer 2 band 0 -> buffer 0 band
1...
Multi-tasking
• "Sticky" control bit: zero at reset; can be set but cannot be reset
• Once set (typically at boot), the only parameters from the above list that are
allowed to be changed are the reference signatures
• Mask input settings: enable, polarity
• Interrupt settings
• A mask bit for each of the two interrupts
• Freeze bit: the masks can be changed only before the freeze bit is set.
In the following table we can see a summary of the VPU specs. The VPU has its own
DMA driven AXI masters that allow it to retrieve the required data directly from system
memory (DDR and iRAM). The load in the host ARM platform is negligible because it
only needs to interact with the VPU at the frame level.
Table 9-7. VPU Spec Summary
Name VPU
Function Decode video streams including optional video processing such as rotation,
deringing and mirroring.
Supported encoders MPEG-4 SP
H.263 V2 + Annex J, K (RS=0 and ASO=0), and T
H.264 BP, CBP
MJPEG Baseline
Supported decoders MPEG-2 MP, HP
VC-1 SP, MP, AP
MPEG-4 SP, ASP
H.263 V2 + Annex J, K (RS=0 and ASO=0), and T
H.264 BP, MP, HP
H.264-MVC BP, MP, HP
DivX v3,4,5
Real Video 8, 9, 10
MJPEG Baseline
On2 VP8
AVS Jizhun
External I/O Pins (List, Type, Schmidt No external I/O pins are needed
Trigger, Speed)
SoC Buses (List, Type, Bandwidth) 64 bit AXI master for accessing the system memory and the optional secondary
AXI but to iRAM
IPBus slave for host control
Interrupts Two interrupts
DMA Requests Integrated DMA controller on the AXI master port
Endianness 64 and 32 bit BE/LE
Number of instantiations 1
Clock sources and range Core clock: up to 264 MHz
AXI bus clock: up to 264 MHz
IP bus clock: up to 66 MHz
NOTE
RealNetworks video codec is disabled by default on i.MX 6
series processors. Please contact your FSL sales representative
for more details.
The i.MX 6Dual/6Quad processor has a high-performance video processing unit (VPU),
which covers many standard and high definition video decoders and encoders as a multi-
standard video codec engine as well as several important video processing such as
rotation and mirroring.
TESTMODE
AXI write-data AXI write
channel channel
AXI read
channel
• EGL 1.4
• OpenGL 2.1
• OpenCL 1.1 EP
• OpenVG 1.1
Operating Systems
• Windows CE
• Linux Embedded and X11
• Android
• A8 (source/destination)
• 1-bit monochrome (source only)
• Filter Blit Formats
• A1R5G5B5 (source/destination)
• A4R4G4B4 (source/destination)
• A8R8G8B8 (source/destination)
• R5G6B5 (source/destination)
• X1R5G5B5 (source/destination)
• X4R4G4B4 (source/destination)
• X8R8G8B8 (source/destination)
• YUV (source only):
• NV12 (4:2:0, 2 planes)
• NV16 (4:2:2, 2 planes)
• UYVY (4:2:2, interleave)
• YUY2 (4:2:2, interleave)
• YV12 (4:2:0, 3 planes)
• 8-bit color index(source only)
9.8.3 2D Performance
• Geometry Rate: 26.6M Triangles/sec
• Pixel Rate: 256M pixels/sec
9.8.4 2D Software
API / Driver Support
• GDI/DirectDraw
• DirectFB
• X11 EXA
Operating Systems
• Windows CE
• Linux Embedded and X11
• Android
HDMI
Video I/F
Image Parallel I/F TX
Processing
Unit
TMDS_DATA
Audio DMA
HDMI
External AHB master 3
TX TMDS_CLK
Memory
PHY
Interface
HDMI
TX
Controller CEC
DDC(I2C)
Control Regs
2
AHB Slave
RNDGenGasket
Clocks
Interrupts
The video interface is parallel with 24 bit/pixel data and separate signals for vertical
(VSYNC) and horizontal (HSYNC) synchronization. The video data is supplied by the
Image Processing Unit (IPU).
The audio data is read from an external memory by the internal Audio DMA via the
master AHB interface. The HDMI TX is controlled via the AHB interface.
9.10.2 Features
The HDMI TX features are listed in Table 9-9.
Table 9-9. HDMI TX Features
Specification item Requirement
General Features
Standard Compliance HDMI 1.4a
Table continues on the next page...
9.11.1 Introduction
i.MX 6Dual/6Quad Application Processor features MIPI DSI/CSI-2 interfaces that
includes:
• MIPI DSI Host controller with associated MIPI D-PHY Tx (One clock lane, two
Data lanes)
• MIPI CSI-2 Host controller with associated MIPI D-PHY Rx (one clock lane, four
Data Lanes)
There is one instance of DSI port in the chip. This interface support from 80 Mbps up to
1 Gbps speed per data lane. The DSI Receiver core can mange one clock lane and up to 4
data lanes through the lane management, however two data lanes are implemented in the
transmitter D-PHY, therefore the maximum throughput of display port is 2Gbps.
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 6, 05/2020
NXP Semiconductors 319
Display / Sensor MIPI interfaces
There is one instance of CSI-2 port in the chip. This interface supports from 80 Mbps up
to 1 Gbps speed per data lane. The CSI-2 Receiver core can mange one clock lane and up
to four data lanes through the lane management and de-packetization, providing a
maximum throughput of 4 Gbps transfer rate.
9.11.4 D - PHY
D-PHY serves as physical layer for both MIPI DSI and CSI-2 interfaces.
D-PHY Transceiver unit is responsible for transmission and reception of data in High
speed (HS) or Low Power (LP) mode. High speed mode is used for high-speed data
transmission while the low power mode used for the control purpose. Point-to-point lane
interconnect can be used for either data or clock signal transmission. High speed receiver
is a differential line receiver while low- Power receiver is an un-terminated, single-ended
receiver circuit.
Table 9-12. D-PHY Parametric Table
Name D-PHY TX, D-PHY RX
Function MIPI D-PHY dual mode transceiver
Supported standard version D-PHY specification v1.0
PPI LP-TX
(appendix)
TX
HS-TX
Dp
Clock Dn
Ctrl
LP-RX
LP-CD
CD
There is one instance of D-PHY TX (hard macro; two data lanes, one clock lane, PLL)
and one instance of D-PHY RX (hard macro: four data lanes, one clock lane, no PLL) in
i.MX 6Dual/6Quad.
AUDMUX
Dedicated Audio Hardware
Audio Clocks
ARM
IP
3 Note: SSIx, SPDIF, and ESAI
could act as either clock master or clock slave. so
multiplexors should be provided to select related
clock input or output signal in dependence on
which mode, slave, or master mode is selected.
System Bus
SDMA 3
SSI1_3
SPBA
MLB ESAI
SSI1–3 are synchronous serial interfaces used to transfer audio data. SSI1–3 are on the
shared peripheral bus. Instead of connecting to the IOMUX directly, their serial lines
connect to the digital audio mux (AUDMUX).
AUDMUX provides flexible, programmable routing of the serial interfaces (SSI1, SSI2,
or SSI3) to and from off-chip devices. AUDMUX routes audio data (and even splices
together multiple time-multiplexed audio streams) but does not decode or process audio
data itself. The ARM controls AUDMUX, but AUDMUX can route data even when the
ARM is in a low-power mode.
ESAI (enhanced serial audio interface) provides a full-duplex serial port for serial
communication with a variety of serial devices, including industry-standard codecs,
SPDIF transceivers, and other processors. ESAI consists of independent transmitter and
receiver sections, and each section has its own clock generator. ESAI is connected to the
IOMUX and to the ESAI_BIFIFO module.
ESAI_BIFIFO (ESAI bus interface and FIFO) is the interface between the ESAI module
and the shared peripheral bus. It contains the FIFOs used to buffer data to and from
ESAI. It also provides the data word alignment and padding necessary to match the 24-bit
data bus of the ESAI to the 32-bit data bus of the shared peripheral bus.
The SPDIF (Sony/Philips digital interface) audio module is a stereo transceiver that
allows the processor to receive and transmit digital audio over it. The SPDIF receiver
section includes a frequency measurement block that allows the precise measurement of
an incoming sampling frequency. A recovered clock is provided by the SPDIF receiver
section and may be used to drive both internal and external components in the system.
SPDIF is connected to the shared peripheral bus.
ASRC (asynchronous sample rate converter) converts the sampling rate of a signal
associated to an input clock into a signal associated to a different output clock. ASRC
supports concurrent sample rate conversion of up to 10 channels of over 120dB THD+N.
The sample rate conversion of each channel is associated to a pair of incoming and
outgoing sampling rates. ASRC supports up to 3 sampling rate pairs. ASRC is connected
to the shared peripheral bus.
AUDMUX IOMUX
Port 3
RxFS3 CSI0_DAT11 (ALT1)
RxD3 CSI0_DAT7 (ALT4)
TxD3 CSI0_DAT5 (ALT4)
SSI 2 Port 2
- Daisy Chain, i.e. more than one PAD is available (only one option shown above).
For the SPDIF transmitter, the audio data is provided by the processor via the
SPDIFTxLeft and SPDIFTxRight registers, and the data is stored in two 16-word-deep
FIFOs, one for the right channel, the other for the left channel. The FIFOs support
programmable watermark levels so that FIFO Empty service request can be triggered
when the combined number of empty data words locations in both FIFOs is 8, 16, 24 or
32 words. It is recommended to program the watermark level to trigger a FIFO Empty
service request when 16 word locations are empty. For optimal performance when
servicing the FIFO Empty service request, the FIFOs should be written alternately,
starting with the left channel FIFO. The Channel Status bits are also provided via the
C Channel 0 - 23
C Channel 24 - 47
U Channel 0 - 23
U Channel 24 - 47
SPDIFOUT1 To ASRC clock output
Off
SPDIF
XMTR
2 x 16 words
FIFO
C Channel 0 - 23
C Channel 24 - 47
U Channel 0 - 23
[Note: ESAI, SSI, MLB Clock freq at least 64 x Fs, 110 ppm] U Channel 24 - 47
2-512
ASRC converts the sampling rate of a signal associated to an input clock into a signal
associated to a different output clock. ASRC supports concurrent sample rate conversion
of up to 10 channels of about -120dB THD+N. The sampling rate conversion of each
channel is associated to a pair of incoming and outgoing sampling rates. ASRC supports
up to 3 sampling rate pairs.
In the real-time audio use case, both input/output sampling rate clocks are activated. Both
sampling rate clocks are directly connected to ASRC, and the ratio estimation of the input
clocks to output clocks is used to perform the sample rate conversion in ASRC hardware.
The SSI1, SSI2, SSI3, S/PDIF, ESAI, and MLB audio modules can act as either a clock
master or a clock slave. Multiplexors are provided on a chip level to select which of the
module's clock signal, input or output, will be connected to ASRC input in dependence of
the module's operational mode as it is shown in Figure 9-15 and Table 9-13. Figure 9-15
presents the multiplexor cell used for all ASRC input clocks. Table 9-13 shows the
detailed clocks, multiplexor control and data bits for each ASRC input clock. For the
audio blocks clocks that are directly conected to ASRC (without the multiplexor scheme)
see Table 9-14.
In the non-real time streaming audio use case, the input sampling rate clock does not need
to be provided. Instead the ideal-ratio value conversion is set in the ASRC interface
registers. In this case only the output sampling rate clock must be provided, and the fixed
ratio of the input to the output in the register is used to perform the sample rate
conversion.
Clock Out
11
1
00
0
asrck_clock_x
10
ASRC
01
Multiplexor
1. Register[bit] format, SRCR is the regsiter name in the block specified in the "Audio block source" column, while RXDIR is
name field/bit in the register.
2. GPR0 is the General Register 0 in the IOMUX controller. See IOMUXC chapter for more details.
3. Not in used, the clock value is "0".
10.1 Introduction
This chapter describes the Clock and Power Management architecture of the SoC.
The chip targets applications where low power consumption, long battery life, always-on
and instant-on capabilities are paramount, and where there is no need for active cooling.
To achieve these capabilities, the primary focus of the chip's design is reducing current
consumption as much as possible, while simultaneously enabling the maximum level of
peak performance and a balanced level of sustained performance for target applications.
To achieve this, the chip architecture uses a wide range of power-management techniques
and their combinations for maximum system design flexibility.
This chapter contains information about:
• Structural components of the power and clock management systems of the chip
• Power, clock and thermal management techniques supported by the chip
All given numerical values are typical or examples. For accurate values one should refer
to the datasheet.
PMIC_STBY_REQ
CLK1 CCM
CLK2
Clock Clock 1
Generation Clock 2
OSC Clock N
24MHz
Configuration Clock Root
and Status Generation
OSC
Registers
32.768K
PLL Enables
Power State Control and
Clock Ready
Status Logic
Root M
Root 1
Root 2
Control and
Module Clock
Clock Enable
from module
(Integrated Power Regulators and
Power/Clock/Voltage Domain
Power/Clock/Voltage Domain
Power/Clock/Voltage Domain
MLB_IO_CLK
CLK1 CLK2
MLB SATA PCIE IOMUX
MLB_CLK
MLB_PLL_PWR_DOWN
MLB_PLL_DIV_SEL[1:0]
SATA_REF_CLK
OSC
32.768K
REF_CLK
PCI_E
OSC
24MHz
REF_CLK
ENET
Configuration and Clock Generation Clock Generation
Status Registers Control and Status logic
Enable_USB1_PLL_PFDs
Enable_SYS_PLL_PFDs
XTAL_POWER_DOWN
USB1_PLL_PFDs[3:0]
SYS_PLL_PFDs[3:0]
Enable_USB1_PLL
Enable_ENET_PLL
Enable_ARM_PLL
Enable_AUD_PLL
Enable_MLB_PLL
Enable_SYS_PLL
Enable_VID_PLL
XTAL_ENABLE
XTAL_BYPASS
global_pll_lrf
USB1_PLL
SYS_PLL
AUD_PLL
24M_CLK
32K_CLK
VID_PLL
Stop
Configuration and
CCM
Control and Status logic Clock Selection and Root Generation
Status Registers
Root_xxx_enable
WFI
Root_1_enable
Root_2_enable
Root xxx
Root 1
Root 2
ARM_CLK
ARM
Clock
enable
At Reset
LPCG
Clock Gating Logic
SRC Mod_1_CLK1_enable
Mod_1_CLK2_enable
Mod_1_CLKX_enable
Mod_1_CLKX
Mod_1_CLK1
Mod_1_CLK2
Mod_K_CLKY_enable
Mod_K_CLK1_enable
Mod_K_CLK2_enable
Mod_K_CLK1
Mod_K_CLK2
Mod_K_CLKY
Frequency change /Stop
Request (Optional)
Frequency change /Stop
Acknowledge (Optional)
Module1
A high level block diagram of the clock generation is shown in the figure below.
10.3.2.3 PLLs
Eight PLLs are included in the clock generation section. Two of these PLLs are each
equipped with four Phase Fractional Dividers (PFDs) in order to generate additional
frequencies.
NOTE
Each PFD works independently by interpolating the VCO of the
PLL to which it is connected. It effectively takes the PLL VCO
frequency and produces 18/N x Fvco at its output where N
ranges from 12 to 35. PFD is a completely digital design with
no analog components or feedback loops. The frequency switch
time is much faster than a PLL because keeping the base PLL
locked and changing the integer N only changes the logical
combination of the interpolated outputs of the VCO. Note that
the PFD not only enables faster frequency changes than a PLL,
but also allows the configuration to be safely changed "on-the-
fly" without going through the output clock disabling/enabling
process.
The eight PLLs are listed below:
• PLL1 (also referred to as ARM_PLL) - This is the PLL clocking the Arm core
complex. It is a programmable integer frequency multiplier capable of output
frequency of up to 1.3 GHz (may exceed chip capabilities, see datasheet for more
information).
10.3.2.4 CCM
CCM includes:
• Clock root generation logic - This sub-block provides the registers that control most
of the secondary clock source programming, including both the primary clock source
selection and the clock dividers. The clock roots are each individual clocks to the
core, system buses (AXI, AHB, IPG) and all other SoC peripherals, among those are
serial clocks, baud clocks, and special functional clocks. Most of clock roots are
specific per module.
• CCM, in coordination with GPC, PMU and SRC, manages the Power modes, namely
RUN, WAIT and STOP modes. The gating of the peripheral clocks is programmable
in RUN and WAIT modes.
CCM manages the frequency scaling procedure for:
• Arm core clock - "on the fly" without clock interruption, by either shifting between
PLL sources PLL clock change or by changing the divider ratio.
• changing of the DDR memory controller clock. See MMDC handshake and Self
refresh and Frequency change entry/exit for more details.
• Peripheral root clock - by using programmable divider. The division factor can
change on the fly without loss of clocks.
NOTE
On-the-fly frequency changing for synchronous interfaces like
serial audio interfaces, video and display interfaces, or general
purpose serial interfaces (e.g. UART, CAN) may cause
synchronization loss and should not be done.
• Clock enable signal from CCM - This signal is generated depending on the power
mode the system is in. For each power mode, it is defined in the software using the
configuration of the CGR bits in CCM.
• Clock enable signal from the block - This signal is generated by the block based on
its internal logic. Not every enable signal from the block is used. Each clock enable
signal from the block can be overridden based on the programmable bit in CCM.
• Clock enable signal from the reset controller (SRC) - This signal will enable the
clock during the reset procedure.
CCM LPCG
Mod_X_BUS_A_Stop/Change_Req
Mod_X_Data_BUS_CLK_gated
at configuration bus clocks
Mod_X_Bus_Idle (Master)
Mod_X_CFG_BUS_CLK
Mod_X_Data_BUS_CLK
Mod_X_FUNC_CLK_N
Mod_X_FUNC_CLK_1
Mod_X_FUNC_N_Idle
Mod_X_FUNC_N_Idle
Module X
Interrupt
Controller
PMIC_STBY_REQ
CCM
Configuration
and Status
Registers
PMIC_ON_REQ PMU
(Control and Power State Control and
PMU Status Logic ) Status Logic
(Configuration
ON / OFF and Status
Button Registers )
SNVS
Configuration GPC
Request/ACK
SNVS Voltage
Power Gate
POR and Status
Sensors GPC
Registers
Power Interrupt
Good Controller
ON/OFF Control and
Status Logic
Power
POR SRC Gating
PMU ( Regulators and Switches )
Logic
VDD_SOC_IN
VDD_ARM_IN
VDD_HIGH_IN
VDD_SNVS_IN
Interrupt Controller
ARM power domain
Wake- up Interrupt
It consists of a set of secondary power supplies that enable SoC operations from just two
or three primary supplies. The high level block diagram of the power tree, utilizing the
integrated PMU, is shown below.
ARM
Power
LDO 2P5 SATA PHY LDO3P0 LDO_DIG LDO_DIG LDO_DIG
(SoC) (PU) (ARM)
domain
MIPI PHY
OSC32K SoC voltage domain
NVCC_LVDS
ARM PLL DDR/RGMII IO
SVNS Pre Drivers
ENET PLL
TSNS
Temperature
Audio PLL
Video PLL
Efuse
Switch
EFUSE
See Power Management Unit (PMU) for further details on integrated PMU functional
description and programmability.
For further details of LDO programming and configuration please refer to Digital
Regulator Core Register (PMU_REG_COREn).
The power management system is built under assumption that in typical applications the
single (and simple) shared power supply will be used for Arm core domain and SoC
domain. The combined load gains some efficiency, especially in low power modes and
saves BoM significantly.
The DVFS in a typical cost/complexity optimized application is considered by mean of
internal LDO. In"full speed" modes LDO bypass is considered in both domains. The
dynamic voltage scaling to low load workpoints for Arm domain is implemented by
programming associated LDO.
In highly power-optimized systems, it is possible to use multiple external DCDC buck
converters and bypass internal LDO for high power domains. The obvious trade-off is in
the increased complexity of the external power supply components and the associated
increase in the BoM and board design complexity.
It determines the source and the type of reset, such as POR, WARM, and COLD, and
performs the necessary reset signal qualifications. SRC is capable of generating reset
sequences in the following conditions:
• in interaction with external PMIC, based on external POR_B signal and "power
ready" signals generated by the integrated PMU
• or in interaction with the integrated PMU only, based on its "power ready" signal.
Based on the type of reset, the reset logic generates the reset sequence for either the entire
SoC or for the blocks that are power-gated.
See System Reset Controller (SRC) for further details on SRC functional description and
programmability.
GPC
PMU
CCM
Module
Power Gating
Control
Memory Module
Interface Isolation
Power Gating Memory Control
Control Sub-domain
Isolation control
Memory
Sub-domain
Power Gating
Control
Module X
regulator, and can be combined with the memory array supply. The analog supply
should be provided from internal low noise regulator.
• Main SoC logic - The main SoC logic domain contains the rest of the logic of the
SoC.
From a DVFS and Power Gating standpoint, the following digital logic domains are
affected:
• Cortex-A9 Core Platform - DVFS and power gating.
• Arm Cortex-A9 memories - Power gating only.
• GPU3D and VPU - Power gating only.
See table below for details of the i.MX 6Dual/6Quad system power domains layout and
dependencies.
Power on
Figure 10-7. Arm Core Platform isolation and power on switch flow
Configure the GPC/PGC PUPSCR Register SW2ISO bits. These bits determine the
power-up request to the LDO domain isolation disabling.
Configure the GPC/PGC CTRL[PCR] bit to allow the power down of the block.
Configure the GPC/PGC GPC_CNTR to power down GPU3D, GPU2D and VPU
Isolation enable
Power on
ISO Count SW Gate Supply Power Down SW Enable Supply SW2ISO Count
Figure 10-8. GPUs and VPU isolation and power on switch flow
10.4.1.4.3.3 SoC
For additional power reduction it is possible to do the following:
• Power-down the internal oscillator by configuring the following bits
CCM_CCR[COSC_EN] (CCM Memory Map/Register Definition). This can be done
only in case there is no dependency on 24 MHz XTAL for wake-up.
• Enable reverse well biasing by configuring the CCM_CLPCR[WB_PER_AT_LPM]
bit (CCM Memory Map/Register Definition).
• It is possible to turn off and turn on the PMIC supplies to the SoC even when the
SoC supplies are off. Since SNVS_LP is powered through an "always on" supply,
configuring the SNVS_LP DP_EN to "1" allows changing the PMIC_ON_REQ pad
(SoC on/off supply indication to the PMIC) through the ONOFF pad.
Cortex-A9
VPU isolation
cells
Note: The arrows refer to the signal directions for the voltage level shifters and isolation cells
10.4.1.6.1 Dynamic
10.4.1.6.2 Static
There is a single hardware signal coming into PMU which sets the PMU in either of two
"STOP" states. The STOP state is implemented is controlled by the
PMU_MISC0[STOP_MODE_CONFIG] bit (See PMU Memory Map/Register
Definition). It is recommended that the blocks be configured for safe powerdown/up
through the registers before asserting the stop_mode signal. Blocks not described in the
section below are unaffected by stop_mode.
If the stop_mode_config is set to zero, thus in the STOP mode all blocks powered down
in minimum power configuration.
If the stop_mode_config is set to one, thus in the STOP mode some of the blocks remain
powered and in different states as defined in the table below.
Table 10-2. STOP mode configuration
Block STOP_MODE_CONFIG=0 STOP_MODE_CONFIG=1
reg1p1 off on
reg2p5 off on
reg3p0 off/on depending on vbus. Uses crude off/on depending on vbus . Uses analog
local reference if vbus is present central bandgap if VBUS is present.
reg_core bypassed if not power gated. bypassed if not power gated
reg_pu bypassed if not power gated. bypassed if not power gated.
reg_soc bypassed bypassed
bandgap off functional
temp_sensor off off
well_bias hardware controlled hardware controlled
All PLLs off off
OSC24M off Controlled by CCM configuration
LVDS clock I/O CLK1 and CLK2 off off
Table 10-3. Power saving design/architecture and power saving techniques (continued)
Techniques Active SoC Standby SoC System
Power Power Power
Display Backlight optimization (IPU, SW) √
Architecture: L2 cache, Video / Audio / Graphics acceleration √
Architecture: SATA, PCIe, LVDS, HDMI, USB integration √
Low Power DDR: LPDDR2, LV-DDR3 √
1. Applicable to use cases where GPU3D and VPU operation is not required.
Software may support DDR frequency scaling. Automated frequency changing procedure
is supported by MMDC and CCM modules.
NOTE
DDR frequency changes cost extra time and power. Slowing
requestors while keeping DDR at full speed may increase total
system power. Software may also implement Cooperative
Dynamic Frequency Scaling in order to keep the system
balanced, (that is, keep the system in balance when DDR
throughput is equal or slightly higher than total amount of
requests generated by all requestors).
Reducing the DDR frequency while in DLL-ON mode may be not efficient because:
• Reduction in DDR frequency will cause bus duty cycle to increase and thus reduces
chance of automatic MMDC power saving (place memory into SR).
• Total amount of read/write operation does not change (power is per-operation).
• The termination is active longer, though, lowering frequency from 528 MHz to 400
MHz or below may enable lowering drive strengths and termination.
When possible at lower performance use cases, software may switch DDR3 to DLL-off
mode. This allows it to greatly reduce DDR3 frequency and thus disable or reduce
termination and drive strength, which significantly reduces the power consumption of the
DDR3 interface.
A good strategy for many types of workloads is to combine most activity in bursts
(natively possible, for example, for typical multimedia applications, communication, etc.)
and run this segment at maximal speed, then switch to DLL-OFF mode to support
background activity (communication, display refresh, housekeeping).
The DRAM Interface power dissipation depends on many variables, however, proper
termination and drive strength is key for power and thermal performance. Memory and
controllers provide a host of programmable options for the drive strength of the output
buffers and for the on-die termination impedance.
The ideal settings for drive strength and ODT also depend on the clock frequency to
ensure that inter-symbol interference (ISI) effects are not introduced.
DDR PHY power is proportional to the amount and type of bus activity. For more data on
ODT savings, please refer to the Application Note, AN4509 i.MX 6Dual/6Quad Power
Consumption.
In cases where the DDR is placed into self-refresh, software can configure DDR I/O to be
floated or lowered to the minimum drive allowed by JEDEC.
Modifying the DDR drive strength must be done by code that is executing from a
memory region other than DDR (for example, IRAM). No access to DDR (including
page table walks, cache misses, alternate bus master accesses, etc.) is allowed while the
DDR I/O pads are being re-configured.
DCDC1
i.MX6 Q/D
ON/OFF
VDDARM_IN
LDO_DIG VDD_ARM_CAP
(ARM0,1)
VDDARM23_IN LDO_DIG VDD_ARM2,3_CAP
STBY (ARM2,3)
ARM0,1 ARM2,3
VDD_SoC_CAP
PWR_GOOD CACHE Array
VDDSOC_IN LDO_DIG VDD_SoC_CAP
(SoC)
SoC logic
DCDC2 VDDHIGH_IN
LDO_DIG VDD_PU_CAP
ON/OFF (PU)
GPU3D
GPU2D
NVCC_LVDS_2P5 OpenVG
VPU
STBY LVDS_IO
LDO2P5 VDD_HIGH_CAP
NVCC_DRAM
PWR_GOOD
DRAM_IO
SATA PHY SATA_VPH
Digital IO supplies should be provided per application requirements. All IO group supplies at the same operating voltage,
NVCC_RGMII SATA_VP
NVCC_LVDS_2P5 RGMII_IO
should be connected
MIPI PHY NVCC_MIPI
directly to NVCC_GPIO
VDD_HIGH_CAP
GPIO_IO
NVCC_LCD
PCIe PHY PCIE_VPH
LCD_IO PCIE_VP
NVCC_CSI
CSI_IO
HDMI Tx PHY HDMI_VPH
NVCC_ENET
HDMI_VP
ENET_IO
NVCC_EIM0
EIM0_IO
NVCC_EIM1
USB OTG PHY USB_OTG_VBUS
EIM1_IO
NVCC_EIM2
except NVCC_DRAM, can be combined.
EIM2_IO
USB H1 PHY USB_H1_VBUS
NVCC_NANDF
NANDF_IO
NVCC_SD1
SD1_IO
NVCC_SD2
SD2_IO NVCC_PLL_OUT
LDO PLL
NVCC_SD3
PLLs
SD3_IO
NVCC_JTAG
ON/OFF
Button
VDDARM_IN
OUT1 (DCDC) LDO_DIG VDD_ARM_CAP
(ARM0,1)
VDDARM23_IN LDO_DIG VDD_ARM2,3_CAP
(ARM2,3)
ARM0,1 ARM2,3
VDD_SoC_CAP
CACHE Array
VDDSOC_IN LDO_DIG VDD_SoC_CAP
OUT2 (DCDC)
(SoC)
SoC logic
VDDHIGH_IN
OUT3 LDO_DIG VDD_PU_CAP
(PU)
GPU3D
GPU2D
NVCC_LVDS_2P5 OpenVG
OUT4 VPU
NVCC_RGMII SATA_VP
OUT6
RGMII_IO
GPIO_IO
NVCC_LCD
PCIe PHY PCIE_VPH
LCD_IO
PCIE_VP
NVCC_CSI
CSI_IO HDMI_VPH
HDMI Tx PHY
NVCC_ENET
HDMI_VP
ENET_IO
NVCC_EIM0
EIM0_IO
NVCC_EIM1
USB OTG PHY USB_OTG_VBUS
EIM1_IO
NVCC_EIM2
except NVCC_DRAM, can be combined.
EIM2_IO USB_H1_VBUS
USB H1 PHY
NVCC_NANDF
STBY
NANDF_IO
OUT N NVCC_SD1
ON/OFF
Button SD1_IO
ON/OFF
NVCC_SD2
SD2_IO NVCC_PLL_OUT
LDO PLL
NVCC_SD3
PLLs
SD3_IO
NVCC_JTAG
POR JTAG_IO
VDD_SNVS_IN
Always_ON
PMIC_ON_REQ LDO_SNVS
VDD_SNVS_CAP
PMIC_STBY_REQ
POR SNVS_IO SNVS (LP)
Figure 10-11. Supplying i.MX 6Dual/6Quad Power Using External Programmable PMIC
11.1 Overview
Security is a common requirement for platforms built using the chip, although the
specific needs vary greatly depending on the platform and market. The type and cost of
assets to be protected on a portable consumer device are very different from those to be
protected on automotive or industrial platforms, and the same applies to the kind of
attacks and level of resources threatening those assets. The platform designer must select
an appropriate set of counter measures to meet the relevant platform security needs.
The following figure shows a simplified diagram of the security subsystem.
Supervisor mode
CAAM
access indication
Secure
RAM
Zeroize SNVS
ARM RAM
SW Alarm
Alarm HP
System Security Monitor
HAB
Keys
Keys
Param
Tamper & Power Glitch Detectors
Electrical Fuse Array (OCOTP)
Fuse Secret Key, Boot Image Version Control,
Ship Unique Identification, SRK hash, Security Configuration Fuse Unique
Secret Key
For the platform designer to meet the requirements for each market, the chip incorporates
a range of security features which can be used individually or in concert to underpin the
platform security architecture. Most of the chip security features provide protection
against particular kinds of attack and can be configured at various levels according to the
required degree of protection. These features are designed to work together and can be
integrated with appropriate software to create defensive layers. In addition to protection
features, the chip includes a general purpose accelerator to enhance the performance of
selected industry standard cryptographic algorithms.
The following is an introduction to the chip security components.
• Cryptographic module with AES 128/256 symmetric algorithms, random number
generator entropy source and NIST-validated DRBG, cryptographic key protection,
run-time integrity checking.
• High Assurance Boot (HAB) feature in the System Boot up to RSA-4096 signature
verification
• Secure Non Volatile Storage (SNVS)
• TrustZone (TZ) Architecture in the ARM Cortex A9 Platform, TrustZone aware
Interrupt Controller (GIC) and TrustZone Watchdog Timer (WDOG-2)
• TrustZone Address Space Controller (TZC-380) - providing security address region
control functions on DDR memory space.
• On-chip RAM (OCRAM) with TrustZone protection using OCRAM controller.
• 16 Kbyte of on-chip Secure RAM
• On chip OTP (OCOTP) with on-chip electrical fuses
• Central Security Unit (CSU)
• Secure JTAG Controller (SJC)
• Locked mode in the Smart Direct Memory Access (SDMA) controller
• For DTCP (Digital Transmission Content Protection) adopters, DTCP functionality
to support DTCP-MOST and DTCP-IP.
• 12 tamper pins supported
• Hardware Cryptographic Accelerators
• Symmetric: AES-128, AES-192, AES-256, DES, 3DES, and ARC4
• Hash Message Digest and HMAC: SHA-1, SHA-224, SHA-256, and MD-5
• True and Pseudo Random Number Generator
Detailed descriptions of the components are provided in the Multimedia Applications
Processor Security Reference Manual for i.MX 6Dual/6Quad and i.MX 6Solo/6DualLite.
There are four security modes of operation (i.e. bus privileges) in the system
distinguished by security (TrustZone/non-TrustZone) and privilege (Supervisor/User)
setting of the module. Below is the list of these security modes from the highest security
level to the lowest:
• TrustZone (Secure) Privilege (Supervisor) Mode - Highest Security Level
• TrustZone (Secure) non-Privilege (User) Mode - Medium Security Level
• non-TrustZone (Regular) Privilege (Supervisor) Mode - Medium Security Level
• non-TrustZone (Regular) non-Privilege (User) Mode - Lowest Security Level
This functionality is implemented as follows:
The Configure Slave Level (CSL) Register value for a specified peripheral resource
defines the output signal -- csu_sec_level for that peripheral. The value of this signal
determines by what master privileges a peripheral is accessible. The relationship between
the value of the csu_sec_level signal and security operation mode is shown in the table
below. The CSL registers reside in the CSU module. Details, describing CSL register
fields and how they are programmed to control access privileges for specific peripherals,
can be found in the Security Reference Manual.
Table 11-1. Permission Access Table
CSU_SEC_LEVEL[2: Non-Secure Non-Secure Secure (TZ) User Secure (TZ) Spvr CSL register
0] User Mode Spvr Mode Mode Mode value
(0) 000 RD+WR RD+WR RD+WR RD+WR 8'b1111_1111
(1) 001 None RD+WR RD+WR RD+WR 8'b1011_1011
(2) 010 RD RD RD+WR RD+WR 8'b0011_1111
(3) 011 None RD RD+WR RD+WR 8'b0011_1011
(4) 100 None None RD+WR RD+WR 8'b0011_0011
(5) 101 None None None RD+WR 8'b0010_0010
(6) 110 None None RD RD 8'b0000_0011
(7) 111 None None None None Any other value
potential security violation, such as a tamper alert, the SNVS signals CAAM to erase
sensitive data such as cryptographic keys, and sends an interrupt to alert the Operating
System of the event. The SNVS also includes a general purpose real-time counter.
The SNVS includes the following features:
• Security State Machine driven by High Assurance Boot software and tamper
detection circuits
• Master Key Control that protects the integrity and secrecy of the Master Key
(OTPMK) stored in fuses
• Tamper detection circuits that detect JTAG events, power glitches, Master Key ECC
check failure, and software-reported and hardware-reported security violations
• 256-bit Zeroizable Master Key that can be automatically erased in the event of a
security breach
• Tamper-protected Secure Realtime Counter that continues running when the chip is
powered off
• Non-volatile Monotonic Counter used to protect against “roll-back” attacks
• Non-volatile General Purpose Register can be used to store a 32-bit value across
power cycles
• Non-Secure Real Time Counter with programmable alarm and periodic interrupt
The System JTAG Controller (SJC) protects against the whole range of attacks based on
unauthorized JTAG manipulation. It also provides a JTAG port that conforms to the
IEEE 1149.1 and IEEE 1149.6 (AC) standards for BSR (boundary-scan) testing.
The SJC provides these security levels:
• The JTAG Disabled-JTAG use is permanently blocked.
• The No-Debug-All security sensitive JTAG features are permanently blocked.
• The Secure JTAG-JTAG use is restricted (as in the No-Debug level) unless a secret-
key challenge/response protocol is successfully executed.
• The JTAG Enabled-JTAG use is unrestricted.
The security levels are selected via the e-fuse configuration.
NOTE
For the final production hardware, the most secure and
preferred method is to ensure that the JTAG interface is not
pinned or routed out at all. The same applies to any other trace,
diagnostic or test ports including SDP.
12.1 Overview
The Cortex-A9 Core Platform consists of an ARM®Cortex®-A9 MPCore processor,
which includes a NEON co-processor, a private timer and watch-dog, and 32 KB + 32
KB L1 data and instruction caches per core.
The Cortex-A9 Core Platform consists of a unified 1 MB L2 cache, SCU (Snoop Control
Unit), and Generic Interrupt Controller (GIC). In addition, the Cortex-A9 Core Platform
includes various components composing the ARM CoreSight debug/Trace system,
including PTM and a 3 / 51 x CTI, 2xCTM, and 16KB ETB.
The Cortex-A9 processor utilizes two AXI-64 master ports connected from the SCU to
the Level 2 Cache. The L2 cache also utilizes 2x AXI-64 to access the L3 memory or
other SoC peripherals in a symmetric way.
The core supports debug through real-time trace via PTM, and static debug via JTAG.
The core platform supports static debug through the debug logic to SOC. This includes
the capability of real time trace via ARM's CoreSight PTM, ETB and TPIU modules. The
CTI and CTM modules allow cross-triggering of internal and external trigger sources.
12.5.4.1 L1 features
• Four-way set associative cache
• Virtually indexed and physically addressed
• Capable of providing two words per cycle for all requesting sources
• Eight 32-bit words per cache line
• 128 indexes per tag RAM
The PFT architecture assumes the trace tools can access a copy of the code being traced.
For this reason, the PTM generates trace only at certain points in program execution,
called waypoints. This reduces the amount of trace data generated by the PTM compared
to the ETM protocol. Waypoints are changes in the program flow or events, such as an
exception. The trace tools use waypoints to follow the flow of program execution.
For full reconstruction of the program flow, the PTM traces:
• Indirect branches, with target address and condition code
• Direct branches with only the condition code
• Instruction barrier instructions
• Exceptions, with indication of where the exception occurred
• Changes in processor instruction set state
• Changes in processor security state
• Context-ID changes
• Entry to and return from Debug state when Halting Debug-mode is enabled
You can also configure the PTM to trace:
• Cycle count between traced waypoints
• Global system timestamps
• Target addresses for taken direct branches
PTM components include the following main components:
• Processor Interface to monitor the behavior of the processor.
• Trace Generation to create a real-time trace stream.
• Filtering and Triggering Resources used to affect when trace is generated and to
control the capturing of trace by the trace tools.
• Main FIFO (72 bytes) flattens out any bursts in the trace stream, and signals an
overflow in the trace when it becomes full, halting trace generation until the FIFO
empties.
• ATB interface for PTM output.
• APB interface to access the PTM registers.
13.1 Overview
This section provides an overview of the AHB to IP Bridge (AIPSTZ). This particular
peripheral is designed as the bridge between AHB bus and peripherals with the lower
bandwidth IP Slave (IPS) buses.
13.1.1 Features
The following list summarizes the key features of the bridge:
• The bridge supports the IPS slave bus signals. This interface is only meant for slave
peripherals.
• The bridge supports 8-, 16-, and 32-bit IPS peripherals. (Accesses larger than the size
of a peripheral are not supported, except to 32-bit memory.)
• The bridge supports a pair of IPS accesses for 64-bit and certain misaligned AHB
transfers to 32-bit memory in 64-bit platforms.
• The bridge directly supports up to 32 16-Kbyte external IPS peripherals, and 2 global
external IPS peripheral spaces. The bridge occupies 1 MBytes of total address space.
• The bridge provides configurable per-block and per-master access protections. More
details on the protection features and configuration can be found in the Security
Reference Manual
• Peripheral read transactions require a minimum of 2 hclk clocks, and unbuffered
write transactions require a minimum of 3 hclk clocks.
• The bridge uses one single asynchronous reset and one global clock.
13.2 Clocks
The following table describes the clock sources for AIPSTZ. Please see Clock Controller
Module (CCM) for clock setting, configuration and gating information.
Table 13-1. AIPSTZ Clocks
Clock name Clock Root Description
hclk ahb_clk_root Module clock
AIPS occupies a 1-Mbyte portion of the address space. The register maps of the IPS
peripherals are located on 16-Kbyte boundaries. Each IPS peripheral is allocated one 16-
Kbyte block of the memory map, and is activated by one of the block enables from the
bridge. Up to thirty-two 16-Kbyte external IPS peripherals may be implemented,
occupying contiguous blocks of 16-Kbytes. Two global external IPS block enables are
available for the remaining address space to allow for customization and expansion of
addressed peripheral devices. In addition, a single "non-global" block enable is also
asserted whenever any of the thirty-two non-global block enables is asserted.
Only byte accesses are supported for 8-bit peripherals. All other accesses types are
unsupported, and results of such accesses are undefined. They are not terminated with an
error response.
This peripheral can only be accessed by secure transactions. Bits 0, 1, 4, and 5 are
asserted and these bits refer to the four types of secure transactions. If an insecure
transaction is attempted to this peripheral, it will result in an error.
Eight bits per peripheral across an entire system can result in a large number of
configuration bits that must be assigned and controlled, most likely in a series of registers
in another block. To reduce the number of register bits required predefined sets of
security profiles can be defined and encapsulated in an external security translation block.
The table below describes one set of security profiles that has been proposed for use with
the AIPSTZ.
Table 13-3. Security Levels
CSU_SEC_LEVEL Non-Secure User Non-Secure Secure User Secure Supervisor
Supervisor
0 RD+WR RD+WR RD+WR RD+WR
1 NOT ALLOWED RD+WR RD+WR RD+WR
2 Read Only Read Only RD+WR RD+WR
3 NOT ALLOWED Read Only RD+WR RD+WR
4 NOT ALLOWED NOT ALLOWED RD+WR RD+WR
5 NOT ALLOWED NOT ALLOWED NOT ALLOWED RD+WR
6 NOT ALLOWED NOT ALLOWED Read Only Read Only
7 NOT ALLOWED NOT ALLOWED NOT ALLOWED NOT ALLOWED
Information regarding CSU is provided in the Security Reference Manual. Contact your
NXP representative for information about obtaining this document.
A 3-bit input, 8-bit output translation block can be used such that only three register bits
are required to set the security profile and the translation block will drive the correct 8-bit
configuration vector. Each peripheral connected to the AIPSTZ would require this
translation block. The top level AIPSTZ has this three bit input line `csu_sec_level[2:0]'
corresponding to each peripheral X.
The memory map for the AIPS SW-visible registers is shown in the table below.
The MPROT and OPACR fields are 4 bits in width. Some bits may be reserved
depending on device.
AIPSTZ memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
207_C000 Master Priviledge Registers (AIPSTZ1_MPR) 32 R/W 7700_0000h 13.8.1/398
Off-Platform Peripheral Access Control Registers
207_C040 32 R/W 4444_4444h 13.8.2/401
(AIPSTZ1_OPACR)
Off-Platform Peripheral Access Control Registers
207_C044 32 R/W 4444_4444h 13.8.3/404
(AIPSTZ1_OPACR1)
Off-Platform Peripheral Access Control Registers
207_C048 32 R/W 4444_4444h 13.8.4/407
(AIPSTZ1_OPACR2)
Off-Platform Peripheral Access Control Registers
207_C04C 32 R/W 4444_4444h 13.8.5/410
(AIPSTZ1_OPACR3)
Off-Platform Peripheral Access Control Registers
207_C050 32 R/W 4444_4444h 13.8.6/413
(AIPSTZ1_OPACR4)
217_C000 Master Priviledge Registers (AIPSTZ2_MPR) 32 R/W 7700_0000h 13.8.1/398
Off-Platform Peripheral Access Control Registers
217_C040 32 R/W 4444_4444h 13.8.2/401
(AIPSTZ2_OPACR)
Off-Platform Peripheral Access Control Registers
217_C044 32 R/W 4444_4444h 13.8.3/404
(AIPSTZ2_OPACR1)
Off-Platform Peripheral Access Control Registers
217_C048 32 R/W 4444_4444h 13.8.4/407
(AIPSTZ2_OPACR2)
Off-Platform Peripheral Access Control Registers
217_C04C 32 R/W 4444_4444h 13.8.5/410
(AIPSTZ2_OPACR3)
Off-Platform Peripheral Access Control Registers
217_C050 32 R/W 4444_4444h 13.8.6/413
(AIPSTZ2_OPACR4)
The registers provide one field per bus master, where field 15 corresponds to master 15,
field 14 to master 14,... field 0 to master 0 (typically the processor core). The master
index allocation is shown in the table below.
Table 13-6. MPROT Field
Bit Field Description
3 MBW Master Buffer Writes - This bit determines whether the AIPSTZ is enabled to buffer writes
from this master.
2 MTR Master Trusted for Reads - This bit determines whether the master is trusted for read
accesses.
1 MTW Master Trusted for Writes - This bit determines whether the master is trusted for write
accesses.
0 MPL Master Privilege Level - This bit determines how the privilege level of the master is
determined.
NOTE
The reset value is set to 0000_0000_7700_0000, which makes
master 0 and master 1 (Arm CORE) the trusted masters.
Trusted software can change the settings after reset.
Table 13-7. Master Index Allocation
Master Index Master Name Comments
Master 0 All masters excluding Arm core, SDMA and CAAM Share the same number allocation.
Master 1 Arm CORE
Master 2 CAAM
Master 3 SDMA
Master 4-15 Reserved
1. Buffered writes are not available for AIPSTZ. This bit should be set to '0'.
14.1 Overview
The AHB-to-APBH bridge provides the chip with an inexpensive peripheral attachment
bus running on the AHB's HCLK. (The H in APBH denotes that the APBH is
synchronous to HCLK.)
As shown in the figure below, the AHB-to-APBH bridge includes the AHB-to-APB PIO
bridge for a memory-mapped I/O to the APB devices, as well as a central DMA facility
for devices on this bus and a vectored interrupt controller for the Arm core. Each one of
the APB peripherals, including the vectored interrupt controller, is documented in their
respective chapters.
AHB
AHB-to-APBH DMA
APBH Master
AHB-to-APBH Bridge
GPMI1
APBH
.
.
.
.
.
GPMIn
The DMA controller uses the APBH bus to transfer read and write data to and from each
peripheral. There is no separate DMA bus for these devices. Contention between the
DMA's use of the APBH bus and the AHB-to-APB bridge functions' use of the APBH is
mediated by an internal arbitration logic. For contention between these two units, the
DMA is favored and the AHB slave will report "not ready" through its HREADY output
until the bridge transfer can complete. The arbiter tracks repeated lockouts and inverts the
priority, guaranteeing the Arm platform every fourth transfer on the APB.
14.2 Clocks
The table found here describes the clock sources for APBH. Please see Clock Controller
Module (CCM) for clock setting, configuration and gating information.
After any requested PIO words have been transferred to the peripheral, the DMA
examines the two-bit command field in the channel command structure. Table 14-3
shows the four commands implemented by the DMA.
word 0 NEXTCMDADDR
CMDPIOWORDS
HALTONTERMINATE
WAIT4ENDCMD
NANDWAIT4READY
SEMAPHORE
IRQONCMPLT
NANDLOCK
COMMAND
CHAIN
XFER_COUNT
word 1
DMA_WRITE operations copy data bytes to the system memory (on-chip RAM or
SDRAM) from the associated peripheral.
DMA_READ operations copy data bytes to the APB peripheral from the system memory.
The DMA engine contains a shared byte aligner that aligns bytes from system memory to
or from the peripherals. Peripherals always assume little-endian-aligned data arrives or
departs on their 32-bit APB. The DMA_READ transfer uses the BUFFER_ADDRESS
word in the command structure to point to the DMA data buffer to be read by the
DMA_READ command.
DECREMENT SEMAPHORE
HALTONTERMINATE
NANDwAIT4READY
IRQ_COMPLETE
WAIT4ENDCMD
NANDLOCK
COMMAND
Number PIO
CHAIN
Number DMA Bytes to Transfer Words to
Write
Figure 14-2 also shows the CHAIN bit in bit 2 of the second word of the command
structure. This bit is set to 1, if the NEXT_COMMAND_ADDRESS contains a pointer to
another DMA command structure. If a null pointer (0) is loaded into the
NEXT_COMMAND_ADDRESS, it is not detected by the DMA hardware. Only the
CHAIN bit indicates whether a valid list exists beyond the current structure.
If the IRQ_COMPLETE bit is set in the command structure, then the last act of the DMA
before loading the next command is to set the interrupt-status bit corresponding to the
current channel. The sticky interrupt request bit in the DMA CSR remains set until
cleared by the software. It can be used to interrupt the Arm platform.
The NAND_LOCK bit is monitored by the DMA channel arbiter. Once a NAND channel
(from channel 0 to channel 3) succeeds in the arbiter with its NAND_LOCK bit set, then
the arbiter ignores the other NAND channels until a command is completed in which the
NAND_LOCK is not set. Notice that the semantic here is that the NAND_LOCK state is
to limit scheduling of a non-locked DMA. A DMA channel can go from unlocked to
locked in the arbiter at the beginning of a command when the NAND_LOCK bit is set.
When the last DMA command of an atomic sequence is completed, the lock should be
removed. To accomplish this, the last command does not have the NAND_LOCK bit. It
is still locked in the atomic state within the arbiter when the command starts, so that it is
the only NAND command that can be executed. At the end, it drops from the atomic state
within the arbiter.
The NAND_WAIT4READY bit also has a special use for GPMI channels (from channel
0 to channel 3), i.e., the NAND device channels. The GPMI peripheral supplies a sample
of the ready line from the NAND device. This ready value is used to hold off of a
command with this bit set until the ready line is asserted to 1. Once the arbiter sees a
command with a wait-for-ready set, it holds off that channel until ready is asserted.
Each channel has an eight-bit counting semaphore that controls whether it is in the idle
state. When the semaphore is non-zero, the channel is ready to run, process commands
and perform DMA transfers. Whenever a command finishes its DMA transfer, it checks
the DECREMENT_SEMAPHORE bit. If set, it decrements the counting semaphore. If
the semaphore goes to 0 as a result, then the channel enters the idle state and remains
there until the semaphore is incremented by the software. When the semaphore goes to
non-zero and the channel is in its idle state, then it uses the value in the
APBH_CHn_NXTCMDAR register (next command address register) to fetch a pointer to
the next command to process.
NOTE
This is a double indirect case. This method allows the software
to append to a running command list under the protection of the
counting semaphore.
To start processing the first time, software creates the command list to be processed. It
writes the address of the first command into the APBH_CHn_NXTCMDAR register, and
then writes 1 to the counting semaphore in APBH_CHn_SEMA. The DMA channel loads
APBH_CHn_CURCMDAR register and then enters the normal state machine processing
for the next command. When the software writes a value to the counting semaphore, it is
added to the semaphore count by hardware, protecting the case where both hardware and
software are trying to change the semaphore on the same clock edge.
Software can examine the value of APBH_CHn_CURCMDAR at any time to determine
the location of the command structure currently being processed.
16-Byte
Spare 1 PIO, chaining, DMA read
Area NEXTCMD_ADDR
512 1 0 0 1 10
BUFFER ADDRESS
NAND0=write mode
No PIO,IRQ,
no chaining,
DMA read
512-Byte
NEXTCMD_ADDR=0
Data
Block 16 0 0 1 0 10
BUFFER ADDRESS
16-Byte
Spare
Area
Figure 14-3. AHB-to-APBH Bridge DMA NAND Read Status Polling with DMA Sense
Command
The example in the above figure shows the workload continuing immediately to the next
NAND page transfer. However, one could perform a second sense operation to see if an
error has occurred after the write. One could then point the sense command alternate
branch at a NO_DMA_XFER command with the interrupt bit set. If the CHAIN bit is not
set on this failure branch, then the Arm platform is interrupted immediately, and the
channel process is also immediately terminated in the presence of a workload-detected
NAND error bit.
Note that each word of the three-word DMA command structure corresponds to a PIO
register of the DMA that is accessible on the APBH bus. Normally, the DMA copies the
next command structure onto these registers for processing at the start of each command
by following the value of the pointer previously loaded into the NEXTCMD_ADDR
register.
To start DMA processing for the first command, initialize the PIO registers of the desired
channel, as follows:
• First, load the next command address register with a pointer to the first command to
be loaded.
• Then, write 1 to the counting semaphore register. This causes the DMA to schedule
the targeted channel for the DMA command structure load, just as if it had finished
its previous command.
R
CLKGATE
SFTRST
EN
Reserved
W
Reset 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLKGATE_CHANNEL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x0001 NAND0 —
0x0002 NAND1 —
0x0004 NAND2 —
0x0008 NAND3 —
0x0010 NAND4 —
0x0020 NAND5 —
0x0040 NAND6 —
0x0080 NAND7 —
0x0100 SSP —
CH9_CMDCMPLT_
CH8_CMDCMPLT_
CH7_CMDCMPLT_
CH6_CMDCMPLT_
CH5_CMDCMPLT_
CH4_CMDCMPLT_
CH3_CMDCMPLT_
CH2_CMDCMPLT_
CH1_CMDCMPLT_
CH0_CMDCMPLT_
CMDCMPLT_IRQ_
CMDCMPLT_IRQ_
CMDCMPLT_IRQ_
CMDCMPLT_IRQ_
CMDCMPLT_IRQ_
CMDCMPLT_IRQ_
R
IRQ_EN
IRQ_EN
IRQ_EN
IRQ_EN
IRQ_EN
IRQ_EN
IRQ_EN
IRQ_EN
IRQ_EN
IRQ_EN
CH15_
CH14_
CH13_
CH12_
CH11_
CH10_
EN
EN
EN
EN
EN
EN
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH9_CMDCMPLT_
CH8_CMDCMPLT_
CH7_CMDCMPLT_
CH6_CMDCMPLT_
CH5_CMDCMPLT_
CH4_CMDCMPLT_
CH3_CMDCMPLT_
CH2_CMDCMPLT_
CH1_CMDCMPLT_
CH0_CMDCMPLT_
CMDCMPLT_IRQ
CMDCMPLT_IRQ
CMDCMPLT_IRQ
CMDCMPLT_IRQ
CMDCMPLT_IRQ
CMDCMPLT_IRQ
R
CH15_
CH14_
CH13_
CH12_
CH11_
CH10_
IRQ
IRQ
IRQ
IRQ
IRQ
IRQ
IRQ
IRQ
IRQ
IRQ
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
CH15_ERROR_STATUS
CH14_ERROR_STATUS
CH13_ERROR_STATUS
CH12_ERROR_STATUS
CH11_ERROR_STATUS
CH10_ERROR_STATUS
CH9_ERROR_STATUS
CH8_ERROR_STATUS
CH7_ERROR_STATUS
CH6_ERROR_STATUS
CH5_ERROR_STATUS
CH4_ERROR_STATUS
CH3_ERROR_STATUS
CH2_ERROR_STATUS
CH1_ERROR_STATUS
CH0_ERROR_STATUS
R
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
CH15_ERROR_IRQ
CH14_ERROR_IRQ
CH13_ERROR_IRQ
CH12_ERROR_IRQ
CH11_ERROR_IRQ
CH10_ERROR_IRQ
CH9_ERROR_IRQ
CH8_ERROR_IRQ
CH7_ERROR_IRQ
CH6_ERROR_IRQ
CH5_ERROR_IRQ
CH4_ERROR_IRQ
CH3_ERROR_IRQ
CH2_ERROR_IRQ
CH1_ERROR_IRQ
CH0_ERROR_IRQ
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
30 Error status bit for APBH DMA Channel 14. Valid when corresponding Error IRQ is set.
CH14_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
29 Error status bit for APBH DMA Channel 13. Valid when corresponding Error IRQ is set.
CH13_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
28 Error status bit for APBH DMA Channel 12. Valid when corresponding Error IRQ is set.
CH12_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
27 Error status bit for APBH DMA Channel 11. Valid when corresponding Error IRQ is set.
CH11_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
26 Error status bit for APBH DMA Channel 10. Valid when corresponding Error IRQ is set.
CH10_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
25 Error status bit for APBH DMA Channel 9. Valid when corresponding Error IRQ is set.
CH9_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
24 Error status bit for APBH DMA Channel 8. Valid when corresponding Error IRQ is set.
CH8_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
Table continues on the next page...
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
22 Error status bit for APBX DMA Channel 6. Valid when corresponding Error IRQ is set.
CH6_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
21 Error status bit for APBX DMA Channel 5. Valid when corresponding Error IRQ is set.
CH5_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
20 Error status bit for APBX DMA Channel 4. Valid when corresponding Error IRQ is set.
CH4_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
19 Error status bit for APBX DMA Channel 3. Valid when corresponding Error IRQ is set.
CH3_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
18 Error status bit for APBX DMA Channel 2. Valid when corresponding Error IRQ is set.
CH2_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
17 Error status bit for APBX DMA Channel 1. Valid when corresponding Error IRQ is set.
CH1_ERROR_
1 - AHB bus error
STATUS
0 - channel early termination.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
0x0 TERMINATION — An early termination from the device causes error IRQ.
0x1 BUS_ERROR — An AHB bus error causes error IRQ.
15 Error interrupt status bit for APBH DMA Channel 15. This sticky bit is set by DMA hardware and reset by
CH15_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
14 Error interrupt status bit for APBH DMA Channel 14. This sticky bit is set by DMA hardware and reset by
CH14_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
13 Error interrupt status bit for APBH DMA Channel 13. This sticky bit is set by DMA hardware and reset by
CH13_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
12 Error interrupt status bit for APBH DMA Channel 12. This sticky bit is set by DMA hardware and reset by
CH12_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
11 Error interrupt status bit for APBH DMA Channel 11. This sticky bit is set by DMA hardware and reset by
CH11_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
10 Error interrupt status bit for APBH DMA Channel 10. This sticky bit is set by DMA hardware and reset by
CH10_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
9 Error interrupt status bit for APBH DMA Channel 9. This sticky bit is set by DMA hardware and reset by
CH9_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
8 Error interrupt status bit for APBH DMA Channel 8. This sticky bit is set by DMA hardware and reset by
CH8_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
7 Error interrupt status bit for APBX DMA Channel 7. This sticky bit is set by DMA hardware and reset by
CH7_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
6 Error interrupt status bit for APBX DMA Channel 6. This sticky bit is set by DMA hardware and reset by
CH6_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
5 Error interrupt status bit for APBX DMA Channel 5. This sticky bit is set by DMA hardware and reset by
CH5_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
4 Error interrupt status bit for APBX DMA Channel 4. This sticky bit is set by DMA hardware and reset by
CH4_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
3 Error interrupt status bit for APBX DMA Channel 3. This sticky bit is set by DMA hardware and reset by
CH3_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
2 Error interrupt status bit for APBX DMA Channel 2. This sticky bit is set by DMA hardware and reset by
CH2_ERROR_ software. It is ORed with the corresponding cmdcmplt irq to generate an irq to Arm.
IRQ
The APBH CHANNEL CTRL provides reset/freeze control of each DMA channel. This
register contains individual channel reset/freeze bits.
Address: 11_0000h base + 30h offset + (4d × i), where i=0d to 3d
Bit 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
R
W
RESET_CHANNEL FREEZE_CHANNEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x0001 NAND0 —
0x0002 NAND1 —
0x0004 NAND2 —
0x0008 NAND3 —
0x0010 NAND4 —
0x0020 NAND5 —
0x0040 NAND6 —
Table continues on the next page...
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
Reserved Reserved Reserved Reserved Reserved Reserved Reserved CH8
Reset 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
Reset 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPMI_ONE_
R
FIFO
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Address: 11_0000h base + 100h offset + (112d × i), where i=0d to 15d
Bit 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
R CMD_ADDR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Address: 11_0000h base + 110h offset + (112d × i), where i=0d to 15d
Bit 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
R
W
CMD_ADDR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EXAMPLE
apbh_chn_cmd_t dma_cmd;
dma_cmd.XFER_COUNT = 512; // transfer 512 bytes
dma_cmd.COMMAND = BV_APBH_CHn_CMD_COMMAND__DMA_WRITE; // transfer to system memory from
peripheral device
dma_cmd.CHAIN = 1; // chain an additional command
structure on to the list
dma_cmd.IRQONCMPLT = 1; // generate an interrupt on
completion of this command structure
Address: 11_0000h base + 120h offset + (112d × i), where i=0d to 15d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R XFER_COUNT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HALTONTERMINATE
NANDWAIT4READY
WAIT4ENDCMD
IRQONCMPLT
SEMAPHORE
NANDLOCK
CHAIN
R CMDWORDS COMMAND
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x0 NO_DMA_XFER — Perform any requested PIO word transfers but terminate command
before any DMA transfer.
0x1 DMA_WRITE — Perform any requested PIO word transfers and then perform a DMA transfer
from the peripheral for the specified number of bytes.
0x2 DMA_READ — Perform any requested PIO word transfers and then perform a DMA transfer
to the peripheral for the specified number of bytes.
0x3 DMA_SENSE — Perform any requested PIO word transfers and then perform a conditional
branch to the next chained device. Follow the NEXCMD_ADDR pointer if the perpheral sense
is true. Follow the BUFFER_ADDRESS as a chain pointer if the peripheral sense line is false.
This register holds a pointer to the data buffer in system memory. After the command
values have been read into the DMA controller and the device controlled by this channel,
then the DMA transfer will begin, to or from the buffer pointed to by this register.
EXAMPLE
apbh_chn_bar_t dma_data;
dma_data.ADDRESS = (reg32_t) pDataBuffer;
Address: 11_0000h base + 130h offset + (112d × i), where i=0d to 15d
Bit 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
R ADDRESS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Address: 11_0000h base + 140h offset + (112d × i), where i=0d to 15d
Bit 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
R PHORE
Reserved Reserved INCREMENT_SEMA
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Address: 11_0000h base + 150h offset + (112d × i), where i=0d to 15d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
NEXTCMDADDRVALID
WR_FIFO_EMPTY
RD_FIFO_EMPTY
WR_FIFO_FULL
RD_FIFO_FULL
READY
BURST
KICK
REQ
END
R
Reserved
Reserved
Reserved
Reset 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R STATEMACHINE
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x00 IDLE — This is the idle state of the DMA state machine.
0x01 REQ_CMD1 — State in which the DMA is waiting to receive the first word of a command.
0x02 REQ_CMD3 — State in which the DMA is waiting to receive the third word of a command.
0x03 REQ_CMD2 — State in which the DMA is waiting to receive the second word of a
command.
0x04 XFER_DECODE — The state machine processes the descriptor command field in this
state and branches accordingly.
0x05 REQ_WAIT — The state machine waits in this state for the PIO APB cycles to complete.
0x06 REQ_CMD4 — State in which the DMA is waiting to receive the fourth word of a
command, or waiting to receive the PIO words when PIO count is greater than 1.
0x07 PIO_REQ — This state determines whether another PIO cycle needs to occur before
starting DMA transfers.
0x08 READ_FLUSH — During a read transfers, the state machine enters this state waiting for
the last bytes to be pushed out on the APB.
0x09 READ_WAIT — When an AHB read request occurs, the state machine waits in this state
for the AHB transfer to complete.
0x0C WRITE — During DMA Write transfers, the state machine waits in this state until the AHB
master arbiter accepts the request from this channel.
0x0D READ_REQ — During DMA Read transfers, the state machine waits in this state until the
AHB master arbiter accepts the request from this channel.
Table continues on the next page...
Bit 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
R APB_BYTES AHB_BYTES
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
if (APBH_VERSION.B.MAJOR != 3)
Error();
Bit 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 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15.1 Overview
The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal
associated with an input clock into a signal associated with a different output clock.
The ASRC supports concurrent sample rate conversion of up to 10 channels of about
-120dB THD+N. The ASRC supports up to three sampling rate pairs.
The incoming audio data to this chip may be received from various sources at different
sampling rates. The outgoing audio data of this chip may have different sampling rates
and it can also be associated with output clocks that are asynchronous to the input clocks.
The ASRC is implemented as a co-processor in hardware, with minimal ARM Platform
intervention required.
The following figure is a system view of the connection between the ASRC block and
other blocks.
MLB
SPDIF
Peripheral Bus
SPDIF Tx clock
asrck_c SPDIF Rx clock
asrck_4
ASRC
MLB Bit Clock
asrck_5
SSI3
SSI2
SSI1
ESAI
Clock Src
clocks
Selector &
Divider
DMA task queue task queue
DSL
reqs. gen. FIFO
Interrupt
reqs
PCU ALU
REG_IF
FP Peripherals
AGU
MEM_IF
FIFO CTRL
Peripheral BUS
FP
15.1.1 Features
Table 15-1. ASRC Specifications
Parameters Test Conditions Minimum Typical Maximum Unit
Channels Supported 0 1 n (0-10) 10
Pairs of Rate Conversion 1 - 3
THD+N 120 MHz < FsASRC2 -120 dB
<160 MHz
Dynamic Range 144 dB
Settling Time 40 ms
Comment:
1. When a pair has zero channels, the pair will be disabled, although the pair enable bit may be set in ASRCTR register.
2. FsASRC is the processing clock of ASRC block.
Other Features:
• Any number (0-10) of contiguous channels can be associated to one of the sampling
rate pairs.
• Support user-programmable threshold for the input/output FIFOs.
• Support flexible 8/16/24-bit width of input data, and 16/24-bit width of output data.
• Designed for rate conversion between 44.1 kHz, 32 kHz, 48 kHz, 96 kHz, and 192
kHz. The useful signal bandwidth is below 24 kHz.
• Other input sampling rates in the range of 8 kHz to 200 kHz is also supported, but
possibly with less desirable bandwidth.
• Other output sampling rates in the range of 30 kHz to 200 kHz is also supported, but
possibly with less desirable bandwidth.
• Automatic accommodation to slow variations in the incoming and outgoing sampling
rates.
• Linear phase
• Tolerant to sample clock jitter
Clock/Data Connections
• The sampling rate clocks are directly connected to the ASRC block, the ratio
estimation of the input clocks with output clocks are done in ASRC hardware when
both input/output sampling clocks are physically available.
• When both the input sampling clock and the output sampling clock are physically
available, the rate conversion can work by configuring the physical clocks.
• When the input sampling clock is not physically available, the rate conversion can
still work by setting ideal-ratio values into ASRC interface registers.
• The clock signals come from the following blocks:
• ESAI, receiving bit clock and transmitting bit clock
• SSI1, receiving bit clock and transmitting bit clock
• SSI2, receiving bit clock and transmitting bit clock
• SPDIF, receiving bit clock and transmitting bit clock
• other audio peripherals etc.
• MLB bit clock
• The exchange of audio data is done by the processor accessing ASRC block through
registers defined on shared peripheral bus.
See ASRC Memory Map/Register Definition for a definition of the registers and
parameters used in ASRC.
The ASRC input FIFOs can also be serviced by interrupts. To enable interrupts, the
corresponding data-input interrupt enable bits (ASRIER_ADIEx, where x=A, B, or C)
should be set. An interrupt is automatically generated any time the input FIFO level is
below the threshold. The interrupt is cleared when enough data is written to the FIFO to
raise the level above the threshold.
Mode 3 (DMA Mode)
The ASRC input FIFOs can also be filled using DMA. In this mode, the data-input
interrupt-enable bits (ASRIER_ADIEx, where x=A, B, or C) should be cleared and the
DMA controller should be configured to use the ASRC as a request source.
The ASRC output FIFOs may also be serviced using interrupts. To enable this mode, the
corresponding output-data interrupt-enable bits (ASRIER_ADOEx, where x=A, B, or C)
should be set. Any time the output FIFO level exceeds the threshold, an interrupt is
automatically generated. The interrupt is cleared when enough data is read from the FIFO
to lower the level below the threshold.
Mode 3 (DMA Mode)
The ASRC output FIFOs can also be read using DMA. In this mode, the output-data
interrupt-enable bits (ASRIER_ADOEx, where x=A, B, or C) should be cleared and the
DMA controller should be configured to use the ASRC as a request source.
15.2 Clocks
The table found here describes the clock sources for ASRC.
Please see clock control block for clock setting, configuration and gating information.
Table 15-4. ASRC Clocks
Clock name Clock Root Description
asrck_clock_d spdif1_clk_root ASRC module clock (SPDIF clock)
ipg_clk ahb_clk_root Peripheral clock
mem_clk ahb_clk_root Peripheral access clock
15.3 Interrupts
ASRC has several interrupts events.
General
(1)
x2
UpSampling Fs
Low-Pass Polyphase ppout
Pre-Filter Filter
11 taps
(2)
Pre-Decimation Filter
Fs
in (2)
Fs
out
The figure above shows the possible configurations of the ASRC. Each configuration
consists of 2 to 4 stages.
• x2 up-sampling rate expander (zero insertion only) (input branch 1), direct
connection (input branch 2), or low-pass pre decimation filter (consisting of a low-
pass half-band FIR filter with x0.5 downsampling rate decimator) (input branch 3),
• low-pass pre-filter, the low-pass bandwidth is at most 0.25 x Fs, where Fs is the
sampling rate of the input signal to this low-pass pre-filter,
• polyphase filter,
• x2 post upsampling filter (consisting of a x2 up-sampling rate expander (zero
insertion only) with low-pass half-band FIR filter) (output branch 1), direct
connection (output branch 2), or low-pass post decimation filter (consisting of a low-
pass half-band FIR filter with x0.5 downsampling rate decimator) (output branch 3).
By flowing through different processing branches and different setups of the pre-filter,
this ASRC scheme can be used to handle different rate conversion requirements.
• Configuration (a): Input Branch 1+Output Branch 1:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/2.
The signal sampling rate of the polyphase filter output is Fsppout = Fsout/2.
• Configuration (b): Input Branch 1+Output Branch 2:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/2.
The signal sampling rate of the polyphase filter output is Fsppout = Fsout.
• Configuration (c): Input Branch 1+Output Branch 3:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/2.
The signal sampling rate of the polyphase filter output is Fsppout = 2Fsout.
• Configuration (d): Input Branch 2+Output Branch 1:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/4.
The signal sampling rate of the polyphase filter output is Fsppout = Fsout/2.
• Configuration (e): Input Branch 2+Output Branch 2:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/4.
The signal sampling rate of the polyphase filter output is Fsppout = Fsout.
• Configuration (f): Input Branch 2+Output Branch 3:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/4.
The signal sampling rate of the polyphase filter output is Fsppout = 2Fsout.
• Configuration (g): Input Branch 3+Output Branch 1:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/8.
The signal sampling rate of the polyphase filter output is Fsppout = Fsout/2.
• Configuration (h): Input Branch 3+Output Branch 2:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/8.
The signal sampling rate of the polyphase filter output is Fsppout = Fsout.
• Configuration (i): Input Branch 3+Output Branch 3:
The signal bandwidth observed before the polyphase filter is at most BWin = Fsin/8.
The signal sampling rate of the polyphase filter output is Fsppout = 2Fsout.
Post_Proc:
• 0 --- Post-processing Branch 1 as shown in Figure 15-3
• 1 --- Post-processing Branch 2 as shown in Figure 15-3
• 2 --- Post-processing Branch 3 as shown in Figure 15-3
SS 1 Rx clock
ASRCK1 MUX
SS 1 Tx clock
Input Clock Input
SS 2 Tx clock Divider C Prescaler C Input clock C
SPDIF Tx clock
AICDC0 - AICDC2 AICPC0 - AICPC2
AICSA0 - AICSA3
AICSB0 - AICSB3
AICSC0 - AICSC3
SS 1 Tx clock
SPDIF Tx clock
Input Clock Output
Divider B Prescaler B
MLB Bit clock Output clock B
SS 1 Rx clock
Input Clock Output
SS 2 Rx clock Divider C Prescaler C Output clock C
SPDIF Rx clock
AOCDC0 - AOCDC2 AOCPC0 - AOCPC2
AOCSA0 - AOCSA3
AOCSB0 - AOCSB3
AOCSC0 - AOCSC3
Software can set the ASRC Clock Source Register (ASRCSR) and the Clock Divider
Register to select the desired clock source and divide it to the needed sample rate clock
for use by the ASRC. The clocks have the following restriction. If the prescaler is set to
1, the clock divider can only be set to 1 and the clock source must have a 50% duty cycle.
#include "stdio.h"
#include "soc_api.h"
int incnt=0;
int outcnt=0;
#include "wy_ideal_ratio_dataini_part.h"
WORD IdealRatio_High=0x04; //
WORD IdealRatio_Low=0x0; //
{ // Disable ASRC
reg32_write(ASRC_ASRCTR,0x0);
reg32_write(ASRC_ASRCTR,ASRCTR_VAL);
reg32_write(ASRC_ASRIER,ASRIER_VAL);
reg32_write(ASRC_ASRIEM,0x0);
reg32_write(ASRC_ASRCNCR,ASRCNCR_VAL);
reg32_write(ASRC_ASRCFG,ASRCFG_VAL);
reg32_write(ASRC_ASRCDR1,ASRCDR1_VAL);
reg32_write(ASRC_ASRCDR2,ASRCDR2_VAL);
reg32_write(ASRC_ASRCSR, ASRCSR_VAL);
reg32_write(ASRC_ASRPM1, 0x7fffff);
reg32_write(ASRC_ASRPM2, 0x255555);
reg32_write(ASRC_ASRPM3, 0xff7280);
reg32_write(ASRC_ASRPM4, 0xff7280);
reg32_write(ASRC_ASRPM5, 0xff7280);
reg32_write(ASRC_ASRMCRA,0x001f00);
reg32_write(ASRC_ASRMCRB,0x001f00);
reg32_write(ASRC_ASRMCRC,0x001f00);
void sim_ideal_ratio()
WORD tmp32bit;
#define ASR_HFA_HFB 0
reg32_write(CCM_CSCDR2, ASRC_CLK_PRED_DIV8|ECSPI_CLK_PRED_DFLT|ECSPI_CLK_PODF_DFLT|
ASRC_CLK_PODF_DIV25|IEEE_CLK_PRED_DFLT|IEEE_CLK_PODF_DFLT);
reg32_write(ASRC_ASRCTR, 0x0);
tmp32bit = reg32_read(CCM_CBCDR);
0x0 , // ASRCDR2_VAL,
0x00d00d // ASRCSR_VAL, AOCSA=d: bit clock d: ASRCK1 clk from CCM; AICSA=d:
bit clock d: ASRCK1 clock from CCM;
);
#define INFIFO_THRESH_1 32
//CAPTURE_INTERRUPT(ASRC_INT_ROUTINE, asrc_handler);
//enable_hdler(ASRC_INT_NUM);
disable_hdler(ASRC_INT_NUM);
incnt=0;
outcnt=0;
// Polling
int ii;
for (ii=0;ii<2;ii++)</codeblock
incnt=(incnt+1)%128;
WORD TempRdOut;
outcnt=outcnt+1;
All useful registers are listed in the memory map below. The access of undefined
registers will behave as normal registers.
All the interface registers are LSB aligned except the input FIFOs and the output FIFOs,
and each register has only 24 effective bits.
The input FIFO and output FIFO word alignment can be defined using
ASRMCR1{A,B,C} registers in 32-bit interface system.
ASRC memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
203_4000 ASRC Control Register (ASRC_ASRCTR) 32 R/W 0000_0000h 15.7.1/476
203_4004 ASRC Interrupt Enable Register (ASRC_ASRIER) 32 R/W 0000_0000h 15.7.2/479
ASRC Channel Number Configuration Register
203_400C 32 R/W 0000_0000h 15.7.3/480
(ASRC_ASRCNCR)
Table continues on the next page...
The ASRC control register (ASRCTR) is a read/write register that controls the ASRC
operations.
Address: 203_4000h base + 0h offset = 203_4000h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Reserved
Reserved
USRC
ATSC
ATSA
Reserved ATSB IDRC USRB
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ASRCEN
ASREC
ASREB
ASREA
USRA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Reserved Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AFPWE
ADOEC
ADOEB
ADOEA
ADIEC
ADIEB
ADIEA
AOLIE
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 interrupt enabled
0 interrupt disabled
6 Overload Interrupt Enable
AOLIE
Enables the overload interrupt.
1 interrupt enabled
0 interrupt disabled
5 Data Output C Interrupt Enable
ADOEC
Enables the data output C interrupt.
1 interrupt enabled
0 interrupt disabled
4 Data Output B Interrupt Enable
ADOEB
Enables the data output B interrupt.
1 interrupt enabled
0 interrupt disabled
1 interrupt enabled
0 interrupt disabled
2 Data Input C Interrupt Enable
ADIEC
Enables the data input C interrupt.
1 interrupt enabled
0 interrupt disabled
1 Data Input B Interrupt Enable
ADIEB
Enables the data input B interrupt.
1 interrupt enabled
0 interrupt disabled
0 Data Input A Interrupt Enable
ADIEA
Enables the data input A Interrupt.
1 interrupt enabled
0 interrupt disabled
Bit 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
R
W
Reserved Reserved ANCC ANCB ANCA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1. ANCC+ANCB+ANCA<=10. Hardware is not checking the constraint. Programmer should take the responsibility to ensure
the constraint is satisfied.
The ASRC configuration status register (ASRCFG) is a read/write register that sets
and/or automatically senses the ASRC operations.
Address: 203_4000h base + 10h offset = 203_4010h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
INIRQC
INIRQB
INIRQA
R
NDPRC
NDPRB
NDPRA
Reserved POSTMODC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
Reserved AOCSC AOCSB AOCSA AICSC AICSB AICSA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ASRC clock divider register (ASRCDR1) is a read/write register that controls the
division factors of the ASRC input and output clock sources.
Address: 203_4000h base + 18h offset = 203_4018h
Bit 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
R
W
Reserved AOCDB AOCPB AOCDA AOCPA AICDB AICPB AICDA AICPA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ASRC clock divider register (ASRCDR2) is a read/write register that controls the
division factors of the ASRC input and output clock sources.
Address: 203_4000h base + 1Ch offset = 203_401Ch
Bit 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
R
W
Reserved Reserved AOCDC AOCPC AICDC AICPC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ASRC status register (ASRSTR) is a read/write register used by the processor core to
examine the status of the ASRC block and clear the overload interrupt request and AOLE
flag bit. Read the status register will return the current state of ASRC.
Address: 203_4000h base + 20h offset = 203_4020h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DSLCNT
AOOLC
AOOLB
AOOLA
ATQOL
AIOLC
R
Reserved Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AODOC
AODOB
AODOA
AODFC
AODFB
AODFA
AIDUC
AIDUB
AIDUA
AIDEC
AIDEB
AIDEA
AIOLB
AIOLA
FPWT
AOLE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The register defines and shows the parameters for ASRC inner task queue FIFOs.
Address: 203_4000h base + 54h offset = 203_4054h
Bit 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
R TF_FILL
Reserved Reserved TF_BASE Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ASRC channel counter register (ASRCCR) is a read/write register that sets and
reflects the current specific input/output FIFO being accessed through shared peripheral
bus for each ASRC conversion pair.
Address: 203_4000h base + 5Ch offset = 203_405Ch
Bit 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
R
W
Reserved ACOC ACOB ACOA ACIC ACIB ACIA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
These registers are the interface registers for the audio data input of pair A,B,C
respectively. They are backed by FIFOs.
Address: 203_4000h base + 60h offset + (8d × i), where i=0d to 2d
Bit 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
R
Reserved
W DATA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
These registers are the interface registers for the audio data output of pair A,B,C
respectively. They are backed by FIFOs.
Address: 203_4000h base + 64h offset + (8d × i), where i=0d to 2d
Bit 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
R DATA
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ideal ratio registers (ASRIDRHA, ASRIDRLA) hold the ratio value IDRATIOA.
IDRATIOA = FsinA/FsoutA = TsoutA/TsinA is a 32-bit fixed point value with 26 fractional
bits. This value is only useful when ASRCTR:{USRA, IDRA}=2'b11.
Address: 203_4000h base + 80h offset = 203_4080h
Bit 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
R
W
Reserved Reserved IDRATIOA_H
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ideal ratio registers (ASRIDRHA, ASRIDRLA) hold the ratio value IDRATIOA.
IDRATIOA = FsinA/FsoutA = TsoutA/TsinA is a 32-bit fixed point value with 26 fractional
bits. This value is only useful when ASRCTR:{USRA, IDRA}=2'b11.
Address: 203_4000h base + 84h offset = 203_4084h
Bit 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
R
W
Reserved IDRATIOA_L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ideal ratio registers (ASRIDRHB, ASRIDRLB) hold the ratio value IDRATIOB.
IDRATIOB = FsinB/FsoutB = TsoutB/TsinB is a 32-bit fixed point value with 26 fractional
bits. This value is only useful when ASRCTR:{USRB, IDRB}=2'b11.
Address: 203_4000h base + 88h offset = 203_4088h
Bit 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
R
W
Reserved Reserved IDRATIOB_H
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ideal ratio registers (ASRIDRHB, ASRIDRLB) hold the ratio value IDRATIOB.
IDRATIOB = FsinB/FsoutB = TsoutB/TsinB is a 32-bit fixed point value with 26 fractional
bits. This value is only useful when ASRCTR:{USRB, IDRB}=2'b11.
Address: 203_4000h base + 8Ch offset = 203_408Ch
Bit 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
R
W
Reserved IDRATIOB_L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ideal ratio registers (ASRIDRHC, ASRIDRLC) hold the ratio value IDRATIOC.
IDRATIOC = FsinC/FsoutC = TsoutC/TsinC is a 32-bit fixed point value with 26 fractional
bits. This value is only useful when ASRCTR:{USRC, IDRC}=2'b11.
Address: 203_4000h base + 90h offset = 203_4090h
Bit 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
R
W
Reserved Reserved IDRATIOC_H
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The ideal ratio registers (ASRIDRHC, ASRIDRLC) hold the ratio value IDRATIOC.
IDRATIOC = FsinC/FsoutC = TsoutC/TsinC is a 32-bit fixed point value with 26 fractional
bits. This value is only useful when ASRCTR:{USRC, IDRC}=2'b11.
Address: 203_4000h base + 94h offset = 203_4094h
Bit 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
R
W
Reserved IDRATIOC_L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The register (ASR76K) holds the period of the 76 kHz sampling clock in terms of the
ASRC processing clock with frequency FsASRC. ASR76K = FsASRC/Fs76k. Reset value is
0x0A47 which assumes that FsASRC=200 MHz. This register is used to help the ASRC
internal logic to decide the pre-processing and the post-processing options automatically
(see ASRC Misc Control Register 1 for Pair C and ASRC Misc Control Register 1 for
Pair C). In a system when FsASRC = 133 MHz, the value should be assigned explicitly as
0x06D6 in user application code.
Address: 203_4000h base + 98h offset = 203_4098h
Bit 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
R
W
Reserved Reserved ASR76K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 1 1
The register (ASR56K) holds the period of the 56 kHz sampling clock in terms of the
ASRC processing clock with frequency FsASRC. ASR56K = FsASRC/Fs56k. Reset value is
0x0DF3 which assumes that FsASRC = 200 MHz. This register is used to help the ASRC
internal logic to decide the pre-processing and the post-processing options automatically
(see ASRC Misc Control Register 1 for Pair C and ASRC Misc Control Register 1 for
Pair C). In a system when FsASRC = 133 MHz, the value should be assigned explicitly as
0x0947 in user application code.
Address: 203_4000h base + 9Ch offset = 203_409Ch
Bit 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
R
W
Reserved Reserved ASR56K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BYPASSPOLY
EXTTHRSHA
BUFSTALLA
ZEROBUFA
R
OUTFIFO_
Reserved Reserved THRESHOL
A
W
DA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
RSYNOFA
RSYNIFA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
OAFA
R OUTFIFO_FILLA
Reserved Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IAEA
R OUTFIFO_FILLA INFIFO_FILLA
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BYPASSPOLY
EXTTHRSHB
BUFSTALLB
ZEROBUFB
R
OUTFIFO_
Reserved Reserved THRESHOL
B
W
DB
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
RSYNOFB
RSYNIFB
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
OAFB
R OUTFIFO_FILLB
Reserved Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IAEB
R OUTFIFO_FILLB INFIFO_FILLB
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BYPASSPOLY
EXTTHRSHC
BUFSTALLC
ZEROBUFC
R
OUTFIFO_
Reserved Reserved THRESHOL
C
W
DC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
RSYNOFC
RSYNIFC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
OAFC
R OUTFIFO_FILLC
Reserved Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IAEC
R OUTFIFO_FILLC INFIFO_FILLC
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Reserved Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OMSB
OSGN
OW16
Reserved IWD IMSB Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 MSB aligned.
0 LSB aligned.
7–3 This field is reserved.
- Reserved. Should be written as zero for future compatibility.
2 Data Alignment of the output FIFO
OMSB
This bit will determine the data alignment of the output FIFO.
1 MSB aligned.
0 LSB aligned.
1 Sign Extension Option of the output FIFO
OSGN
This bit will determine the sign extension option of the output FIFO.
1 Sign extension.
0 No sign extension.
0 Bit Width Option of the output FIFO
OW16
This bit will determine the bit width option of the output FIFO.
16.1 Overview
The Digital Audio Multiplexer (AUDMUX) provides a programmable interconnect
device for voice, audio, and synchronous data routing between Synchronous Serial
Interface Controller (SSI) and audio/voice codec’s (also known as coder-decoders)
peripheral serial interfaces.
This section includes a top level diagram that shows the functional organization of the
block, including all off-chip signals.
AUDMUX allows the users to reconfigure the audio system signal routing through
programming, as opposed to altering the PCB design. The full description of the block is
in Functional Description.
Figure 16-1 shows the block diagram.
AUD6_TFS, AUD6_TXC
AUD6_TFS
AUD6_TXC
AUD6_RFS, AUD6_RXC
AUD1_TFS, AUD1_TXC
AUD6_RFS
AUD1_TFS Port 6
AUD6_RXC
AUD1_TXC
AUD1_RFS, AUD1_RXC Da6
AUD1_RFS Db6
Port 1 AUD1_RXC
AUD5_TFS, AUD5_TXC
Da1 AUD5_TFS
Db1 AUD5_TXC
AUD5_RFS, AUD5_RXC
AUD5_RFS
AUD2_TFS, AUD2_TXC AUD5_RXC Port 5
AUD2_TFS
Da5
AUD2_TXC
Db5
AUD2_RFS, AUD2_RXC
AUD2_RFS AUD4_TFS, AUD4_TXC
Port 2 AUD2_RXC AUD4_TFS
AUD4_TXC
Da2 AUD4_RFS, AUD4_RXC
Db2
AUD4_RFS
AUD4_RXC Port 4
Da4
AUD7_TFS, AUD7_TXC Db4
AUD7_TFS
AUD3_TFS, AUD3_TXC
AUD7_TXC
AUD3_TFS
AUD7_RFS, AUD7_RXC
AUD3_TXC
AUD7_RFS
AUD3_RFS, AUD3_RXC
Port 7 AUD7_RXC
AUD3_RFS
Da7 AUD3_RXC Port 3
Db7
Da3
Db3
16.1.1 Features
Key features of the block include:
• Three internal ports
• Four external ports
• Full 6-wire SSI interfaces for asynchronous receive and transmit
• Configurable 4-wire (synchronous) or 6-wire (asynchronous) peripheral interfaces
• Independent Tx/Rx Frame sync and clock direction selection for host or peripheral
• Each host interface's capability to connect to any other host or peripheral interface in
a point-to-point or point-to-multipoint (network mode)
16.3 Clocks
This section provides information about AUDMUX clocking including clock inputs and
the clock diagram.
The following table describes the clock source for AUDMUX. Please see Clock
Controller Module (CCM) for clock setting, configuration and gating information.
Table 16-2. AUDMUX Clocks
Clock name Clock Root Description
ipg_clk_s ipg_clk_root Peripheral access clock
AIPS AUDMUX
ips_module_en_audmux
LPG
Low Power Gate
CRM
IP Interface
Clock Registers
Peripheral clock
Gating
Cell
Peripheral clock
• SSI (hard wired to internal port) transmits data to a voice codec and a BT (Blue
tooth) codec (both on external Port 4Port 5) and the Bottom Connector (on external
Port 5Port 6) simultaneously using network mode. SSI is configured as the master.
• An external processor (external port - Port 4Port 3) drives a voice codec and a BT
codec (both on external Port 5Port 4) and the Bottom Connector (on Port 6Port 5)
simultaneously using network mode. The external processor is the master.
INMMASK[7:0]
1
AUDMUX boundary
Signal selection for
internal network mode
1
RxD
(Port x)
0
TxD1_in
TxD2_in
MODE
TxD3_in
TxD4_in
TxD5_in
TxD6_in
TxD7_in
RXDSEL[2:0]
AUDMUX
Port 3 Device
Port 1
Port 4
KEY
SSI_n Port 2
Internal
Port x Network Mode
Port 5 Enabled
Port 6
Port x Inactive
See Figure 16-5 for the timing diagram of Example 1. The clock and frame sync signals
show the bit and frame timing for the serial bus. The vertical dashed lines divide the
frame into four timeslots.
The data lines for SSI_m and SSI_n (as well as their output enables) are shown. Note that
the on-chip interfaces drive a logic '1' when their output enables are logic '0'. The
combined TXD line, which is the logical AND of the individual TXD lines, is used for
Port 3's TXD line.
FS
SSI_m OE
SSI_n OE
Combined TxD T0 (SSI_m LEFT) T1 (SSI_m RIGHT) T2 (SSI_n LEFT) T3 (SSI_n RIGHT)
(Port 3 RxD)
Pull-up Resistor On
AUDMUX TxDATA Required
Port 3 Device
Port 4 Device
KEY
Port 2
Internal
Port x Network Mode
Port 5 Device Enabled
Port 7 Active
Port x
Port 6
Port x Inactive
The resistance value of the pull-up resistors must be sufficiently high such that a value of
'0' can be pulled up to logic '1' within half of a period of the bitclock. The required
resistance must be no larger than:
Rmax = 1 / (2 * fbc * C) where:
• fbc is the frequency of the bitclock
• C is the total system capacitance (ICs, board traces, and so on)
The following figure shows the timing diagram for this example. The clock and frame
sync signals show the bit and frame timing for the serial bus. The vertical dashed lines
divide the frame into four timeslots.
The data lines for the SSI, Port 3 and Port 4 are shown. Note that the SSI transmits a
logic '1' when its corresponding output enable is a logic '0'. The data lines from Port 3 and
Port 4 at the pad are pulled high by pull-up resistors when they are in the high-impedance
state. The data lines from Port 3 and Port 4 at the AUDMUX are pure digital signals and
are constantly driven. The combined TXD line, which is the logical AND of the SSI, Port
3 and Port 4's TXD lines, is used for Port 5's TXD line.
Note the highlighted areas in the Figure 16-7. This shows the transition time that occurs
while a TXD line is being pulled high. In this example, this transition time is a maximum
of 1/2 the period of the serial bitclock. This prevents corruption of the first data bit of the
next timeslot. It is critical that the pull-up resistance is sufficient for the given bitclock
frequency and system capacitance.
Note that hysteresis should be enabled at Port 3's RXD pad and Port 4's RXD pad to
prevent the digital signals created by the pad from toggling rapidly during the pull-up
period. The pads typically require a transition within 25ns unless hysteresis is enabled.
Instead of using hysteresis, one could select a pull-up resistor sufficiently high to pull-up
the signal at the pad within 25 ns; however, that would result in a higher resistance value
and higher current drain.
CLK
... ... ... ...
FS
SSI TxD T0 T1 T2 T3
SSI OE
1/2 Bit
1/2 Bit
Port 3 TxD T1 T3
(At AUDMUX)
1/2 Bit
Port 4 TxD T2
(At AUDMUX)
Combined TxD T0 T1 T2 T3
(Port 5 RxD)
Figure 16-7. Example Using External Ports for Transmit Data in Consecutive Timeslots
Pull-up Resistor On
AUDMUX TxDATA Required
Port 3 Device
SSI Port 1
Port 4
KEY
Port 2
Internal
Port x Network Mode
Port 5 Device Enabled
Port 6
Port x Inactive
The resistance value of the pull-up resistors must be sufficiently high such that a value of
'0' can be pulled up to logic '1' by the time that the next occupied timeslot occurs. This
allows a much weaker pull-up to be used as compared to Example 2. The required
resistance must be no larger than:
Rmax = (4 * n + 1) / (2* fbc * C) where:
• n is the number of bits per timeslot
• fbc is the frequency of the bitclock
• C is the total system capacitance (ICs, board traces, and so on)
The figure below shows the timing diagram for this example. The clock and frame sync
signals show the bit and frame timing for the serial bus. The vertical dashed lines divide
the frame into four timeslots.
The data lines for the SSI and Port 3 are shown. Note that the SSI transmits a logic '1'
when its corresponding output enable is a logic '0'. The data line from Port 3 at the pad is
pulled high by a pull-up resistor when they are in the high-impedance state. The data line
from Port 3 at the AUDMUX is a pure digital signal and is constantly driven. The
combined TXD line, which is the logical AND of the SSI and Port 3's TXD lines, is used
for Port 5's RXD line.
Note the highlighted area in the Figure 16-9. This shows the transition time that occurs
while Port 3's TXD line is being pulled high. In this example, this transition time is a
maximum of two timeslots plus 1/2 the period of the serial bitclock. This prevents
corruption of the first data bit of the next timeslot. It is critical that the pull-up resistance
is sufficient for the given bitclock frequency and system capacitance.
Note that hysteresis must be enabled at Port 3's RXD pad to prevent the digital signal
created by the pad from toggling rapidly during the extended pull-up period. The pads
typically require a transition within 25 ns unless hysteresis is enabled.
CLK
... ... ... ...
FS
SSI TxD T0 T1 T2 T3
SSI OE
1/2 Bit
Port 3 TxD T1
(At AUDMUX)
Combined TxD T0 T1
(Port 5 RxD)
Figure 16-9. Example Using External Ports For Transmit Data In Nonconsecutive
Timeslots
TXRXEN
Db_obe
RxD_obe
IOPAD
D_TxRx
Db_out
RxD_out
Db_in
Da_obe
IOPAD
D_RxTx
Da_out
Da_in
TxD_in
TX/RX SWITCH
As shown in the following figure, SSI signals interfaced to Port x signals are routed to
Port y. When SYN = 1 the 6-wire signal from SSI is reduced to 4-wire within the internal
logic.
TFS_in, RFS_in, TCLK_in, and RCLK_in are the input frame sync and bit clocks from
the serial interface (Port x) with their corresponding output buffer enable signals (_obe).
TFS_out, RFS_out, TCLK_out, and RCLK_out are the frame sync and bit clocks that are
transmitted to the serial interface from the other ports.
The TFS_out and TCLK_out are selected at Port x by the TFSEL and TCSEL mux
settings, respectively. RFS_out and RCLK_out are selected at Port x by the RFSEL and
RCSEL mux settings, respectively. Similarly, in the external direction, Port y is
configured as a 4-wire port; TFSEL selects the FS_obe and FS_out signals. In this mode,
the configuration of RFSEL and RCSEL is not used, since the RFS_out and RCLK_out
pins at Port y are not available.
RFS_out
RCSELx[3:0] TFSELy[3:0]
TCLK_obe
TCLK_in
CLK_obe
TCLK_out
TXC
CLK_out
RCLK_obe
CLK_in
RCLK_in IOPAD
RCLK_out
Figure 16-11. Frame Sync and Clock Routing When External Port Is 4-Wire
TFS_in, RFS_in, TCLK_in, and RCLK_in are input frame sync and bit clocks from the
serial interface (Port x) with their corresponding output buffer enable signals (_obe).
TFS_out, RFS_out, TCLK_out, and RCLK_out are the frame sync and bit clocks that are
transmitted to the serial interface from the other ports.
TFS_out and TCLK_out are selected by the TFSEL and TCSEL mux settings,
respectively. RFS_out and RCLK_out are selected by the RFSEL and RCSEL mux
settings, respectively. Similarly, in the external direction, the TFSEL selects the
TxFS_obe and TxFS_out signals and TCSEL selects the TxCLK_obe and TxClk_out
signals. The RFSEL selects the RxFS_obe and RxFS_out signals and RCSEL selects the
RxCLK_obe and RxCLK_out signals.
NOTE
Because FS_in and CLK_in from external interfaces are also
routed to the TFSEL and TCSEL muxes of the external ports,
these signals do not have corresponding buffer enable signals.
Consequently, their corresponding inputs to the TFSEL and
TCSEL mux of the external ports have to be tied high.
RFS_out
RFSELx[3:0] RFSELy[3:0]
TFS_obe
TFS_in
RFS_obe
TFS_out
RXFS
RFS_out
RFS_obe RFS_in
RFS_in IOPAD
RFS_out
RCLK_out
RCSELx[3:0] RCSELy[3:0]
TCLK_obe
TCLK_in
RCLK_obe
TCLK_out
RXC
RCLK_out
RCLK_obe RCLK_in
RCLK_in IOPAD
RCLK_out
To communicate with more than one port, internal network mode can be enabled at Port
x. In internal network mode, it is possible to communicate with any device attached to the
other ports. Internal network mode shall be enabled at the port that is the SSI network
mode master.
This section includes the block memory map and detailed descriptions of all registers. For
the base address of a specific sub-block instantiation, see the system memory map in this
manual.
The AUDMUX memory map is shown in the following table.
AUDMUX memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
21D_8000 Port Timing Control Register 1 (AUDMUX_PTCR1) 32 R/W AD40_0800h 16.6.1/539
21D_8004 Port Data Control Register 1 (AUDMUX_PDCR1) 32 R/W 0000_A000h 16.6.2/541
21D_8008 Port Timing Control Register 2 (AUDMUX_PTCR2) 32 R/W A500_0800h 16.6.3/542
21D_800C Port Data Control Register 2 (AUDMUX_PDCR2) 32 R/W 0000_8000h 16.6.4/544
21D_8010 Port Timing Control Register 3 (AUDMUX_PTCR3) 32 R/W 9CC0_0800h 16.6.5/545
21D_8014 Port Data Control Register 3 (AUDMUX_PDCR3) 32 R/W 0000_6000h 16.6.6/547
21D_8018 Port Timing Control Register 4 (AUDMUX_PTCR4) 32 R/W 0000_0800h 16.6.7/548
21D_801C Port Data Control Register 4 (AUDMUX_PDCR4) 32 R/W 0000_4000h 16.6.8/550
21D_8020 Port Timing Control Register 5 (AUDMUX_PTCR5) 32 R/W 0000_0800h 16.6.9/551
16.6.10/
21D_8024 Port Data Control Register 5 (AUDMUX_PDCR5) 32 R/W 0000_2000h
553
16.6.11/
21D_8028 Port Timing Control Register 6 (AUDMUX_PTCR6) 32 R/W 0000_0800h
554
16.6.12/
21D_802C Port Data Control Register 6 (AUDMUX_PDCR6) 32 R/W 0000_0000h
556
16.6.13/
21D_8030 Port Timing Control Register 7 (AUDMUX_PTCR7) 32 R/W 0000_0800h
557
Table continues on the next page...
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RCLKDIR
TCLKDIR
TFS_ RFS_
TFSEL[3:0] TCSEL[3:0] RFSEL[3:0]
DIR DIR
W
Reset 1 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RCSEL[3:0] SYN
W
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 TXFS is an input.
1 TXFS is an output.
30–27 Transmit Frame Sync Select. Selects the source port from which TXFS is sourced.
TFSEL[3:0]
0xxx Selects TXFS from port.
1xxx Selects RXFS from port.
x000 Port 1
x110 Port 7
x111 Reserved
26 Transmit Clock Direction Control. This bit sets the direction of the TXC pin of the interface as an output or
TCLKDIR input. When set as an input, the TCSEL settings are ignored. When set as an output, the TCSEL settings
determine the source port of the clock.
Table continues on the next page...
0 RXFS is an input.
1 RXFS is an output.
20–17 Receive Frame Sync Select. Selects the source port from which RXFS is sourced. RXFS can be sourced
RFSEL[3:0] from TXFS and RXFS from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 RXC is an input.
1 RXC is an output.
15–12 Receive Clock Select. Selects the source port from which RXC is sourced. RXC can be sourced from TXC
RCSEL[3:0] and RXC from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 Asynchronous mode
1 Synchronous mode (default)
Reserved This read-only field is reserved and always has the value 0.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
TXRXEN
Reset 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Normal mode
1 Internal Network mode
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RCLKDIR
TCLKDIR
TFS_ RFS_
TFSEL[3:0] TCSEL[3:0] RFSEL[3:0]
DIR DIR
W
Reset 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RCSEL[3:0] SYN
W
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 TXFS is an input.
1 TXFS is an output.
30–27 Transmit Frame Sync Select. Selects the source port from which TXFS is sourced.
TFSEL[3:0]
0xxx Selects TXFS from port.
1xxx Selects RXFS from port.
x000 Port 1
x110 Port 7
x111 Reserved
0 TXC is an input.
1 TXC is an output.
25–22 Transmit Clock Select. Selects the source port from which TXC is sourced.
TCSEL[3:0]
0xxx Selects TXC from port.
1xxx Selects RXC from port.
x000 Port 1
x110 Port 7
x111 Reserved
21 Receive Frame Sync Direction Control. This bit sets the direction of the RXFS pin of the interface as an
RFS_DIR output or input. When set as an input, the RFSEL settings are ignored. When set as an output, the RFSEL
settings determine the source port of the frame sync.
0 RXFS is an input.
1 RXFS is an output.
20–17 Receive Frame Sync Select. Selects the source port from which RXFS is sourced. RXFS can be sourced
RFSEL[3:0] from TXFS and RXFS from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 RXC is an input.
1 RXC is an output.
15–12 Receive Clock Select. Selects the source port from which RXC is sourced. RXC can be sourced from TXC
RCSEL[3:0] and RXC from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
Table continues on the next page...
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
TXRXEN
MODE
RXDSEL[2:0] INMMASK[7:0]
W
Reset 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Normal mode
1 Internal Network mode
INMMASK[7:0] Internal Network Mode Mask. Bit mask that selects the ports from which the RXD signals are to be ANDed
together for internal network mode. Bit 6 represents RXD from Port 7 and bit0 represents RXD from Port
1.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RCLKDIR
TCLKDIR
TFS_ RFS_
TFSEL[3:0] TCSEL[3:0] RFSEL[3:0]
DIR DIR
W
Reset 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RCSEL[3:0] SYN
W
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 TXFS is an input.
1 TXFS is an output.
0 TXC is an input.
1 TXC is an output.
25–22 Transmit Clock Select. Selects the source port from which TXC is sourced.
TCSEL[3:0]
0xxx Selects TXC from port.
1xxx Selects RXC from port.
x000 Port 1
x110 Port 7
x111 Reserved
21 Receive Frame Sync Direction Control. This bit sets the direction of the RXFS pin of the interface as an
RFS_DIR output or input. When set as an input, the RFSEL settings are ignored. When set as an output, the RFSEL
settings determine the source port of the frame sync.
0 RXFS is an input.
1 RXFS is an output.
20–17 Receive Frame Sync Select. Selects the source port from which RXFS is sourced. RXFS can be sourced
RFSEL[3:0] from TXFS and RXFS from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 RXC is an input.
1 RXC is an output.
15–12 Receive Clock Select. Selects the source port from which RXC is sourced. RXC can be sourced from TXC
RCSEL[3:0] and RXC from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 Asynchronous mode
1 Synchronous mode (default)
Reserved This read-only field is reserved and always has the value 0.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
TXRXEN
MODE
RXDSEL[2:0] INMMASK[7:0]
W
Reset 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Normal mode
1 Internal Network mode
INMMASK[7:0] Internal Network Mode Mask. Bit mask that selects the ports from which the RXD signals are to be ANDed
together for internal network mode. Bit 6 represents RXD from Port 7 and bit0 represents RXD from Port
1.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RCLKDIR
TCLKDIR
TFS_ RFS_
TFSEL[3:0] TCSEL[3:0] RFSEL[3:0]
DIR DIR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RCSEL[3:0] SYN
W
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 TXFS is an input.
1 TXFS is an output.
30–27 Transmit Frame Sync Select. Selects the source port from which TXFS is sourced.
TFSEL[3:0]
0xxx Selects TXFS from port.
1xxx Selects RXFS from port.
x000 Port 1
x110 Port 7
x111 Reserved
26 Transmit Clock Direction Control. This bit sets the direction of the TXC pin of the interface as an output or
TCLKDIR input. When set as an input, the TCSEL settings are ignored. When set as an output, the TCSEL settings
determine the source port of the clock.
0 TXC is an input.
1 TXC is an output.
25–22 Transmit Clock Select. Selects the source port from which TXC is sourced.
TCSEL[3:0]
0xxx Selects TXC from port.
1xxx Selects RXC from port.
x000 Port 1
x110 Port 7
x111 Reserved
21 Receive Frame Sync Direction Control. This bit sets the direction of the RXFS pin of the interface as an
RFS_DIR output or input. When set as an input, the RFSEL settings are ignored. When set as an output, the RFSEL
settings determine the source port of the frame sync.
0 RXFS is an input.
1 RXFS is an output.
20–17 Receive Frame Sync Select. Selects the source port from which RXFS is sourced. RXFS can be sourced
RFSEL[3:0] from TXFS and RXFS from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 RXC is an input.
1 RXC is an output.
15–12 Receive Clock Select. Selects the source port from which RXC is sourced. RXC can be sourced from TXC
RCSEL[3:0] and RXC from other ports.
Table continues on the next page...
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 Asynchronous mode
1 Synchronous mode (default)
Reserved This read-only field is reserved and always has the value 0.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
TXRXEN
MODE
RXDSEL[2:0] INMMASK[7:0]
W
Reset 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Normal mode
1 Internal Network mode
INMMASK[7:0] Internal Network Mode Mask. Bit mask that selects the ports from which the RXD signals are to be ANDed
together for internal network mode. Bit 6 represents RXD from Port 7 and bit0 represents RXD from Port
1.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
RCLKDIR
TCLKDIR
TFS_ RFS_
TFSEL[3:0] TCSEL[3:0] RFSEL[3:0]
DIR DIR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RCSEL[3:0] SYN
W
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 TXFS is an input.
1 TXFS is an output.
30–27 Transmit Frame Sync Select. Selects the source port from which TXFS is sourced.
TFSEL[3:0]
0xxx Selects TXFS from port.
1xxx Selects RXFS from port.
x000 Port 1
x110 Port 7
x111 Reserved
26 Transmit Clock Direction Control. This bit sets the direction of the TXC pin of the interface as an output or
TCLKDIR input. When set as an input, the TCSEL settings are ignored. When set as an output, the TCSEL settings
determine the source port of the clock.
0 TXC is an input.
1 TXC is an output.
25–22 Transmit Clock Select. Selects the source port from which TXC is sourced.
TCSEL[3:0]
0xxx Selects TXC from port.
1xxx Selects RXC from port.
x000 Port 1
x110 Port 7
x111 Reserved
21 Receive Frame Sync Direction Control. This bit sets the direction of the RXFS pin of the interface as an
RFS_DIR output or input. When set as an input, the RFSEL settings are ignored. When set as an output, the RFSEL
settings determine the source port of the frame sync.
0 RXFS is an input.
1 RXFS is an output.
20–17 Receive Frame Sync Select. Selects the source port from which RXFS is sourced. RXFS can be sourced
RFSEL[3:0] from TXFS and RXFS from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 RXC is an input.
1 RXC is an output.
15–12 Receive Clock Select. Selects the source port from which RXC is sourced. RXC can be sourced from TXC
RCSEL[3:0] and RXC from other ports.
Table continues on the next page...
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 Asynchronous mode
1 Synchronous mode (default)
Reserved This read-only field is reserved and always has the value 0.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
TXRXEN
MODE
RXDSEL[2:0] INMMASK[7:0]
W
Reset 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Normal mode
1 Internal Network mode
INMMASK[7:0] Internal Network Mode Mask. Bit mask that selects the ports from which the RXD signals are to be ANDed
together for internal network mode. Bit 6 represents RXD from Port 7 and bit0 represents RXD from Port
1.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
RCLKDIR
TCLKDIR
TFS_ RFS_
TFSEL[3:0] TCSEL[3:0] RFSEL[3:0]
DIR DIR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RCSEL[3:0] SYN
W
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 TXFS is an input.
1 TXFS is an output.
30–27 Transmit Frame Sync Select. Selects the source port from which TXFS is sourced.
TFSEL[3:0]
0xxx Selects TXFS from port.
1xxx Selects RXFS from port.
x000 Port 1
x110 Port 7
x111 Reserved
26 Transmit Clock Direction Control. This bit sets the direction of the TXC pin of the interface as an output or
TCLKDIR input. When set as an input, the TCSEL settings are ignored. When set as an output, the TCSEL settings
determine the source port of the clock.
0 TXC is an input.
1 TXC is an output.
25–22 Transmit Clock Select. Selects the source port from which TXC is sourced.
TCSEL[3:0]
0xxx Selects TXC from port.
1xxx Selects RXC from port.
x000 Port 1
x110 Port 7
x111 Reserved
21 Receive Frame Sync Direction Control. This bit sets the direction of the RXFS pin of the interface as an
RFS_DIR output or input. When set as an input, the RFSEL settings are ignored. When set as an output, the RFSEL
settings determine the source port of the frame sync.
0 RXFS is an input.
1 RXFS is an output.
20–17 Receive Frame Sync Select. Selects the source port from which RXFS is sourced. RXFS can be sourced
RFSEL[3:0] from TXFS and RXFS from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 RXC is an input.
1 RXC is an output.
15–12 Receive Clock Select. Selects the source port from which RXC is sourced. RXC can be sourced from TXC
RCSEL[3:0] and RXC from other ports.
Table continues on the next page...
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 Asynchronous mode
1 Synchronous mode (default)
Reserved This read-only field is reserved and always has the value 0.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
TXRXEN
MODE
RXDSEL[2:0] INMMASK[7:0]
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Normal mode
1 Internal Network mode
INMMASK[7:0] Internal Network Mode Mask. Bit mask that selects the ports from which the RXD signals are to be ANDed
together for internal network mode. Bit 6 represents RXD from Port 7 and bit0 represents RXD from Port
1.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
RCLKDIR
TCLKDIR
TFS_ RFS_
TFSEL[3:0] TCSEL[3:0] RFSEL[3:0]
DIR DIR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RCSEL[3:0] SYN
W
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 TXFS is an input.
1 TXFS is an output.
30–27 Transmit Frame Sync Select. Selects the source port from which TXFS is sourced.
TFSEL[3:0]
0xxx Selects TXFS from port.
1xxx Selects RXFS from port.
x000 Port 1
x110 Port 7
x111 Reserved
26 Transmit Clock Direction Control. This bit sets the direction of the TXC pin of the interface as an output or
TCLKDIR input. When set as an input, the TCSEL settings are ignored. When set as an output, the TCSEL settings
determine the source port of the clock.
0 TXC is an input.
1 TXC is an output.
25–22 Transmit Clock Select. Selects the source port from which TXC is sourced.
TCSEL[3:0]
0xxx Selects TXC from port.
1xxx Selects RXC from port.
x000 Port 1
x110 Port 7
x111 Reserved
21 Receive Frame Sync Direction Control. This bit sets the direction of the RXFS pin of the interface as an
RFS_DIR output or input. When set as an input, the RFSEL settings are ignored. When set as an output, the RFSEL
settings determine the source port of the frame sync.
0 RXFS is an input.
1 RXFS is an output.
20–17 Receive Frame Sync Select. Selects the source port from which RXFS is sourced. RXFS can be sourced
RFSEL[3:0] from TXFS and RXFS from other ports.
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 RXC is an input.
1 RXC is an output.
15–12 Receive Clock Select. Selects the source port from which RXC is sourced. RXC can be sourced from TXC
RCSEL[3:0] and RXC from other ports.
Table continues on the next page...
NOTE: RCLKDIR and SYN should not be changed at the same time.
0 Asynchronous mode
1 Synchronous mode (default)
Reserved This read-only field is reserved and always has the value 0.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
TXRXEN
MODE
RXDSEL[2:0] INMMASK[7:0]
W
Reset 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Normal mode
1 Internal Network mode
INMMASK[7:0] Internal Network Mode Mask. Bit mask that selects the ports from which the RXD signals are to be ANDed
together for internal network mode. Bit 6 represents RXD from Port 7 and bit0 represents RXD from Port
1.
17.1 Overview
The hardware ECC accelerator provides a forward error-correction function for
improving the reliability of various storage media that may be attached to the device.
For example, NAND flash devices use a spare area to store ecc codes to correct some
hard bit errors in data stored within the device, allowing higher device yields and,
therefore, lower NAND device costs.
The Bose, Ray-Chaudhuri, Hocquenghem (BCH) Encoder and Decoder module is
capable of correcting from 2 to 40 single bit errors within a block of data no larger than
about 1900 bytes (512 bytes or 1024 bytes are typical) in applications such as protecting
data and resources stored on modern NAND flash devices. The correction level in the
BCH block is programmable to provide flexibility for varying applications and
configurations of flash page size. The design can be programmed to encode protection of
2 to 40 bit errors when writing flash and to correct the corresponding number of errors on
decode. The correction level when decoding MUST be programmed to the same
correction level as was used during the encode phase.
BCH-codes are a type of block-code, which implies that all error-correction is performed
over a block of N-symbols. The BCH operation will be performed over GF(213 = 8192)
or GF(214 = 16384), which is the Galois Field consisting of 8191 or 16383 one-bit
symbols. BCH-encoding (or encode for any block-code) can be performed by two
algorithms: systematic encoding or multiplicative encoding. Systematic encoding is the
process of reading all the symbols which constitute a block, dividing continuously these
symbols by the generator polynomial for the GF(8192) or GF(16384) and appending the
resulting t parity symbols to the block to create a BCH codeword (where t is the number
of correctable bits).
The BCH encode process creates t*13 (or t*14)-bit parity symbols for each data block
when the data is written to the flash device. The parity symbols are written to the flash
device after the corresponding data block, and together these are collectively called the
codeword. The codeword can be used during the decode process to correct errors that
occur in either the data or parity blocks.
The BCH decoder processes code words in a 4-step fashion:
1. Syndrome Calculation (SC): This is the process of reading in all of the symbols of
the codeword and continuously dividing by the generator polynomial for the field.
2*t syndromes must be calculated for each codeword and inspection of the
syndromes determines if there are errors: a non-zero set of syndromes indicates one
or more errors. This process is implemented parallel hardware to minimize
processing time since it must be done every time the decode is performed.
2. Key Equation Solver (KES): The syndromes represent 2t-linear equations with 2t-
unknown variables. The process of solving these equations and selecting from the
numerous solutions constitutes the KES module. When the KES block completes its
operations, it generates an error locator polynomial (sigma) that is used in the
proceeding block to determine the locations and values of the errors.
3. Chien Search (CS): This block takes input from the KES block and uses the Chien
Algorithm for finding the locations of the errors based on the error locator
polynomial. The method basically involves substituting all 8191 symbols from the
GF(8192) or 16383 symbols from the GF(16383) into the locator polynomial. All
evaluations that produce a zero solution indicate locations of the various errors. Since
each located error corresponds to a single bit, the bit in the original data may be
corrected by simply flipping the polarity of the incorrect location.
4. Correction: this block has to convert the symbol index and mask information to
memory byte indexes and masks.
The BCH block, shown in the figure, was designed to operate in a pipelined fashion to
maximize throughput. Aside from the initial latency to fill the pipeline stages, the BCH
throughput is about 7/4 cycles/byte. Thus, the bottleneck in performing NAND reads and
error corrections is the BCH rate. Current GPMI read rates are approximately 1/2 cycles/
byte maximally for the current generation of NAND flash. Fortunately, BCH has a
different master clock from GPMI, this gives some flexibility to match the throughput
rate. The CPU is not directly involved in generating parity symbols, checking for errors,
or correcting them.
AXI
BCH Engine
BCH
GPMI Programmable
Programmable Registers
Registers
Transfer Controls
Key
Equation
Solver
error-locator polynomial
Chien corrections
Search
GPMI clock domain
17.2 Operation
Before performing any NAND flash read or write operations, software should first
program the BCH's flash layout registers (see Flash Page Layout) to specify how data is
to be formatted on the flash device. The BCH hardware allows full programmability over
the flash page layout to enable users flexibility in balancing ECC correction levels and
ever-changing flash page sizes.
To initiate a NAND Flash write, software will program a GPMI DMA operation. The
DMA need only program the GPMI control registers (and handle the requisite flash
addressing handshakes) since the BCH will handle all data operations using its AXI bus
interface. The BCH will then send the data to the GPMI controller to be written to flash
as it computes the parity symbols. At the end of each data block the BCH will insert the
parity symbols into the data stream so that the GPMI sees only a continuous stream of
data to be written.
NAND Flash read operations operate in a similar manner. As the GPMI controller reads
the device, all data is sent to the BCH hardware for error detection/correction. The BCH
controller writes all incoming read data to system memory and in parallel computes the
syndromes used to detect bit errors. If errors are detected within a block, the BCH
hardware activates the error correction logic to determine where bit errors have occurred
and ultimately correct them in the data buffer in system memory. After an entire flash
page has been read and corrected, the BCH will signal an interrupt to the CPU.
The figure below indicates how data read from the GPMI is operated on within the BCH
hardware. As the BCH receives data from the GPMI (top row), it is written to memory by
the BCH's Bus Interface Unit (BIU) (second row). For blocks requiring correction, the
KES logic will be activated after the entire block has been received. Once the error
locator polynomial has been computed, the corrections are determined by the Chien
Search and fed back to the BIU, which performs a read, modify, write operation on the
buffer in memory to correct the data.
ECC Done
GPMI/ Read Read Read Read Read Read Read Read Interrupt
Syndrome Block 0 Block 1 Block 2 Block 3 Block 4 Block 5 Block 6 Block 7
CS CS CS CS CS CS CS CS
Chien Search
Block 0 Block 1 Block 2 Block 3 Block 4 Block 5 Block 6 Block 7
• Metadata will be written at the beginning of the flash page to facilitate fast access for
filesystem operations.
• Metadata may be treated as an independent block for ECC purposes or combined
with the first data block to conserve bits in the flash.
• The BCH does not support a partial page write (this can be accomplished by
programming the BCH layout registers such that the BCH only sees a portion of the
page).
• Flash read operations can read the entire page or the first block on the page.
• The BCH also supports a memory-to-memory mode of operation that does not
require the use of DMA or the GPMI.
parity
parity
parity
parity
parity
parity
meta d0 d1 d2 dn-1 dn
10B 512B 512B 512B 512B 512B
parity
parity
parity
parity
parity
meta d0 d1 d2 dn-1 dn
10B 512B 512B 512B 512B 512B
parity
parity
parity
parity
parity
meta d0 d1 d2
2 dn-1 dn
32B 484B 516B 516B 516B 516B
Each layout is determined by a pair of registers that define the following parameters:
• DATA0_SIZE: Indicates the number of data bytes in the first block on the page (this
should not include parity or metadata bytes). This should be set to 0 when the
metadata is to be covered separately with its own ECC. This must be a multiple of 4
bytes.
• ECC0: Indicates the ECC level to be used for the first block on the flash
(data0+metadata).
• META_SIZE: Indicates the number of bytes (from 0-255) that are stored as
metadata.
• NBLOCKS: Indicates the number of subsequent DATAN blocks on the flash, or the
number of blocks following the DATA0 block.
• DATAN_SIZE: Indicates the number of data bytes in all subsequent data blocks.
This MUST be a multiple of 4 bytes.
• ECCN: Indicates the ECC level to be used for the subsequent data blocks.
• GF0 or GFN: Indicates the Galois field the meta / data blocks are using
• PAGE_SIZE: Indicates the total number of bytes available per page on the physical
flash device. This includes the spare area and is typically 4096+128, 4096+218, or
2048+64 bytes.
In this case, there will be additional unused spare bits, with the BCH will pad out with
zeros.
Metadata read from the flash will be stored to the location pointed to by the
GPMI_AUXILIARY register and data will be written to the address specified in the
GPMI_PAYLOAD register as is shown in the following figure where the block length is
512 bytes for example. Since the number of blocks on a flash page is programmable, the
BCH also writes individual block correction status to the auxiliary pointer at the word-
aligned address following the end of the metadata. Optionally, the computed syndromes
may also be written to the auxiliary area if the DEBUGSYNDROME bit is set in the
control register.
As blocks complete processing, the bus master will accumulate the status for each block
and write it to the auxiliary data buffer following the metadata. The metadata area will be
padded with 0's until the next word boundary and the status for blocks 0-3 will be written
to the next word. The status for subsequent blocks will then be written to the buffer. The
status for the first block (metadata block) is also stored in the STATUS_BLK0 register in
the BCH_STATUS register. The completion codes for the blocks are indicated in the
Table 17-3. Note that the definition of the bytes and their ordering in the auxiliary and
payload storage areas are user defined. When this data is read back from the flash and put
into memory, it will resemble the original buffer that was written out to the flash.
The following figure shows the layout of the bytes within the status field.
3 2 1 0
Metadata
0 0
Block 8
0 0 0
Status
Status bytes are allocated based on the NBLOCKS programmed into the
flash format register. The number of status bytes are computed by NBLOCK+1.
The status area will be padded with zeros to the next word boundary.
Syndrome data written for debug purposes
follows the end of the status block.
M2M_ENABLE bits in the control register. The BCH can be programmed to either issue
an interrupt at the end of the operation or software may poll the status bits for
completion.
Memory to memory decode operations work in a similar manner. The encoded data
address is written to the BCH_ENCODEPTR and the data and meta pointers are written
to buffers that correspond to the desired decoded data addresses. To initiate a decode,
software must set the M2M_ENCODE bit to 0 while writing the M2M_ENABLE bit.
Note that the addresses written to the BCH_DATAPTR, BCH_METAPTR and
BCH_ENCODEPTR registers should always be aligned on a 4 byte boundary. In other
words, the 2 lower bits of the address should always be written with zeros.
To use the BCH encoder with the GPMI's DMA, create a DMA command chain
containing ten descriptor structures, as shown in Figure 17-8 and detailed in the DMA
structure code example that follows it in DMA Structure Code Example. The ten
descriptors perform the following tasks:
1. Disable the BCH block (in case it was enabled) and issue NAND write setup
command byte (under CLE) and address bytes (under ALE).
2. Configure and enable the BCH and GPMI blocks to perform the NAND write.
3. Disable the BCH block and issue NAND write execute command byte (under CLE).
4. Wait for the NAND device to finish writing the data by watching the ready signal.
5. Check for NAND timeout through PSENSE.
6. Issue NAND status command byte (under CLE).
7. Read the status and compare against expected.
8. If status is incorrect or incomplete, branch to error handling descriptor chain.
9. Otherwise, write is complete and emit GPMI interrupt.
STOP
HW_APBH_CTRL1_CH0_CMDCMPLT_IRQ = 0
STOP
Descriptor 1: Disable BCH engine and issue NAND write set-up command and address (CLE/ALE).
NEXT CMD ADDR
CMD <= 1+5 3 1 0 0 1 0 1 DMA_READ
BUFFER ADDR 1 Byte NAND CMD
HW_GPMI_CTRL0 <= write 8_bit enabled 2 NAND_CLE 1 1+5
5 Byte ADDR
HW_GPMI_COMPARE <= null null
HW_GPMI_ECCCTRL <= disable
NOTE: No DMA
Descriptor 2: Enable the BCH engine and write the data payload.
data transferred to
NEXT CMD ADDR GPMI when using
CMD <= 0 4 1 0 0 1 0 1 NO_DMA_XFER BCH
BUFFER ADDR
HW_GPMI_CTRL0 <= write 8_bit enabled 2 NAND_DATA 0 0
HW_GPMI_COMPARE <= null null
HW_GPMI_ECCCTRL <= encode_8_bit enable 0x1FF
8*512 Byte Data
HW_GPMI_ECCCOUNT<= 4096+218 (flash page size)
Payload Buffer
HW_GPMI_PAYLOAD
HW_GPMI_AUXILIARY
Auxiliary Payload
Buffer
Descriptor 3: Disable BCH engine and issue NAND write execute command (CLE).
NEXT CMD ADDR
CMD <= 1 3 1 0 0 1 0 1 DMA_READ
BUFFER ADDR
1 Byte NAND CMD
HW_GPMI_CTRL0 <= write 8_bit enabled 2 NAND_CLE 0 1
HW_GPMI_COMPARE <= null null
HW_GPMI_ECCCTRL <= ---- disable ----
Descriptor 6: Disable BCH engine (if enabled by another thread) and issue NAND status command (CLE).
NEXT CMD ADDR
CMD <= 1 3 1 0 0 1 0 1 DMA_READ
BUFFER ADDR 1 Byte NAND CMD
HW_GPMI_CTRL0 <= write 8_bit enabled 2 NAND_CLE 0 1
HW_GPMI_COMPARE <= null null
HW_GPMI_ECCCTRL <= ---- disable ----
Descriptor 7: Read the NAND status and compare against expected value.
NEXT CMD ADDR
CMD <= 0 2 1 0 0 1 0 1 NO_DMA_XFER
BUFFER ADDR
HW_GPMI_CTRL0 <= read_and_compare 8_bit disabled 2 NAND_DATA 0 1
HW_GPMI_COMPARE <= <mask_value> <reference_value>
//----------------------------------------------------------------------------
// generic DMA/GPMI/ECC descriptor struct, order sensitive!
//----------------------------------------------------------------------------
typedef struct {
// DMA related fields
unsigned int dma_nxtcmdar;
unsigned int dma_cmd;
unsigned int dma_bar;
// GPMI related fields
unsigned int gpmi_ctrl0;
unsigned int gpmi_compare;
unsigned int gpmi_eccctrl;
unsigned int gpmi_ecccount;
unsigned int gpmi_data_ptr;
unsigned int gpmi_aux_ptr;
} GENERIC_DESCRIPTOR;
//----------------------------------------------------------------------------
// allocate 10 descriptors for doing a NAND ECC Write
//----------------------------------------------------------------------------
GENERIC_DESCRIPTOR write[10];
//----------------------------------------------------------------------------
// DMA descriptor pointer to handle error conditions from psense checks
//----------------------------------------------------------------------------
unsigned int * dma_error_handler;
//----------------------------------------------------------------------------
// 8 byte NAND command and address buffer
// any alignment is ok, it is read by the GPMI DMA
// byte 0 is write setup command
// bytes 1-5 is the NAND address
// byte 6 is write execute command
// byte 7 is status command
//----------------------------------------------------------------------------
unsigned char nand_cmd_addr_buffer[8];
//----------------------------------------------------------------------------
// 4096 byte payload buffer used for reads or writes
// needs to be word aligned
//----------------------------------------------------------------------------
unsigned int write_payload_buffer[(4096/4)];
//----------------------------------------------------------------------------
// 65 byte meta-data to be written to NAND
// needs to be word aligned
//----------------------------------------------------------------------------
unsigned int write_aux_buffer[65];
//----------------------------------------------------------------------------
// Descriptor 1: issue NAND write setup command (CLE/ALE)
//----------------------------------------------------------------------------
write[0].dma_nxtcmdar = &write[1]; // point to the next descriptor
write[0].dma_cmd = BF_APBH_CHn_CMD_XFER_COUNT (1 + 5)| // 1 byte command, 5 byte address
BF_APBH_CHn_CMD_CMDWORDS (3) | // send 3 words to the GPMI
BF_APBH_CHn_CMD_WAIT4ENDCMD (1) | // wait for command to finish
before
// continuing
BF_APBH_CHn_CMD_SEMAPHORE (0) |
BF_APBH_CHn_CMD_NANDWAIT4READY(0) |
BF_APBH_CHn_CMD_NANDLOCK (1) | // prevent other DMA channels
from
// taking over
BF_APBH_CHn_CMD_IRQONCMPLT (0) |
BF_APBH_CHn_CMD_CHAIN (1) | // follow chain to next command
// enable pinctrl
PINCTRL_CTRL_WR(0x00000000);
Note that for writing NANDs (ECC encoding), only GPMI DMA command complete
interrupts are used. The BCH engine is used for writing to the NAND but may optionally
produces an interrupt. From the sample code in DMA Structure Code Example :
• DMA descriptor 1 prepares the NAND for data write by using the GPMI to issue a
write setup command byte under CLE, then sends a 5-byte address under ALE. The
BCH engine is disabled and not used for these commands.
• DMA descriptor 2 enables the BCH engine for encoding to begin the initial writing
of the NAND data by specifying where the data and auxiliary payload are coming
from in system memory.
• DMA descriptor 3 issues the write commit command byte under CLE to the NAND.
• DMA descriptor 4 waits for the NAND to complete the write commit/transfer by
watching the NAND's ready line status. This descriptor relinquishes the
NANDLOCK on the GPMI to enable the other DMA channels to initiate NAND
transactions on different NAND CS lines.
• DMA descriptor 6 issues a NAND status command byte under "CLE" to check the
status of the NAND device following the page write.
• DMA descriptor 7 reads back the NAND status and compares the status with an
expected value. If there are differences, then the DMA processing engine follows an
error-handling DMA descriptor path.
• DMA descriptor 8 disables the BCH engine and emits a GPMI interrupt to indicate
that the NAND write has been completed.
STOP
HW_APBH_CTRL1_CH0_CMDCMPLT_IRQ = 0
STOP
HW_BCH_CTRL_COMPLETE_IRQ = 0
STOP
Conceptually, an APHB DMA Channel (0,1,2 or 3) command chain with seven command
structures linked together is used to perform the BCH decode operation (as shown in
Figure 17-10).
Note
The GPMI's DMA command structures controls the BCH
decode operation.
To use the BCH decoder with the GPMI's DMA, create a DMA command chain
containing seven descriptor structures, as shown in the figure below and detailed in the
DMA structure code example that follows it in DMA Structure Code Example. The seven
DMA descriptors perform the following tasks:
1. Issue NAND read setup command byte (under "CLE") and address bytes (under
"ALE").
2. Issue NAND read execute command byte (under "CLE").
3. Wait for the NAND device to complete accessing the block data by watching the
ready signal.
4. Check for NAND timeout through "PSENSE".
5. Configure and enable the BCH block and read the NAND block data.
6. Disable the BCH block.
7. Descriptor NOP to allow NANDLOCK in the previous descriptor to the thread-safe.
//----------------------------------------------------------------------------
// generic DMA/GPMI/ECC descriptor struct, order sensitive!
//----------------------------------------------------------------------------
typedef struct {
// DMA related fields
unsigned int dma_nxtcmdar;
unsigned int dma_cmd;
unsigned int dma_bar;
// GPMI related fields
unsigned int gpmi_ctrl0;
unsigned int gpmi_compare;
unsigned int gpmi_eccctrl;
unsigned int gpmi_ecccount;
unsigned int gpmi_data_ptr;
unsigned int gpmi_aux_ptr;
} GENERIC_DESCRIPTOR;
//----------------------------------------------------------------------------
// allocate 7 descriptors for doing a NAND ECC Read
//----------------------------------------------------------------------------
GENERIC_DESCRIPTOR read[7];
//----------------------------------------------------------------------------
// DMA descriptor pointer to handle error conditions from psense checks
//----------------------------------------------------------------------------
unsigned int * dma_error_handler;
//----------------------------------------------------------------------------
// 7 byte NAND command and address buffer
// any alignment is ok, it is read by the GPMI DMA
// byte 0 is read setup command
// bytes 1-5 is the NAND address
// byte 6 is read execute command
//----------------------------------------------------------------------------
unsigned char nand_cmd_addr_buffer[7];
//----------------------------------------------------------------------------
// 4096 byte payload buffer used for reads or writes
// needs to be word aligned
//----------------------------------------------------------------------------
unsigned int read_payload_buffer[(4096/4)];
//----------------------------------------------------------------------------
// 412 byte auxiliary buffer used for reads
// needs to be word aligned
//----------------------------------------------------------------------------
unsigned int read_aux_buffer[(412/4)];
//----------------------------------------------------------------------------
// Descriptor 1: issue NAND read setup command (CLE/ALE)
//----------------------------------------------------------------------------
read[0].dma_nxtcmdar = &read[1]; // point to the next descriptor
read[0].dma_cmd = BF_APBH_CHn_CMD_XFER_COUNT (1 + 5) | // 1 byte command, 5 byte address
BF_APBH_CHn_CMD_CMDWORDS (3) | // send 3 words to the GPMI
BF_APBH_CHn_CMD_WAIT4ENDCMD (1) | // wait for command to finish
// before continuing
BF_APBH_CHn_CMD_SEMAPHORE (0) |
BF_APBH_CHn_CMD_NANDWAIT4READY(0) |
BF_APBH_CHn_CMD_NANDLOCK (1) | // prevent other DMA channels from
// taking over
BF_APBH_CHn_CMD_IRQONCMPLT (0) |
• DMA descriptor 3 performs a wait for ready operation allowing the DMA chain to
remain dormant until the NAND device completes its read access time.
• DMA descriptor 5 handles the reading and error correction of the NAND data. This
command's PIOs activate the BCH engine to write the read NAND data to system
memory and to process it for any errors that need to be corrected. This DMA
descriptor contains two PIO values that are system memory addresses pointing to the
PAYLOAD data area and to the AUXILIARY data area. These addresses are used by
the BCH engine's AHB master to move data into system memory and to correct it.
While this example is reading an entire 4K page—payload plus metadata—it is
equally possible to read just one 512-byte payload block or just the uniquely
protected metadata block in a single 7 DMA structure transfer.
• DMA descriptor 6 disables the BCH engine with the NANDLOCK asserted. This is
necessary to ensure that the GPMI resource is not arbitrated to another DMA channel
when multiple DMA channels are active concurrently.
• DMA descriptor 7 de-asserts the NANDLOCK to free up the GPMI resource to
another channel.
As the BCH decoder reads the data and parity blocks, it records a special condition, i.e.,
that all of the bits of a payload data block or metadata block are one, including any
associated parity bytes. The all-ones case for both parity and data indicates an erased
block in the NAND device.
The BCH_STATUS0 register contains a 4-bit field that indicates the final status of the
auxiliary block. A value of 0x0 indicates no errors found for a block.
• A value of 1 to 20 inclusive indicates that many correctable errors were found and
fixed.
• A value of 0xFE indicates uncorrectable errors detected on the block.
• A value of 0xFF indicates that the block was in the special ALL ONES state and is
therefore considered to be an ERASED block.
• All other values are disallowed by the hardware design.
Recall that up to eight NAND devices can have DMA chains in-flight at once, i.e. they
can all be contending for access to the GPMI data bus. It is impossible to predict which
NAND device will enter the BCH engine with a transfer first, because each chain
includes a wait4ready command structure. As a result, firmware should look at the
BCH_STATUS0_COMPLETED_CE bit field to determine which block is being reported
in the status register. There is also a 16-bit HANDLE field in the GPMI_ECCCTRL
register that is passed down the pipeline with each transaction. This handle field can be
used to speed firmware's detection of which transaction is being reported.
These examples of reading and writing have focused on full page transfers of 4K page
NAND devices. Other device configurations can be specified by changing the
ECCOUNT field in the GPMI registers and reprogramming the BCH's
FLASHnLAYOUTm registers.
The BCH and GPMI blocks are designed to be very efficient at reading single 512 (or
1024)-byte pages in one transaction. With no errors, the transaction takes less than 20
HCLKs longer than the time to read the raw data from the NAND.
To summarize, the APBH DMA command chain for a BCH decode operation is shown in
Figure 17-10. Seven DMA command structures must be present for each NAND read
transaction decoded by the BCH. The seven DMA command structures for multiple
NAND read transaction blocks can be chained together to make larger units of work for
the BCH, and each will produce an appropriate error report in the BCH PIO space.
Multiple NAND devices can have such multiple chains scheduled. The results can come
back out of order with respect to the multiple chains.
17.4.3 Interrupts
There are two interrupt sources used in processing BCH protected NAND read and write
transfers.
Since all BCH operations are initiated by GPMI DMA command structures, the DMA
completion interrupt for the GPMI is an important ISR. Both of the flow charts of Figure
17-6 and Figure 17-9 show the GPMI DMA complete ISR skeleton. In both reads and
writes, the GPMI DMA completion interrupt is used to schedule work INTO the error
correction pipeline. As the front end processing completes, the DMA interrupt is
generated and additional work, such as DMA chains, are passed to the GPMI DMA to
keep it fed. For write operations, this is the only interrupt that is generated for processing
the NAND write transfer.
For reads, however, two interrupts are needed. Every read is started by a GPMI DMA
command chain and the front end queue is fed as described above. The back end of the
read pipeline is drained by monitoring the BCH completion interrupt found int
HW_BCH_CTRL_COMPLETE_IRQ.
An BCH transaction consists of reading or writing all of the blocks requested in the
HW_GPMI_ECCCTRL_BUFFER_MASK bit field. As every read transaction completes,
it posts the status of all of the blocks to the HW_BCH_STATUS0 and
HW_BCH_STATUS1 registers and sets the completion interrupt. The five stages of the
BCH read pipeline completes, one in the GPMI and four in the BCH, are independently
stalled as they complete and try to deliver to the next stage in the data flow. Several of
these stages can be skipped if no-errors are found or once an uncorrectable error is found
in a block.
In any case, the final stage will stall if the status register is busy waiting for the CPU to
take status register results. The hardware monitors the state of the
HW_BCH_CTRL_COMPLETE_IRQ bit. If it is still set when the last pipeline stage is
ready to post data, then the stage will stall. It follows that the next previous stage will
stall when it is ready to hand off work to the final stage, and so on up the pipeline.
CAUTION
It is important that firmware read the STATUS0/1 results and
save them before clearing the interrupt request bit. Otherwise, a
transaction and its results could be completely lost.
// A soft reset can take multiple clocks to complete, so do NOT gate the
// clock when setting soft reset. The reset process will gate the clock
// automatically. Poll until this has happened before subsequently
// preparing soft-reset and clock gate
BCH_CTRL_CLR(BM_BCH_CTRL_SFTRST);
BCH_CTRL_CLR(BM_BCH_CTRL_CLKGATE);
// asserting soft-reset
BCH_CTRL_SET(BM_BCH_CTRL_SFTRST);
// waiting for confirmation of soft-reset
while (!BCH_CTRL.B.CLKGATE)
R RSVD5 RSVD4
DEBUGSYNDROME
M2M_ENCODE
M2M_ENABLE
CLKGATE
SFTRST
M2M_
LAYOUT
Reset 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9
RSVD2 8 7 6 5 4 3 2 1 0
RSVD0
DEBUG_STALL_IRQ_EN
R RSVD3 RSVD1
COMPLETE_IRQ_EN
DEBUG_STALL_IRQ
BM_ERROR_IRQ
COMPLETE_IRQ
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R HANDLE COMPLETED_CE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
UNCORRECTABLE
CORRECTED
ALLONES
Reset 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Bit 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
R RSVD
ERASE_THRESHOLD
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
ADDR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
ADDR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
ADDR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
CS15_ CS14_ CS13_ CS12_ CS11_ CS10_ CS9_ CS8_
W SELECT SELECT SELECT SELECT SELECT SELECT SELECT SELECT
Reset 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
CS7_ CS6_ CS5_ CS4_ CS3_ CS2_ CS1_ CS0_
W SELECT SELECT SELECT SELECT SELECT SELECT SELECT SELECT
Reset 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
NBLOCKS META_SIZE
W
Reset 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
ECC0 DATA0_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
The flash format register contains a description of the logical layout of data on the flash
device. This register is used in conjunction with the FLASH0LAYOUT0 register to
control the format for the device selecting layout 0 in the LAYOUTSELECT register.
Address: 11_4000h base + 90h offset = 11_4090h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PAGE_SIZE
W
Reset 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
ECCN DATAN_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
NBLOCKS META_SIZE
W
Reset 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
R
ECC0 DATA0_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
The flash format register contains a description of the logical layout of data on the flash
device. This register is used in conjunction with the FLASH1LAYOUT0 register to
control the format for the device selecting layout 1 in the LAYOUTSELECT register.
Address: 11_4000h base + B0h offset = 11_40B0h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PAGE_SIZE
W
Reset 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
ECCN DATAN_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
See sections Flash Page Layout and Determining the ECC layout for a device for more
detail information on setting up the flash layout registers.
Address: 11_4000h base + C0h offset = 11_40C0h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
NBLOCKS META_SIZE
W
Reset 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
R
ECC0 DATA0_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
The flash format register contains a description of the logical layout of data on the flash
device. This register is used in conjunction with the FLASH2LAYOUT0 register to
control the format for the device selecting layout 2 in the LAYOUTSELECT register.
Address: 11_4000h base + D0h offset = 11_40D0h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PAGE_SIZE
W
Reset 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
ECCN DATAN_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
metadata, and flash page sizes as well as the ECC correction level. The first block written
to flash can be programmed to have different ECC, metadata, and data sizes from
subsequent data blocks on the device. In addition, the number of blocks stored on a page
of flash is not fixed, but instead is determined by the number of bytes consumed by the
initial (block 0) and subsequent data blocks.
See sections Flash Page Layout and Determining the ECC layout for a device for more
detail information on setting up the flash layout registers.
Address: 11_4000h base + E0h offset = 11_40E0h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
NBLOCKS META_SIZE
W
Reset 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
ECC0 DATA0_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
The flash format register contains a description of the logical layout of data on the flash
device. This register is used in conjunction with the FLASH3LAYOUT0 register to
control the format for the device selecting layout 3 in the LAYOUTSELECT register.
Address: 11_4000h base + F0h offset = 11_40F0h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PAGE_SIZE
W
Reset 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GF13_0_GF14_1
ECCN DATAN_SIZE
W
Reset 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
R RSVD1
KES_DEBUG_SYNDROME_SYMBOL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KES_DEBUG_PAYLOAD_FLAG
KES_DEBUG_SHIFT_SYND
RSVD0
BM_KES_TEST_BYPASS
R
KES_DEBUG_MODE4K
KES_DEBUG_STALL
KES_STANDALONE
KES_DEBUG_STEP
KES_DEBUG_KICK
DEBUG_REG_SELECT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x0 NORMAL — KES FSM proceeds to next block supplied by bus master.
0x1 WAIT — KES FSM waits after current equations are solved and the search engine is started.
8 1 = Point all SYND_GEN writes to dummy area at the end of the AUXILLIARY block so that diagnostics
BM_KES_TEST_ can preload all payload, parity bytes and computed syndrome bytes for test the KES engine.
BYPASS
0x0 NORMAL — Bus master address generator for SYND_GEN writes operates normally.
0x1 TEST_MODE — Bus master address generator always addresses last four bytes in Auxiliary block.
7–6 This field is reserved.
RSVD0
This read-only field is reserved and always has the value 0.
DEBUG_REG_ The value loaded in this bit field is used to select the internal register state view of KES engine or the
SELECT Chien search engine.
Bit 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
R VALUES
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R VALUES
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R VALUES
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R VALUES
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R NAME
W
Reset 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0
This register always returns a known read value for debug purposes and indicates the
version of the block and RTL version in use.
Address: 11_4000h base + 160h offset = 11_4160h
Bit 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 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The BCH_DEBUG1 register provides erased zero count information and pre-erase check.
Address: 11_4000h base + 170h offset = 11_4170h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DEBUG1_PREERASECHK
R RSVD
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R RSVD ERASED_ZERO_COUNT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18.1 Overview
The Clock Control Module (CCM) generates and controls clocks to the various modules
in the design and manages low power modes. This module uses the available clock
sources to generate the clock roots.
The Clock Controller Module controls the following functions:
• Uses the available clock sources to generate clock roots to various parts of the chip:
• PLL1 also referenced as ARM PLL
• PLL2 also referenced as System PLL
• PLL3 also referenced as USB1 PLL
• PLL4 also referenced as Audio PLL
• PLL5 also referenced as Video PLL
• PLL6 also referenced as ENET PLL
• PLL7 also referenced as USB2 PLL (This PLL is only used by the USB UTM
interface through a direct connection.)
• PLL8 also referenced as MLB PLL
• Uses programmable bits to control frequencies of the clock roots.
• Controls the low power mechanism.
• Provides control signals to LPCG for gating clocks.
• Provides handshake with SRC for reset performance.
• Provides handshake with GPC for support of power gating operations.
18.1.1 Features
The CCM includes these distinctive features:
• Provides root clock to SoC modules based on several source clocks.
• Arm core root clock is generated from a dedicated source clock.
• Includes separate dividers to control generation of core and bus root clocks (AXI,
AHB, IPG).
• Includes separate dividers and clock source selectors for each serial root clock.
• Optional external clocks to bypass PLL clocks.
• Selects clock signals to output on CCM_CLKO1 and CCM_CLKO2 onto the pads
for observability.
• Controllable registers are accessible via IP bus.
• Manages the Low Power Modes, namely RUN, WAIT and STOP. The gating of the
peripheral clocks is programmable in RUN and WAIT modes.
• Manages frequency scaling procedure for Arm core clock by shifting between PLL
sources, without loss of clocks.
• Manages frequency scaling procedure for peripheral root clock by programmable
divider. The division is done on the fly without loss of clocks.
• Interface for the following IPs:
• PLL - Interfaces for each PLL
• LPCG - Low Power Clock Gating unit
• SRC - System Reset Controller
• GPC - General Power Controller
CCM_LPM CCM_CLK_LOGIC
clk
enable
signals
CCM_HND_SK
Low Power
Clock Gating
CCM_ANALOG (LPCG) System
Clocks
GPC SRC
CBCMR[PRE_PERIPH2_CLK_SEL] CBCDR[periph2_clk_sel] *
CCSR[STEP_SEL] CBCDR[MMDC_CH1_AXI_PODF]
CBCDR[periph2_clk2_podf]
PLL2 528 MMDC_CH1_CLK_ROOT
PFD0 352 /2 /1
CBCMR[PERIPH2_CLK2_SEL]
PFD1 594 CBCMR[PRE_PERIPH_CLK_SEL] CBCDR[MMDC_CH0_AXI_PODF]
PFD2 396 MMDC_CH0_CLK_ROOT MMDC
* OR'd with PLL Bypass (from JTAG)
cg /1 TZASC
CCSR[pll3_sw_clk_sel] * /2 CBCDR[AHB_PODF]
AHB_CLK_ROOT
cg
/4
CBCMR[PERIPH_CLK2_SEL] CBCDR[periph_clk_sel] * AIPSTZ -
CCM_PLL3_BYP AHB uSDHC
PLL3 480
OSC(24M)
pll3_sw_clk /1 CBCDR[IPG_PODF] ARM -
MMDC CH0
CBCDR[periph_clk2_podf] IPG_CLK_ROOT
PFD0 720 CSCMR1[USDHCn_CLK_SEL]
cg /2
PERCLK_CLK_ROOT
WDOG
/2
PLL_AUDIOn[POST_DIV_SELECT]
cg USDHC2
PLL4 650 /1 USDHC2_CLK_ROOT
CCM_ANALOG_MISC2n[VIDEO_DIV]
PLL5 650 /1 /1
PLL_VIDEOn[POST_DIV_SELECT]
cg /2 USDHC3_CLK_ROOT
USDHC3
APBH
cg /2 USDHC4_CLK_ROOT
USDHC4
CS1CDR[SSI1_CLK_PRED] CS1CDR[SSI1_CLK_PODF]
SSI1_CLK_ROOT
cg /4 /2 SSI
CS2CDR[SSI2_CLK_PRED] CS2CDR[SSI2_CLK_PODF]
SSI2_CLK_ROOT
cg /4 /2 SSI
CS1CDR[SSI3_CLK_PRED] CS1CDR[SSI3_CLK_PODF]
SSI3_CLK_ROOT
cg /4 /2 SSI
CSCMR1[SSIn_CLK_SEL] CBCMR[GPU2D_AXI_CLK_SEL]
cg GPU2D
CBCDR[AXI_ALT_SEL] GPU2D_AXI_CLK_ROOT
CBCDR[AXI_SEL] CBCMR[GPU3D_AXI_CLK_SEL]
cg GPU3D
GPU3D_AXI_CLK_ROOT
/2 CBCMR[PCIE_AXI_CLK_SEL]
CBCDR[AXI_PODF]
cg PCIE
AXI PCIE_AXI_CLK_ROOT
INDEX: CSCDR3[IPU1_HSP_CLK_SEL] VDO_AXI_CLK_ROOT cg
VDOA
CBCMR[VDO_AXI_CLK_SEL]
Static Divider AXI_CLK_ROOT DTCP
cg MLB
2-bit Divider cg
/4 cg /2
IPU1_HSP_CLK_ROOT DCIC
PLL3_120M
REGISTER[BIT]
ACLK_CLK_ROOT
PLL3 PFD3
PLL3 PFD2
PLL3 PFD0
PLL3 PFD1
PLL2 PFD2
PLL2 PFD1
PLL2 PFD0
pll3_sw_clk
AXI
AXI
PLL5
PLL4
PLL3 PFD3
PLL3 PFD2
PLL3 PFD0
PLL3 PFD1
PLL2 PFD2
PLL2 PFD1
PLL2 PFD0
MMDC CH0
pll3_sw_clk
CS2CDR[ENFC_CLK_SEL]
CS2CDR[ENFC_CLK_PRED]
ENFC_CLK_ROOT
PLL2 (528M) /2 /1 cg IOMUX
GPMI
CBCMR[GPU3D_CORE_CLK_SEL] CS2CDR[ENFC_CLK_PODF]
CBCMR[GPU3D_CORE_PODF]
GPU3D_CORE_CLK_ROOT
cg
/1 GPU3D
CBCMR[GPU3D_SHADER_CLK_SEL]
CBCMR[GPU3D_SHADER_PODF]
GPU3D_SHADER_CLK_ROOT
cg /1 GPU3D
CBCMR[VPU_AXI_CLK_SEL]
CSCDR1[VPU_AXI_PODF]
VPU_AXI_CLK_ROOT
cg /1 VPU
CHSCCDR[IPU1_DI0_CLK_SEL]
CHSCCDR[IPU1_DI0_PRE_CLK_SEL]
CHSCCDR[IPU1_DI0_PODF] ipp_di0_clk
ipp_di1_clk IPU1_DI0_CLK_ROOT
/3
ipu1_di0_pre_clk
cg IPU
CHSCCDR[IPU1_DI1_CLK_SEL]
CHSCCDR[IPU1_DI1_PRE_CLK_SEL] ipp_di0_clk
CHSCCDR[IPU1_DI1_PODF] ipp_di1_clk IPU1_DI1_CLK_ROOT
/3 IPU
ipu1_di1_pre_clk
cg
CSCDR2[IPU2_DI0_PRE_CLK_SEL] CSCDR2[IPU2_DI0_CLK_SEL]
ipp_di0_clk
CSCDR2[IPU2_DI0_PODF] ipp_di1_clk
IPU2_DI0_CLK_ROOT
cg
/3
ipu2_di0_pre_clk
IPU
CSCDR2[IPU2_DI1_PRE_CLK_SEL] CSCDR2[IPU2_DI1_CLK_SEL]
CSCDR2[IPU2_DI1_PODF] ipp_di0_clk
ipp_di1_clk IPU2_DI1_CLK_ROOT
ipu2_di1_pre_clk
cg /3 IPU
CS2CDR[LDB_DI0_CLK_SEL] LDB_DI0_SERIAL_CLK_ROOT
cg LDB
MMDC_CH1 /7
LDB_DI0_IPU
LDB_DI1_SERIAL_CLK_ROOT
CSCMR2[LDB_DI0_IPU_DIV] cg LDB
INDEX: LDB_DI1_IPU
MMDC_CH1
/7
CDCDR[HSI_TX_CLK_SEL]
Static Divider CSCMR2[LDB_DI1_IPU_DIV] CDCDR[HSI_TX_PODF]
CS2CDR[LDB_DI1_CLK_SEL] HSI_TX_CLK_ROOT
1-bit Divider PLL3_120M
cg /2 MIPI HSI
CDCDR[SPDIF0_CLK_SEL]
2-bit Divider CDCDR[SPDIF0_CLK_PRED] CDCDR[SPDIF0_CLK_PODF]
SPDIF0_CLK_ROOT
3-bit Divider
cg
/2 /8 SPDIF
CDCDR[SPDIF1_CLK_SEL]
6-bit Divider CDCDR[SPDIF1_CLK_PRED] CDCDR[SPDIF1_CLK_PODF]
SPDIF1_CLK_ROOT
MUX
cg /2 /8 ASRC
CSCMR2[ESAI_CLK_SEL]
LPCG Gating ESAI_CLK_ROOT
cg
Option
cg /2 /8 ESAI
CS1CDR[ESAI_CLK_PRED] CS1CDR[ESAI_CLK_PODF]
MUX SELECT
REGISTER[BIT]
cg /8 cg
/2
CAN_CLK_ROOT
CSCDR2[ECSPI_CLK_PODF] FLEXCAN
CSCMR2[CAN_CLK_PODF] ECSPI_CLK_ROOT
DIVIDER SELECT cg /1 ECSPI
CSCDR1[UART_CLK_PODF]
REGISTER[BIT] UART_CLK_ROOT
CLOCK ROOT OUT
cg
/6 /1 UART
HDMI
VIDEO_27M_CLK_ROOT
OF CCM
/4 /5 cg MIPI
VPU
(no CG for VPU)
1. System or module clocks that cannot be clock gated by software control are shaded gray in the Module Clock Gating
Enable column.
CCM_ANALOG_PLL_SYS_SS[STOP]
Spread spectrum range = Fref x
CCM_ANALOG_PLL_SYS_DENOM[B]
CCM_ANALOG_PLL_SYS_SS[STEP]
Modulation frequency = Fref x
2 x CCM_ANALOG_PLL_SYS_SS[STOP]
Although this PLL does have a DIV_SELECT register field, it is intended that this PLL
will only be run at the default frequency of 528 MHz.
This PLL also supports a Fractional-N synthesizer.
There are /1, /2, /4 post dividers for the Audio PLL. The output frequency can be set by
programming the fields in the CCM_ANALOG_PLL_AUDIO, and
CCM_ANALOG_MISC2 register sets according to the following equation.
PLL output frequency = Fref * (DIV_SELECT + NUM/DENOM)
Each PFD output generates a fractional multiplication of the associated PLL’s VCO
frequency. Where the output frequency is equal to Fvco*18/N, N can range from 12-35.
The PFDs allow for clock frequency changes without forcing the relock of the root PLL.
This feature is useful in support of dynamic voltage and frequency scaling (DVFS). See
CCM Analog Memory Map/Register Definition.
When the related PLL is powered up from the power down state or made to go through a
relock cycle due to PLL regrogramming, it is required that the related PFDx_CLKGATE
bit in CCM_ANALOG_PFD_480n or CCM_ANALOG_PFD_528n, be cycled on and off
(1 to 0) after PLL lock. The PFDs can be in the clock gated state during PLL relock but
must be un-clock gated only after lock is achieved. See the engineering bulletin,
Configuration of Phase Fractional Dividers (EB790) at www.nxp.com for procedure
details.
CCSR: pll1_sw_clk_sel
24MHz
OSC
1
osc_clk
0
GLITCHLESS MUX
PFD
step_clk
PFD2: 396M 1
PFD0: 352M
PFD1: 594M
PLL 2
(528M) pll2_main_clk
PFD2: 508.2M
PFD3: 454.7M
PLL3 0
pll3_sw_clk
pll3_main_clk
(480M)
CCM_PLL3_BYP
(PLL3 Bypass clock)
CCSR: pll3_sw_clk_sel
PLL_AUDIOn: POST_DIV_SELECT
PLL2 0
PFD2
CBCDR: axi_alt_sel
AXI_CLK_ROOT
1
CBCMR:
3 bit divider
periph_clk2_sel
default=2
CCGR3[CG10] MMDC_CH0_CLK_ROOT
burn_in_bist 2
periph_clk
3 bit divider
OSC_CLK cg
default=1
(24M) 1
pll2_bypass_clk 0 3 bit divider
default=1
CBCDR: periph_clk2_podf GLITCHLESS MUX CBCDR: mmdc_ch0_axi_podf
1
PLL2 0
PLL2 132M_CLK_ROOT
1 0 3 bit divider
PFD2 AHB_CLK_ROOT
default=4
PLL2 2
PFD0 NOTE: See System Clocks,
PLL2 3 Gating and Override table for
PFD2 /2 AHB_CLK_ROOT module
CBCDR: ahb_podf gating
CBCMR:
pre_periph_clk_sel CBCDR: IPG_CLK_ROOT
periph_clk_sel 3 bit divider
default=2
PLL_bypass_en2 (from jtag)
NOTE: See System Clocks,
Gating and Override table for
CBCMR: CBCDR: ipg_podf IPG_CLK_ROOT module
periph2_clk2_sel gating
CCGR1[CG12]
AXI_CLK_ROOT 0 (gpu2d_clk_enable)
cg GPU2D_AXI_CLK_ROOT
CBCMR: gpu2d_axi_clk_sel
CCGR1[CG13]
AXI_CLK_ROOT 0 (gpu3d_clk_enable)
cg GPU3D_AXI_CLK_ROOT
CBCMR: gpu3d_axi_clk_sel
CCGR4[CG0]
AXI_CLK_ROOT 0 (pcie_root_enable)
cg PCIE_AXI_CLK_ROOT
CBCMR: pcie_axi_clk_sel
MMDC_CH0_AXI_CLK_ROOT
0
PLL2 CCGR3[CG0]
PFD2
1 3 bit divider
cg IPU1_HSP_CLK_ROOT
default=2
PLL3 (120M) 2
PLL3
PFD1 3
MMDC_CH0_AXI_CLK_ROOT
0
PLL2 CCGR3[CG3]
1
PFD2 IPU2_HSP_CLK_ROOT
cg 3 bit divider
PLL3 (120M) 2 default=2
PLL3
PFD1 3
AXI_CLK_ROOT 0
VDO_AXI_CLK_ROOT
AHB_CLK_ROOT 1
CBCMR: vdo_axi_clk_sel
PLL2
divider
PFD2 PLL2 198M (198Mhz)
/2
CBCMR: gpu2d_core_podf
AXI_CLK_ROOT
0
CCGR1[CG12]
pll3_sw_clk 1 3 bit divider
cg
default=1
PLL2 2
PFD0
GPU2D_CORE_CLK_ROOT
PLL2 3
PFD2
CBCMR: gpu2d_clk_sel
CBCMR: gpu3d_clk_sel
CBCMR: gpu3d_shader_clk_sel
CBCDR1: vpu_axi_podf
AXI_CLK_ROOT
0 CCGR6[CG7]
PLL2 3 bit divider
1 cg VPU_AXI_CLK_ROOT
PFD2 default=1
PLL2
2
PFD0
CBCMR: vpu_axi_clk_sel
CSCDR1: usdhc1_podf
PLL2
0 CCGR6[CG0]
PFD2
3 bit divider
cg
PLL2 default=2 USDHC1_CLK_ROOT
PFD0 1
CSCMR1: usdhc1_clk_sel
CSCDR1: usdhc2_podf
PLL2
0 CCGR6[CG1]
PFD2
3 bit divider
cg
PLL2 default=2 USDHC2_CLK_ROOT
PFD0 1
CSCMR1: usdhc2_clk_sel
CSCDR1: usdhc3_podf
PLL2 CCGR6[CG2]
0
PFD2 3 bit divider
cg
PLL2 default=2 USDHC3_CLK_ROOT
PFD0
1
CSCMR1: usdhc3_clk_sel
CSCDR1: usdhc4_podf
PLL2 CCGR6[CG3]
PFD2 0
3 bit divider
cg
PLL2 default=2 USDHC4_CLK_ROOT
PFD0 1
CSCMR1: usdhc4_clk_sel
PLL3
PFD2
0 CCGR5[CG9]
PLL3 3 bit divider 6 bit divider
PFD3 1 cg SSI1_CLK_ROOT
default=4 default=2
PLL4 2
CSCMR1: ssi1_clk_sel
PLL3
PFD2 0 CCGR5[CG10]
PLL3 3 bit divider 6 bit divider
1 cg SSI2_CLK_ROOT
PFD3 default=4 default=2
PLL4 2
CSCMR1: ssi2_clk_sel
PLL3
PFD2 0 CCGR5[CG11]
PLL3 3 bit divider 6 bit divider
1 cg SSI3_CLK_ROOT
PFD3 default=4 default=2
PLL4 2
CSCMR1: ssi3_clk_sel
6 bit divider
IPG_CLK PERCLK_CLK_ROOT
default=1
IPG_CLK
CHSCCDR: ipu1_di0_pre_clk_sel
MMDC_CH0_AXI_CLK_ROOT
0
pll3_sw_clk 1
PLL5 2
PLL2 3
PFD0
PLL2 4
PFD2
PLL3 5
PFD1
CHSCCDR: ipu1_di0_podf
CHSCCDR: ipu1_di0_clk_sel
CCGR3[CG1]
3 bit divider
cg default=3 0
ipp_di0_clk 1
CCGR3[CG1]
ipp_di1_clk 2 cg IPU1_DI0_CLK_ROOT
ldb_di0_ipu 3
ldb_di1_ipu 4
CHSCCDR: ipu1_di1_pre_clk_sel
MMDC_CH0_AXI_CLK_ROOT
0
pll3_sw_clk 1
PLL5 2
PLL2 3
PFD0
PLL2 4
PFD2
PLL3 5
PFD1
CHSCCDR: ipu1_di1_podf
CHSCCDR: ipu1_di1_clk_sel
CCGR3[CG2]
3 bit divider
cg default=3 0
ipp_di0_clk 1
CCGR3[CG2]
ipp_di1_clk 2 cg IPU1_DI1_CLK_ROOT
ldb_di0_ipu 3
ldb_di1_ipu 4
CSCDR2: ipu2_di0_pre_clk_sel
MMDC_CH0_AXI_CLK_ROOT
0
pll3_sw_clk 1
PLL5 2
PLL2
3
PFD0
PLL2
4
PFD2 CSCDR2: ipu2_di0_podf
PLL3 5
PFD1
CSCDR2: ipu2_di0_clk_sel
CCGR3[CG4]
3 bit divider
cg default=3 0
ipp_di0_clk 1
CCGR3[CG4]
ipp_di1_clk 2 cg IPU2_DI0_CLK_ROOT
ldb_di0_ipu 3
ldb_di1_ipu 4
CSCDR2: ipu2_di1_pre_clk_sel
MMDC_CH0_AXI_CLK_ROOT
0
pll3_sw_clk 1
PLL5 2
PLL2
3
PFD0
PLL2 CSCDR2: ipu2_di1_podf
4
PFD2
PLL3 5
PFD1 CSCDR2: ipu2_di1_clk_sel
CCGR3[CG5]
3 bit divider
cg default=3 0
ipp_di0_clk 1
CCGR3[CG5]
ipp_di1_clk 2 cg IPU2_DI1_CLK_ROOT
ldb_di0_ipu 3
ldb_di1_ipu 4
CSCMR2: can_clk_podf
CCGR0[CG8] | [CG10]
6 bit divider
PLL3 60M cg CAN_CLK_ROOT
default=2
CS2CDR: ldb_di0_clk_sel
PLL5
0 CCGR3[CG6]
PLL2 LDB_DI0_SERIAL_CLK_ROOT
1 cg
PFD0
PLL2 2
PFD2 CSCMR2: ldb_di0_ipu_div
MMDC_CH1_AXI_CLK_ROOT 3
CSCMR2: ldb_di1_clk_sel
PLL5
0 CCGR3[CG7]
PLL2 LDB_DI1_SERIAL_CLK_ROOT
1 cg
PFD0
PLL2 2
PFD2 CSCMR2: ldb_di1_ipu_div
MMDC_CH1_AXI_CLK_ROOT 3
CDCDR: spdif0_clk_pred
PLL3
PFD2 1 CCGR5[CG7]
pll3_sw_clk 3
CDCDR: spdif0_clk_sel
CDCDR: spdif1_clk_pred
PLL3
PFD2 1
3 bit divider 3 bit divider SPDIF1_CLK_ROOT
PLL3 default=2 default=8
2
PFD3
Note: SPDIF1_CLK_ROOT
pll3_sw_clk 3 is used by ASRC.
CDCDR: spdif1_clk_sel
CS1CDR: esai_clk_pred
pll3_sw_clk 3
CSCMR2: esai_clk_sel
CSCDR2: ecspi_clk_podf
pll3_sw_clk 1 CCGR6[CG5]
PLL2
PFD0 3
CSCMR1: aclk_eim_slow_sel
PLL2
0 CSCMR1: aclk_podf
PFD2
pll3_sw_clk 1
3 bit divider ACLK_CLK_ROOT
default=8 (MIPI_CLK_ROOT)
AXI_CLK_ROOT 2
PLL2
PFD0 3
CSCMR1: aclk_sel
PLL2
0 CS2CDR: enfc_clk_pred CS2CDR: enfc_clk_podf
PFD0
PLL2 1
3 bit divider 6 bit divider ENFC_CLK_ROOT
pll3_sw_clk default=2 default=1
2 Note: See System Clocks,
Gating and Override table
PLL2 for ENFC_CLK_ROOT
PFD2 3
module gating
Note: ENFC_CLK_ROOT
is controlled by CG bits in
CS2CDR: enfc_clk_sel the IOMUXC and GPMI
Modules
CDCDR1: uart_clk_podf
6 bit divider
UART_CLK_ROOT
PLL3_80M
default=1
Note: See System, Clocks,
and Override table for
UART_CLK_ROOT
module gating
CDCDR: hsi_tx_podf
PLL3_120M 0 CCGR3[CG8]
CDCDR: hsi_tx_clk_sel
NOTE
All 6-bit PODF dividers found in the diagrams above can
operate on low frequency.
• [2:0] init_axi_podf
• [2:0] init_mmdc_ch0_axi_podf
• [2:0] init_periph_clk2_podf
• init_periph_clk_sel
• init_periph2_clk_sel
There are a multitude of multiplexers available throughout the clock generation logic that
provide alternate clock sources for the system clocks controlled by the CCM. The CCM
uses several synchronous glitchless clock multiplexers as well as asynchronous glitchy
clock multiplexers.
Synchronous muxes ensure there are no glitches between the transition of two
asynchronous clocks and that there will be no pulses that are of a frequency higher than
either input clock. For the synchronous multiplexer to work properly, both the current
clock and the clock to be selected must remain active during the entire selection process.
There are several glitchless (synchronous) muxes used in the CCM. The table below lists
the muxes and the respective control bits.
Table 18-5. Glitchless Multiplexers
Glitchless Mux Mux Select Bit Handshake Bit
periph_clk_mux CBCDR[periph_clk_sel] CDHIPR[periph_clk_sel_busy]
periph2_clk_mux CBCDR[periph2_clk_sel] CDHIPR[periph2_clk_sel_busy]
axi_alt_clk_mux CBCDR[ axi_sel]
pll3_sw_clk_mux CCSR[pll3_sw_clk_sel]
pll1_sw_clk_mux CCSR[pll1_sw_clk_sel]
NOTE
Any change of the periph_clk_sel and periph2_clk_sel sync
mux select will involve handshake with the MMDC. Refer to
the CCDR and CDHIPR registers for the handshake bypass and
busy bits.
Table 18-6. Multiplexers
Signal Mux Select Bit Glitchless
pll1_sw_clk CCSR[pll1_sw_clk_sel] Yes
step_clk CCSR[step_sel] No
pll3_sw_clk CCSR[pll3_sw_clk_sel] Yes
axi_alt CBCDR[axi_alt_sel] No
AXI_CLK_ROOT CBCDR[axi_sel] Yes
periph_clk2 CBCMR[periph_clk2_sel] No
periph_clk CBCDR[periph_clk_sel] Yes
pre_periph_clk CBCMR[pre_periph_clk_sel] No
periph2_clk2 CBCMR[periph2_clk2_sel] No
pre_periph2_clk CBCMR[pre_periph2_clk_sel] No
periph2_clk CBCDR[periph2_clk_sel] Yes
GPU2D_AXI_CLK_ROOT CBCMR[gpu2d_axi_clk_sel] No
GPU3D_AXI_CLK_ROOT CBCMR[gpu3d_axi_clk_sel] No
For critical system bus clocks, changing the clock source can be done in the CCM using
the glitchless clock muxes in Figure 18-5. In the figure, the thick bar on the input side
indicates the glitchless muxes. Those without the thick bar are regular muxes (not
glitchless).
For example, before disabling PLL2, software can switch the FABRIC_CLK_ROOT
away from the PLL2 or one of its PFDs by programming
CBCMR[PERIPH2_CLK2_SEL] and CBCDR[PERIPH2_CLK2_PODF] to provide an
appropriate frequency clock, then glitchlessly switch to it by programming
CBCDR[PERIPH2_CLK_SEL].
The following figure describes the clock split inside the LPCG module. It describes the
case of two modules; one module is without an enable signal and one is shown with an
enable signal. SRC enable signals and sync flip flops are omitted from this figure.
clock_root
Module 2
CGR
Module 2 enable module 2 clock Gated clock for module 2
NOTE
MMDC handshakes can be masked.
As part of the WFI routine, alternative interrupt controller in GPC should be updated; the
CPU platform interrupt controller will be disabled first by software and will be not
functional, due to clock gating. Interrupts during WAIT mode are monitored by
alternative interrupt controller.
After execution of the WFI routine, the CPU platform will assert idle signals for each
component of the platform and CCM will gate clock to the platform.
The next actions can be programmed during WAIT mode:
1. CCM requests an acknowledge to close clocks to MMDC if its CGR bits indicate to
close its clocks on WAIT mode, and if those clocks are not already closed in run
mode. The request will be issued if the handshake is not bypassed by programing the
CLPCR register. If the corresponding bits are set, the request signal will not be
issued to the corresponding module and CCM will not wait for its acknowledge in
the process of entering low power mode. After CCM receives all the acknowledge
signals needed, then it will enter WAIT mode.
2. Close the clocks to the modules which were defined to be shut at WAIT mode in the
CCGR bits.
3. Observability to indicate WAIT mode.
NOTE
Setting MMDC CGR bits to 01 can hang the entire system since
the MMDC clock and fabric clock share the same clock root.
Any enabled interrupt assertion will start the exit from WAIT mode.
After clocks to modules are gated, the following actions will be taken:
• PLLs are disabled
• CCM_PMIC_STBY_REQ asserted, if vstby bit is set
• osc_en signal is negated
• osc_pwrdn is asserted, if sbyos bit is set
Counter will be triggered after CCM_PMIC_STBY_REQ assertion to allow to external
regulator or PMIC to decrease voltage until valid voltage range. On counter completion,
stop_mode signal will be asserted, that will trigger disabling analog elements in anatop.
CCM's low power state machine will remain in state STOP_GPC until STOP mode is
exited.
After the system is in run mode, the ccm_ipg_stop and system_in_stop_mode signals
negate.
NOTE
The register reset values for CCM change depending on the
boot configuration. See Clocks at boot time for more
information.
CCM memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
20C_4000 CCM Control Register (CCM_CCR) 32 R/W 0401_16FFh 18.6.1/668
20C_4004 CCM Control Divider Register (CCM_CCDR) 32 R/W 0000_0000h 18.6.2/670
20C_4008 CCM Status Register (CCM_CSR) 32 R 0000_0010h 18.6.3/671
20C_400C CCM Clock Switcher Register (CCM_CCSR) 32 R/W 0000_0100h 18.6.4/672
20C_4010 CCM Arm Clock Root Register (CCM_CACRR) 32 R/W 0000_0000h 18.6.5/674
20C_4014 CCM Bus Clock Divider Register (CCM_CBCDR) 32 R/W 0001_8D00h 18.6.6/675
20C_4018 CCM Bus Clock Multiplexer Register (CCM_CBCMR) 32 R/W 0002_0324h 18.6.7/678
20C_401C CCM Serial Clock Multiplexer Register 1 (CCM_CSCMR1) 32 R/W 00F0_0000h 18.6.8/681
20C_4020 CCM Serial Clock Multiplexer Register 2 (CCM_CSCMR2) 32 R/W 02B9_2F06h 18.6.9/683
18.6.10/
20C_4024 CCM Serial Clock Divider Register 1 (CCM_CSCDR1) 32 R/W 0049_0B00h
685
18.6.11/
20C_4028 CCM SSI1 Clock Divider Register (CCM_CS1CDR) 32 R/W 0EC1_02C1h
687
18.6.12/
20C_402C CCM SSI2 Clock Divider Register (CCM_CS2CDR) 32 R/W 0007_36C1h
688
18.6.13/
20C_4030 CCM D1 Clock Divider Register (CCM_CDCDR) 32 R/W 33F7_1F92h
690
18.6.14/
20C_4034 CCM HSC Clock Divider Register (CCM_CHSCCDR) 32 R/W 0002_A150h
692
18.6.15/
20C_4038 CCM Serial Clock Divider Register 2 (CCM_CSCDR2) 32 R/W 0002_A150h
695
18.6.16/
20C_403C CCM Serial Clock Divider Register 3 (CCM_CSCDR3) 32 R/W 0001_0841h
697
CCM Divider Handshake In-Process Register 18.6.17/
20C_4048 32 R 0000_0000h
(CCM_CDHIPR) 699
18.6.18/
20C_4054 CCM Low Power Control Register (CCM_CLPCR) 32 R/W 0000_0079h
702
Table continues on the next page...
The figure below represents the CCM Control Register (CCR), which contains bits to
control general operation of CCM. The table below provides its field descriptions.
Address: 20C_4000h base + 0h offset = 20C_4000h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 RBC_EN 0
REG_BYPASS_COUNT WB_COUNT
W
Reset 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
COSC_EN
R 0 0
OSCNT
W
Reset 0 0 0 1 0 1 1 0 1 1 1 1 1 1 1 1
1 REG_BYPASS_COUNTER enabled.
0 REG_BYPASS_COUNTER disabled
26–21 Counter for analog_reg_bypass signal assertion after standby voltage request by PMIC_STBY_REQ.
REG_BYPASS_ Should be zeroed and reconfigured after exit from low power mode.
COUNT
REG_BYPASS_COUNT can also be used for holding off interrupts when the PGC unit is sending signals
to power gate the core.
000000 no delay
000001 1 CKIL clock period delay
111111 63 CKIL clock periods delay
20–19 This read-only field is reserved and always has the value 0.
Reserved
18–16 Well Bias counter. Delay, defined by this value, counted by CKIL clock will be applied till well bias is
WB_COUNT enabled at exit from wait or stop low power mode. Counter will be used if wb_core_at_lpm or
wb_per_at_lpm bits are set. Should be zeroed and reconfigured after exit from low power mode.
000 no delay
Table continues on the next page...
The figure below represents the CCM Control Divider Register (CCDR), which contains
bits that control the loading of the dividers that need handshake with the modules they
affect. The table below provides its field descriptions.
Address: 20C_4000h base + 4h offset = 20C_4004h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MMDC_CH0_
MMDC_CH1_
R 0
MASK
MASK
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The figure below represents the CCM status Register (CSR). The status bits are read-only
bits. The table below provides its field descriptions.
Address: 20C_4000h base + 8h offset = 20C_4008h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
COSC_READY
REF_EN_B
R 0 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
The figure below represents the CCM Clock Switcher register (CCSR). The CCSR
register contains bits to control the switcher sub-module dividers and multiplexers. The
table below provides its field descriptions.
Address: 20C_4000h base + Ch offset = 20C_400Ch
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
pll2_pfd1_594m_dis_mask
SECONDARY_CLK_SEL
PLL1_SW_CLK_SEL
PLL3_SW_CLK_SEL
pll3_pfd1_dis_mask
pll3_pfd0_dis_mask
pll3_pfd3_dis_mask
pll3_pfd2_dis_mask
pll2_pfd0_dis_mask
pll2_pfd2_dis_mask
R 0
STEP_SEL
Reserved
Reset 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
NOTE: This mux is allowed to be changed only if its output is not used, i.e. Arm uses the output of pll1,
and step_clk is not used.
The figure below represents the CCM Arm Clock Root register (CACRR). The CACRR
register contains bits to control the Arm clock root generation. The table below provides
its field descriptions.
Address: 20C_4000h base + 10h offset = 20C_4010h
Bit 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
R 0 ARM_
W PODF
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: If arm_freq_shift_divider is set to '1' then any new write to arm_podf will be held until
arm_clk_switch_req signal is asserted.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
The figure below represents the CCM Bus Clock Divider Register (CBCDR). The
CBCDR register contains bits to control the clock generation sub module dividers. The
table below provides its field descriptions.
Address: 20C_4000h base + 14h offset = 20C_4014h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PERIPH2_CLK_
PERIPH_CLK_
R
PERIPH_CLK2_ SEL
SEL
Reserved Reserved mmdc_ch0_axi_podf AXI_PODF
PODF
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
AXI_
AXI_ PERIPH2_CLK2_
Reserved AHB_PODF IPG_PODF ALT_ mmdc_ch1_axi_podf
SEL PODF
SEL
W
Reset 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0
NOTE: Any change of this sync mux select will involve handshake with the MMDC. Refer to the CCDR
and CDHIPR registers for the handshake bypass and busy bits.
0 PLL2 (pll2_main_clk)
1 derive clock from periph_clk2_clk clock source.
24–22 This field is reserved.
- Reserved
21–19 Divider for mmdc_ch0_axi podf.
mmdc_ch0_axi_
podf 000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
18–16 Divider for axi podf.
AXI_PODF
NOTE: Any change of this divider might involve handshake with EMIand IPU. See CDHIPR register for
the handshake busy bits.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
15–13 This field is reserved.
- Reserved
12–10 Divider for AHB PODF.
AHB_PODF
NOTE: Any change of this divider might involve handshake with EMIand IPU. See CDHIPR register for
the handshake busy bits.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
Table continues on the next page...
00 divide by 1
01 divide by 2
10 divide by 3
11 divide by 4
7 AXI alternative clock select
AXI_ALT_SEL
0 PLL2 PFD2 will be selected as alternative clock for AXI root clock
1 PLL3 PFD1 will be selected as alternative clock for AXI root clock
6 AXI clock source select
AXI_SEL
0 Periph_clk output will be used as AXI clock root
1 AXI alternative clock will be used as AXI clock root
5–3 Divider for mmdc_ch1_axi podf.
mmdc_ch1_axi_ NOTE: This design implementation does not use MMDC_CH1_CLK_ROOT as a clock source to the
podf MMDC. Only MMDC_CH0_CLK_ROOT is used.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
PERIPH2_CLK2_ Divider for periph2_clk2 podf.
PODF
NOTE: Divider should be updated when output clock is gated.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PERIPH2_CLK2_
R
PRE_ PRE_
gpu2d_core_clk_ gpu2d_core_
SEL
gpu3d_shader_podf gpu3d_core_podf PERIPH2_ PERIPH_
podf clk_sel
CLK_SEL CLK_SEL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
pcie_axi_clk_sel
gpu3d_axi_clk_
gpu2d_axi_clk_
vdoaxi_clk_sel
R
gpu3d_
VPU_AXI_ PERIPH_ gpu3d_core_
shader_clk_ Reserved Reserved
sel
sel
CLK_SEL CLK2_SEL clk_sel
sel
W
Reset 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
Table continues on the next page...
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
25–23 Divider for gpu2d_core clock.
gpu2d_core_clk_
podf NOTE: Divider should be updated when output clock is gated.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
22–21 Selector for pre_periph2 clock multiplexer
PRE_PERIPH2_
CLK_SEL 00 derive clock from PLL2
01 derive clock from PLL2 PFD2
10 derive clock from PLL2 PFD0
11 derive clock from divided (/2) PLL2 PFD2
20 Selector for periph2_clk2 clock multiplexer
PERIPH2_CLK2_
SEL 0 derive clock from pll3_sw_clk
1 derive clock from PLL2 Main
19–18 Selector for pre_periph clock multiplexer
PRE_PERIPH_
CLK_SEL 00 derive clock from PLL2
01 derive clock from PLL2 PFD2
10 derive clock from PLL2 PFD0
11 derive clock from divided (/2) PLL2 PFD2
17–16 Selector for open vg (GPU2D Core) clock multiplexer
gpu2d_core_clk_
sel 00 derive clock from AXI
01 derive clock from pll3_sw_clk
10 derive clock from PLL2 PFD0
11 derive clock from PLL2 PFD2
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
USDHC4_CLK_SEL
USDHC3_CLK_SEL
USDHC2_CLK_SEL
USDHC1_CLK_SEL
R 0
Reserved
ACLK_EIM_ ACLK_EIM_SLOW_
ACLK_SEL ACLK_PODF
SLOW_SEL PODF
Reset 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
000000 divide by 1
000001 divide by 2
000010 divide by 3
000011 divide by 4
000100 divide by 5
000101 divide by 6
000110 divide by 7
111111 divide by 64
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
ESAI_CLK_
Reserved Reserved
SEL
W
Reset 0 0 0 0 0 0 1 0 1 0 1 1 1 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LDB_DI1_IPU_
LDB_DI0_IPU_
R
DIV
DIV
Reserved Reserved CAN_CLK_PODF Reserved
W
Reset 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 VPU_AXI_PODF USDHC4_PODF USDHC3_PODF USDHC2_PODF
W
Reset 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
Reserved USDHC1_PODF Reserved UART_CLK_PODF
Reset 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
24–22 Divider for usdhc4 clock pred.
USDHC4_PODF
NOTE: Divider should be updated when output clock is gated.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
Table continues on the next page...
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
18–16 Divider for usdhc2 clock.
USDHC2_PODF
NOTE: Divider should be updated when output clock is gated.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
15–14 This field is reserved.
- Reserved
13–11 Divider for usdhc1 clock podf.
USDHC1_PODF
NOTE: Divider should be updated when output clock is gated.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
10–6 This field is reserved.
- Reserved.
UART_CLK_ Divider for uart clock podf.
PODF
000000 divide by 1
111111 divide by 2^6
The figure below represents the CCM ESAI, SSI1, and SSI3 Clock Divider Register
(CS1CDR). The CS1CDR register contains bits to control the SSI1 and SSI3 clock
generation dividers. The table below provides its field descriptions.
Address: 20C_4000h base + 28h offset = 20C_4028h
Bit 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
R 0 ESAI_ SSI3_ 0 ESAI_ SSI1_
CLK_ CLK_ SSI3_CLK_PODF CLK_ CLK_ SSI1_CLK_PODF
W
PODF PRED PRED PRED
Reset 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1
000000 divide by 1
111111 divide by 2^6
The figure below represents the CCM SSI2, LDB Clock Divider Register (CS2CDR).
The CS2CDR register contains bits to control the SSI2 clock generation dividers, and ldb
serial clocks select. The table below provides its field descriptions.
Address: 20C_4000h base + 2Ch offset = 20C_402Ch
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 ENFC_CLK_
ENFC_CLK_PODF ENFC_CLK_PRED
W SEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 LDB_DI1_CLK_SEL LDB_DI0_CLK_SEL SSI2_CLK_PRED SSI2_CLK_PODF
W
Reset 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 1
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
17–16
ENFC_CLK_SEL Selector for enfc clock multiplexer
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
SSI2_CLK_ Divider for ssi2 clock podf.
PODF The input clock to this divider should be lower than 300Mhz, the predivider can be used to achieve this.
000000 divide by 1
111111 divide by 2^6
The figure below represents the CCM DI Clock Divider Register (CDCDR). The table
below provides its field descriptions.
Address: 20C_4000h base + 30h offset = 20C_4030h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
HSI_TX_CLK_
SPDIF0_
SEL
Reset 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
Reserv SPDIF1_
SPDIF1_CLK_PRED SPDIF1_CLK_PODF Reserved
ed CLK_SEL
W
Reset 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
28 Selector for hsi_tx clock multiplexer
HSI_TX_CLK_
SEL 0 derive from pll3_120M clock
1 derive clock from PLL2 PFD2
27–25 Divider for spdif0 clock pred.
SPDIF0_CLK_
PRED NOTE: Divider should be updated when output clock is gated.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
21–20 Selector for spdif0 clock multiplexer
SPDIF0_CLK_
SEL 00 derive clock from PLL4 divided clock
01 derive clock from PLL3 PFD2
10 derive clock from PLL3 PFD3
11 derive clock from pll3_sw_clk
19–15 This field is reserved.
- Reserved
000 divide by 1
111 divide by 8
8–7 Selector for spdif1 clock multiplexer
SPDIF1_CLK_
SEL NOTE: Used for ASRC clock, not related to SPDIF module
The figure below represents the CCM HSC Clock Divider Register (CHSCCDR). The
CHSCCDR register contains bits to control the ipu di clock generation dividers. The table
below provides its field descriptions.
Address: 20C_4000h base + 34h offset = 20C_4034h
Bit 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
R 0 ipu1_di1_ ipu1_di0_
ipu1_di1_ ipu1_di1_ ipu1_di0_ ipu1_di0_
pre_clk_ pre_clk_
W podf clk_sel podf clk_sel
sel sel
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
11–9
ipu1_di1_clk_sel Selector for ipu1 di1 root clock multiplexer
NOTE: Multiplexor should only be updated when the output clock is gated. Please refer to System Clocks
for the respective output clock gating bits.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
ipu1_di0_clk_sel
Selector for ipu1 di0 root clock multiplexer
NOTE: Multiplexor should only be updated when the output clock is gated. Please refer to System Clocks
for the respective output clock gating bits.
The figure below represents the CCM Serial Clock Divider Register 2(CSCDR2). The
CSCDR2 register contains bits to control the clock generation sub-module dividers. The
table below provides its field descriptions.
Address: 20C_4000h base + 38h offset = 20C_4038h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ipu2_di1_pre_clk_sel
R
Reserved
Reserved ECSPI_CLK_PODF
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ipu2_di1_pre_clk_sel
ipu2_di0_pre_clk_sel
Reset 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0
NOTE: The input clock to this divider should be lower than 300Mhz, the predivider can be used to
achieve this.
000000 divide by 1
111111 divide by 2^6
18 This field is reserved.
- Reserved
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
11–9
ipu2_di1_clk_sel Selector for ipu1 di2 root clock multiplexer
NOTE: Multiplexor should only be updated when the output clock is gated. Please refer to System Clocks
for the respective output clock gating bits.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
ipu2_di0_clk_sel
Selector for ipu2 di0 root clock multiplexer
NOTE: Multiplexor should be updated only when the output clock is gated.
The figure below represents the CCM Serial Clock Divider Register 3(CSCDR3). The
CSCDR3 register contains bits to control the clock generation sub-module dividers. The
table below provides its field descriptions.
Address: 20C_4000h base + 3Ch offset = 20C_403Ch
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 ipu2_hsp_podf
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
ipu2_hsp_ ipu1_hsp_
ipu1_hsp_podf Reserved
W clk_sel clk_sel
Reset 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
15–14 Selector for ipu2_hsp clock multiplexer
ipu2_hsp_clk_sel
00 derive clock from mmdc_ch0 clock
01 derive clock from PLL2 PFD2
10 derive clock from pll3_120M
11 derive clock from PLL3 PFD1
13–11 Divider for ipu1_hsp clock.
ipu1_hsp_podf
NOTE: Divider should be updated when output clock is gated.
000 divide by 1
001 divide by 2
010 divide by 3
011 divide by 4
100 divide by 5
101 divide by 6
110 divide by 7
111 divide by 8
10–9 Selector for ipu1_hsp clock multiplexer
ipu1_hsp_clk_sel
00 derive clock from mmdc_ch0 clock
01 derive clock from PLL2 PFD2
10 derive clock from pll3_120M
11 derive clock from PLL3 PFD1
- This field is reserved.
Reserved
The figure below represents the CCM Divider Handshake In-Process Register
(CDHIPR). The CDHIPR register contains read-only bits that indicate that CCM is in the
process of updating dividers or muxes that might need handshake with modules.
Address: 20C_4000h base + 48h offset = 20C_4048h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ARM_PODF_BUSY
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PERIPH2_CLK_SEL_BUSY
PERIPH_CLK_SEL_BUSY
mmdc_ch0_podf_busy
mmdc_ch1_podf_busy
AHB_PODF_BUSY
AXI_PODF_BUSY
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The figure below represents the CCM Low Power Control Register (CLPCR). The
CLPCR register contains bits to control the low power modes operation.The table below
provides its field descriptions.
Address: 20C_4000h base + 54h offset = 20C_4054h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BYPASS_MMDC_CH1_
BYPASS_MMDC_CH0_
MASK_CORE0_WFI
MASK_L2CC_IDLE
R 0 MASK_SCU_IDLE 0 0
mask_core3_wfi
mask_core2_wfi
mask_core1_wfi
wb_per_at_lpm
Reserved
LPM_HS
LPM_HS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ARM_CLK_DIS_ON_LPM
COSC_PWRDOWN
R 0
Reserved
DIS_
SBYOS
VSTBY
STBY_
REF_ Reserved LPM
COUNT
OSC
W
Reset 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1
NOTE: MMDC_CH0 clock is not used. This bit should always be programmed HIGH to let CCM know not
to wait for the acknowledge from MMDC_CH0, due to no connection.
0 Handshake with mmdc_ch0 on next entrance to low power mode will be performed.
1 Handshake with mmdc_ch0 on next entrance to low power mode will be bypassed.
18 This read-only field is reserved and always has the value 0.
Reserved
17 This field is reserved.
- Reserved
16 Enable periphery charge pump for well biasing at low power mode (stop or wait)
wb_per_at_lpm
0 Periphery charge pump won't be enabled at STOP or WAIT low power modes
1 Periphery charge pump will be enabled at STOP or WAIT low power modes
15–12 This read-only field is reserved and always has the value 0.
Reserved
0 Voltage will not be changed to standby voltage after next entrance to STOP mode.
( PMIC_STBY_REQ will remain negated - '0')
1 Voltage will be requested to change to standby voltage after next entrance to stop mode.
( PMIC_STBY_REQ will be asserted - '1').
7 dis_ref_osc - in run mode, software can manually control closing of external reference oscillator clock, i.e.
DIS_REF_OSC generating '1' on CCM_REF_EN_B signal. If software closed manually the external reference clock, then
sbyos functionality will be bypassed.
The manual closing of external reference oscilator should be performed only in case the reference
oscilator is not the source of any clock generation.
NOTE: When returning from stop mode, the PMIC_STBY_REQ will be deasserted (if it was asserted
when entering stop mode). See stby_count bits.
0 On-chip oscillator will not be powered down, after next entrance to STOP mode. (CCM_REF_EN_B
will remain asserted - '0' and cosc_pwrdown will remain de asserted - '0')
1 On-chip oscillator will be powered down, after next entrance to STOP mode. (CCM_REF_EN_B will
be deasserted - '1' and cosc_pwrdown will be asserted - '1'). When returning from STOP mode,
external oscillator will be enabled again, on-chip oscillator will return to oscillator mode, and after
oscnt count, CCM will continue with the exit from the STOP mode process.
5 Define if Arm clocks (arm_clk, soc_mxclk, soc_pclk, soc_dbg_pclk, vl_wrck) will be disabled on wait
ARM_CLK_DIS_ mode. This is useful for debug mode, when the user still wants to simulate entering wait mode and still
ON_LPM keep Arm clock functioning.
NOTE: Software should not enable Arm power gating in wait mode if this bit is cleared.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
mmdc_ch0_podf_loaded
mmdc_ch1_podf_loaded
ARM_PODF_LOADED
AHB_PODF_LOADED
PERIPH2_CLK_SEL_
AXI_PODF_LOADED
PERIPH_CLK_SEL_
LOADED
LOADED
R 0 0 0 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
COSC_READY
LRF_PLL
R 0 0
W w1c w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The figure below represents the CCM Interrupt Mask Register (CIMR). The table below
provides its field descriptions.
Address: 20C_4000h base + 5Ch offset = 20C_405Ch
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
mask_mmdc_ch0_axi_podf_loaded
1 1 1
MASK_PERIPH2_CLK_SEL_LOADED
R
MASK_PERIPH_CLK_SEL_LOADED
mask_mmdc_ch0_podf_loaded
mask_mmdc_ch1_podf_loaded
MASK_AHB_PODF_LOADED
MASK_AXI_PODF_LOADED
ARM_PODF_LOADED
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 1 1
MASK_COSC_READY
MASK_LRF_PLL
W
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The figure below represents the CCM Clock Output Source Register (CCOSR). The
CCOSR register contains bits to control the clocks that will be generated on the output
ipp_do_clko1 (CCM_CLKO1) and ipp_do_clko2 (CCM_CLKO2).The table below
provides its field descriptions.
Address: 20C_4000h base + 60h offset = 20C_4060h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CLKO2_EN
R
CLKO2_DIV CLKO2_SEL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0
CLKO1_EN
CLK_OUT_
R
SEL
CLKO1_DIV CLKO1_SEL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Fast PLL enable. Can be used to engage PLL faster after STOP mode, if 24MHz OSC
was active
Address: 20C_4000h base + 64h offset = 20C_4064h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
INT_MEM_CLK_LPM
R 0
FPL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EFUSE_PROG_SUPPLY_
PMIC_DELAY_SCALER
MMDC_EXT_CLK_DIS
R 1 0 1
Reserved
GATE
W 1
Reset 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0
NOTE: This bit should always bet set when the CCM_CLPCR_LPM bits are set to 01(WAIT Mode) or 10
(STOP mode) without power gating. This bit does not have to be set for STOP mode entry.
0 Disable the clock to the Arm platform memories when entering Low Power Mode
1 Keep the clocks to the Arm platform memories enabled only if an interrupt is pending when entering
Low Power Modes (WAIT and STOP without power gating)
16 Fast PLL enable.
FPL
Table continues on the next page...
Module should be stopped, before set its bits to "0"; clocks to the module will be stopped
immediately.
The tables above show the register mappings for the different CGRs. The clock
connectivity table should be used to match the "CCM output affected" to the actual
clocks going into the modules.
The figure below represents the CCM Clock Gating Register 0 (CCM_CCGR0). The
clock gating Registers define the clock gating for power reduction of each clock (CG(i)
bits). There are 7 CGR registers. The number of registers required is according to the
number of peripherals in the system.
Address: 20C_4000h base + 68h offset = 20C_4068h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
CG15 CG14 CG13 CG12 CG11 CG10 CG9 CG8
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CG7 CG6 CG5 CG4 CG3 CG2 CG1 CG0
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The figure below represents the CCM Clock Gating Register 1(CCM_CCGR1). The
clock gating registers define the clock gating for power reduction of each clock (CG(i)
bits). There are 8 CGR registers. The number of registers required is determined by the
number of peripherals in the system.
Address: 20C_4000h base + 6Ch offset = 20C_406Ch
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
CG15 CG14 CG13 CG12 CG11 CG10 CG9 CG8
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CG7 CG6 CG5 CG4 CG3 CG2 CG1 CG0
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The figure below represents the CCM Clock Gating Register 2 (CCM_CCGR2). The
clock gating registers define the clock gating for power reduction of each clock (CG(i)
bits). There are 8 CGR registers. The number of registers required is determined by the
number of peripherals in the system.
Address: 20C_4000h base + 70h offset = 20C_4070h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
CG15 CG14 CG13 CG12 CG11 CG10 CG9 CG8
Reset 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CG7 CG6 CG5 CG4 CG3 CG2 CG1 CG0
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The figure below represents the CCM Clock Gating Register 3 (CCM_CCGR3). The
clock gating Registers define the clock gating for power reduction of each clock (CG(i)
bits). There are 8 CGR registers. The number of registers required is determined by the
number of peripherals in the system.
Address: 20C_4000h base + 74h offset = 20C_4074h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
CG15 CG14 CG13 CG12 CG11 CG10 CG9 CG8
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CG7 CG6 CG5 CG4 CG3 CG2 CG1 CG0
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The figure below represents the CCM Clock Gating Register 4 (CCM_CCGR4). The
clock gating Registers define the clock gating for power reduction of each clock (CG(i)
bits). There are 8 CGR registers. The number of registers required is determined by the
number of peripherals in the system.
Address: 20C_4000h base + 78h offset = 20C_4078h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
CG15 CG14 CG13 CG12 CG11 CG10 CG9 CG8
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CG7 CG6 CG5 CG4 CG3 CG2 CG1 CG0
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The figure below represents the CCM Clock Gating Register 5 (CCM_CCGR5). The
clock gating Registers define the clock gating for power reduction of each clock (CG(i)
bits). There are 8 CGR registers. The number of registers required is determined by the
number of peripherals in the system.
Address: 20C_4000h base + 7Ch offset = 20C_407Ch
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
CG15 CG14 CG13 CG12 CG11 CG10 CG9 CG8
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CG7 CG6 CG5 CG4 CG3 CG2 CG1 CG0
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The figure below represents the CCM Clock Gating Register 6 (CCM_CCGR6). The
clock gating Registers define the clock gating for power reduction of each clock (CG(i)
bits). There are 8 CGR registers. The number of registers required is determined by the
number of peripherals in the system.
Address: 20C_4000h base + 80h offset = 20C_4080h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
CG15 CG14 CG13 CG12 CG11 CG10 CG9 CG8
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
CG7 CG6 CG5 CG4 CG3 CG2 CG1 CG0
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The following figure represents the CCM Module Enable Override Register (CMEOR).
The CMEOR register contains bits to override the clock enable signal from the module.
This bit is applicable only for modules whose clock enable signals are used. The
following table provides its field descriptions.
Address: 20C_4000h base + 88h offset = 20C_4088h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
mod_en_ov_can1_
mod_en_ov_can2_
R 1 1 1
cpi
cpi
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
mod_en_ov_gpu3d
mod_en_ov_gpu2d
mod_en_ov_vdoa
mod_en_ov_dap
mod_en_ov_vpu
mod_en_ov_epit
mod_en_ov_gpt
mod_en_usdhc
R 1 1
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
This section describes the registers for the analog PLLs. The registers which have the
same description are grouped within {}. The register offsets for the various PLLs are:
• ARM PLL: {0h000, 0h004, 0h008, 0h00C}.
• USB1 PLL: {0h010, 0h014, 0h018, 0h01C}, {0h0F0, 0h0F4, 0h0F8, 0h0FC}.
• System PLL: {0h030, 0h034, 0h038, 0h03C}, 0h040, 0h050, 0h060, {0h100, 0h104,
0h108, 0h10C}.
• Audio / Video PLL: {0h070, 0h074, 0h078, 0h07C}, 0h080, 0h090, {0h0A0, 0h0A4,
0h0A8, 0h0AC}, 0h0B0, 0h0C0
CCM_ANALOG memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
Analog ARM PLL control Register
20C_8000 32 R/W 0001_3042h 18.7.1/730
(CCM_ANALOG_PLL_ARM)
Analog ARM PLL control Register
20C_8004 32 R/W 0001_3042h 18.7.1/730
(CCM_ANALOG_PLL_ARM_SET)
Analog ARM PLL control Register
20C_8008 32 R/W 0001_3042h 18.7.1/730
(CCM_ANALOG_PLL_ARM_CLR)
Analog ARM PLL control Register
20C_800C 32 R/W 0001_3042h 18.7.1/730
(CCM_ANALOG_PLL_ARM_TOG)
Analog USB1 480MHz PLL Control Register
20C_8010 32 R/W 0001_2000h 18.7.2/732
(CCM_ANALOG_PLL_USB1)
Analog USB1 480MHz PLL Control Register
20C_8014 32 R/W 0001_2000h 18.7.2/732
(CCM_ANALOG_PLL_USB1_SET)
Analog USB1 480MHz PLL Control Register
20C_8018 32 R/W 0001_2000h 18.7.2/732
(CCM_ANALOG_PLL_USB1_CLR)
Analog USB1 480MHz PLL Control Register
20C_801C 32 R/W 0001_2000h 18.7.2/732
(CCM_ANALOG_PLL_USB1_TOG)
Analog USB2 480MHz PLL Control Register
20C_8020 32 R/W 0001_2000h 18.7.3/735
(CCM_ANALOG_PLL_USB2)
Analog USB2 480MHz PLL Control Register
20C_8024 32 R/W 0001_2000h 18.7.3/735
(CCM_ANALOG_PLL_USB2_SET)
Analog USB2 480MHz PLL Control Register
20C_8028 32 R/W 0001_2000h 18.7.3/735
(CCM_ANALOG_PLL_USB2_CLR)
Analog USB2 480MHz PLL Control Register
20C_802C 32 R/W 0001_2000h 18.7.3/735
(CCM_ANALOG_PLL_USB2_TOG)
Analog System PLL Control Register
20C_8030 32 R/W 0001_3001h 18.7.4/737
(CCM_ANALOG_PLL_SYS)
Analog System PLL Control Register
20C_8034 32 R/W 0001_3001h 18.7.4/737
(CCM_ANALOG_PLL_SYS_SET)
Analog System PLL Control Register
20C_8038 32 R/W 0001_3001h 18.7.4/737
(CCM_ANALOG_PLL_SYS_CLR)
Table continues on the next page...
R -
LVDS_24MHZ_SEL
LVDS_SEL
PLL_SEL
BYPASS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
POWERDOWN
ENABLE
BYPASS_
Reserved DIV_SELECT
CLK_SRC
Reset 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0
R -
BYPASS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R - -
EN_USB_CLKS
DIV_SELECT
Reserved
ENABLE
POWER
BYPASS_
CLK_SRC
Reset 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
R -
BYPASS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R - -
EN_USB_CLKS
DIV_SELECT
Reserved
ENABLE
POWER
BYPASS_
CLK_SRC
Reset 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
R -
BYPASS
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R -
POWERDOWN
DIV_SELECT
ENABLE
BYPASS_
Reserved
CLK_SRC
Reset 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
STOP
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
ENABLE
STEP
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R -
A
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This register contains the denominator of 528MHz PLL fractional loop divider.
Address: 20C_8000h base + 60h offset = 20C_8060h
Bit 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
R -
B
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
R -
Reserved
BYPASS
POST_DIV_
Reserved
SELECT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
POWERDOWN
ENABLE
BYPASS_
Reserved DIV_SELECT
CLK_SRC
Reset 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0
Bit 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
R -
A
W
Reset 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0
This register contains the denominator (B) of Audio PLL fractional loop divider
(unsigned number).
Address: 20C_8000h base + 90h offset = 20C_8090h
Bit 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
R -
B
W
Reset 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 0 0
R -
Reserved
BYPASS
POST_DIV_
Reserved
SELECT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
POWERDOWN
ENABLE
BYPASS_
Reserved DIV_SELECT
CLK_SRC
Reset 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0
Bit 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
R -
A
W
Reset 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0
This register contains the denominator (B) of Video PLL fractional loop divider
(unsigned number).
Address: 20C_8000h base + C0h offset = 20C_80C0h
Bit 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
R -
B
W
Reset 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 1
This register defines the control bits for the MLB PLL.
Address: 20C_8000h base + D0h offset + (4d × i), where i=0d to 3d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LOCK
BYPASS
MLB_FLT_RES_ RX_CLK_DELAY_
Reserved VDDD_DELAY_CFG VDDA_DELAY_CFG
CFG CFG
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
HOLD_RING_OFF
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R -
ENABLE_100M
ENABLE_125M
BYPASS
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R -
POWERDOWN
DIV_SELECT
ENABLE
BYPASS_
Reserved
CLK_SRC
Reset 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1
PFD3_STABLE
PFD2_STABLE
R
PFD3_CLKGATE
PFD2_CLKGATE
PFD3_FRAC PFD2_FRAC
Reset 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PFD1_STABLE
PFD0_STABLE
R
PFD1_CLKGATE
PFD0_CLKGATE
PFD1_FRAC PFD0_FRAC
Reset 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0
PFD2_STABLE
R
PFD2_CLKGATE
Reserved PFD2_FRAC
Reset 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PFD1_STABLE
PFD0_STABLE
R
PFD1_CLKGATE
PFD0_CLKGATE
PFD1_FRAC PFD0_FRAC
Reset 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 1
This register defines the control and status bits for miscellaneous analog blocks.
Address: 20C_8000h base + 150h offset + (4d × i), where i=0d to 3d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
OSC_XTALOK
WBCP_VPW_THRESH
R
OSC_XTALOK_EN
CLKGATE_CTRL
Reset 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REFTOP_SELFBIASOFF
STOP_MODE_CONFIG
R
REFTOP_VBGUP
REFTOP_PWD
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: Do not change the field during a low power event. This is not a field that the user would normally
need to modify.
000 0.5ms
001 1.0ms
010 2.0ms
011 3.0ms
100 4.0ms
101 5.0ms
110 6.0ms
111 7.0ms
25
CLKGATE_CTRL This bit allows disabling the clock gate (always ungated) for the xtal 24MHz clock that clocks the digital
logic in the analog block.
NOTE: Do not change the field during a low power event. This is not a field that the user would normally
need to modify.
0 ALLOW_AUTO_GATE — Allow the logic to automatically gate the clock when the XTAL is powered
down.
1 NO_AUTO_GATE — Prevent the logic from ever gating off the clock.
24–20 This field is reserved.
- Always set to zero.
19–18
WBCP_VPW_ This signal alters the voltage that the pwell is charged pumped to.
THRESH
NOTE: Not related to CCM. See Power Management Unit (PMU)
00 NOMINAL — Nominal
01 MINUS_12_5_PERCENT — Decrease current by 12.5%
10 MINUS_25_PERCENT — Decrease current by 25.0%
11 MINUS_37_5_PERCENT — Decrease current by 37.5%
13 This field is reserved.
Reserved Reserved
12 Configure the analog behavior in stop mode.
STOP_MODE_
CONFIG 0x0 DEEP — Deep Stop Mode - 0x0 All analog except RTC powered down on Stop mode assertion
0x1 LIGHT — Light Stop Mode - 0x1 All the analog domain except the LDO_1P1, LDO_2P5, and PLL3
is powered down on STOP mode assertion. If required the CCM can be configured not to power
down the oscillator (XTALOSC). PLL3 can be disabled with register settings if desired.
11–8 This field is reserved.
- Reserved
7
REFTOP_ Status bit that signals the analog bandgap voltage is up and stable. 1 - Stable.
VBGUP
NOTE: Not related to CCM. See Power Management Unit (PMU)
6–4
REFTOP_ NOTE: Not related to CCM. See Power Management Unit (PMU)
VBGADJ
000 Nominal VBG
001 VBG+0.78%
010 VBG+1.56%
011 VBG+2.34%
100 VBG-0.78%
101 VBG-1.56%
110 VBG-2.34%
111 VBG-3.12%
3
REFTOP_ Control bit to disable the self-bias circuit in the analog bandgap. The self-bias circuit is used by the
SELFBIASOFF bandgap during startup. This bit should be set after the bandgap has stabilized and is necessary for best
noise performance of analog blocks using the outputs of the bandgap.
NOTE: Value should be returned to zero before removing vddhigh_in or asserting bit 0 of this register
(REFTOP_PWD) to assure proper restart of the circuit.
This register defines the control and status bits for miscellaneous analog blocks. The
LVDS1 and LVDS2 controls below control the behavior of the anaclk1/1b and
anaclk2/2b LVDS IO's.
Address: 20C_8000h base + 160h offset + (4d × i), where i=0d to 3d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
IRQ_TEMPSENSE
IRQ_ANA_BO
IRQ_DIG_BO
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
LVDSCLK2_OBEN
LVDSCLK1_OBEN
LVDSCLK2_IBEN
LVDSCLK1_IBEN
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
REG2_BO_STATUS
REG2_OK
R REG2_BO_OFFSET
REG2_ENABLE_BO
REG2_STEP_TIME
REG1_STEP_TIME
REG0_STEP_TIME
Reserved
Reserved
VIDEO_DIV
Reset 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REG1_BO_STATUS
REG0_BO_STATUS
REG1_OK
REG0_OK
R REG1_BO_OFFSET REG0_BO_OFFSET
REG1_ENABLE_BO
REG0_ENABLE_BO
PLL3_DISABLE
Reserved
Reserved
Reserved
W
Reset 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1
00 divide by 1 (Default)
01 divide by 2
10 divide by 1
11 divide by 4
29–28
REG2_STEP_ Number of clock periods (24MHz clock).
TIME
NOTE: Not related to CCM. See Power Management Unit (PMU)
00 64_CLOCKS — 64
01 128_CLOCKS — 128
10 256_CLOCKS — 256
11 512_CLOCKS — 512
27–26
REG1_STEP_ Number of clock periods (24MHz clock).
TIME
Table continues on the next page...
00 64_CLOCKS — 64
01 128_CLOCKS — 128
10 256_CLOCKS — 256
11 512_CLOCKS — 512
25–24
REG0_STEP_ Number of clock periods (24MHz clock).
TIME
NOTE: Not related to CCM. See Power Management Unit (PMU)
00 64_CLOCKS — 64
01 128_CLOCKS — 128
10 256_CLOCKS — 256
11 512_CLOCKS — 512
23 This field is reserved.
- Reserved
22
REG2_OK Signals that the voltage is above the brownout level for the SOC supply. 1 = regulator output >
brownout_target
NOTE: When USB is in low power suspend mode users would need to ensure PLL3 is not being used
before setting this bit in RUN mode. Please refer to the correct PLL disabling procedure in
Disabling / Enabling PLLs
0 PLL3 is being used by peripherals and is enabled when SoC is not in any low power mode
1 PLL3 can be disabled when the SoC is not in any low power mode
6
REG0_OK Arm supply
19.1 Overview
The CSI2IPU gasket is a digital core that functions as a gasket interface between the
MIPI CSI-2 host controller and the IPU system. This facilitates communication between
a MIPI CSI-2 compliant camera sensor and IPU (the image processing unit). The gasket's
main functions are to synchronize the CSI-2 input 32-bit data bus with the 16-bit data bus
and to separate the four virtual channels.
The following block diagram shows the CSI2IPU gasket's position in the system as part
of the CSI to IPU connectivity.
Video
Sources
i.MX 6 Series
Parallel 0
mux
VC 0 CSI0
IPU1
CSI1
VC 1
MIPI/CSI-2 CSI2IPU
MIPI/CSI-2 Receiver gasket
CSI0
VC 2
IPU2
VC 3
mux
CSI1
Parallel 1
Clk_data
Header_en
Virtual_channel
Csi0/1/2/3_data
Data_type [15:0]
Csi0/1/2/3_mct_di
Word_count FIFO_WR Async_FIFO FIFO_RD GST_OUT
Csi0/1/2/3_data_en
ecc
Data_en Csi0/1/2/3_pix_clk
Csi_data Csi0/1/2/3_vsync
[31:0]
Bytes_en Csi0/1/2/3_hsync
vvalid Register
Control
hvalid
dvalid
• GST OUT—Generates output data according to the format controlled by the register
bank.
• REGISTER CONTROL—register bank used to control the GST OUT block.
1. n = 0 - 3
pix_clk
data_en
vsync
hsync
csix_data
Bytes3 Bytes2
16bits data bus
B1 R0 G0 B0
G2 B2 R1 G1
B1 R0
G2 B2
R1 G1 B1 R0 G0 B0
G3 B3 R2 G2 B2 R1
R1 G1 B1 R0
16bits data bus
G2 B2 R1
G3 B3 R2
R1 G1 B1 R0 G0 B0
R1 G1 B1 R0 G0 B0
0 0
R1 G1 B1
16bits data bus 0
R1 G1 B1 R0 G0 B0
x x x x x x x x
x x x x
Y2 VI Y1 U1
Y4 V3 Y3 U3
Y2 V1
Y3 U3
16bits data bus
Y4 V3
Y2[9:2] V1[9:2]
V3[9:2] Y3[9:2]
U1 Y1 Y2 U3
Y3 Y4 U5 Y5
Y2 U3
16bits data bus (Odd Line)
Y3 Y4
U5 Y5
V1 Y1 Y2 V3
Y3 Y4 V5 Y5
Y2 V3
V5 Y5
Y4 Y3 Y2 Y1
Y8 Y7 Y6 Y5
Y4 Y3
16bits data bus (Odd Line)
Y6 Y5
Y8 Y7
Y2 V1 Y1 U1
Y4 V3 Y3 U3
Y2 V1
Y4 V3
Y5[9:2] Y3[9:2]
Y7[9:2] Y6[9:2]
Y2[9:2] V1[9:2]
V3[9:2] Y3[9:2]
P6 P5 P4 P3 P2 P1
P11 P10 P9 P8 P7 P6
P3 P2 P1
32bits data bus
P6 P5 P4 P3
P11 P10 P9
P5 P4 P3 P2 P1
P10 P9 P8 P7 P6 P5
P3 P2 P1
32bits data bus
P5 P4 P3
P10 P9 P8 P7
P4 P3 P2 P1
P8 P7 P6 P5
P4 P3
P8 P7
P4[9:2] P3[9:2]
P7[9:2] P6[9:2]
P6[11:4] P5[11:4]
P4[13:6] P3[13:6]
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
YUV422_8BIT_
RGB444_FM
R 0
CLK_SEL
SW_
FM
RST
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20.1 Overview
The goal of the DCIC is to verify that a safety-critical information sent to a display is not
corrupted.
Such a verification is mandatory for warning icons in the instrument cluster of a car, to
comply with the ASIL B (Automotive Safety Integrity Level B) specification. It is also
required in other safety-sensitive systems.
Using external muxing DCIC can monitor either one of the IPU display port outputs or
feedback signals going from IO pads of Parallel display interface. The figure below
shows DCIC integration in system with two IPU blocks.
IPU #0 IPU #1
MIPI
IOMUX
DBI
SoCMUX SoCMUX SoCMUX SoCMUX
SoCMUX SoCMUX
sticky control sticky control
DCIC #0 DCIC #1
Display
interface
IP
bus IP Logic, Mirrored Display
Configuration & configuration ROI Comparators interface
Status registers registers parser
Interrupts logic
CRC generator
control
CRC32 generator
20.1.2 Features
• Pixel clock up to 266 MHz
• Configurable polarity of Display Interface control signals
• 24-bit pixel data bus
• Up to 16 rectangular ROIs with a configurable location and size
• Independent CRC32 signature calculation for each ROI
• External controller mismatch indication signal
VSYNC
HSYNC
LINE 1 LINE 2 LINE 3 LINE 4 LINE n-1 LINE n
HSYNC
DRDY
1 2 3 m-1 m
IPP_DISP_CLK
IPP_DATA
Figure 20-3. Interface Timing Diagram for TFT (Active Matrix) Panels
CRC generator uses XOR-ed combination of input data bits and previous result bits.
20.2.4 Interrupts
There are two maskable interrupts:
• Functional - Asserted when match results ready.
• Error - Asserted when there is a signature mismatch.
Both interrupts are generated immediately after completing the signature match check.
Software should clean the interrupts by writing "1" to appropriate status bits (FI_STAT,
ROI_MATCH_STAT). EI_STAT bit is a result of OR between all ROI_MATCH_STAT
bits, hence it will be cleared automatically when these bits are clear.
Interrupt masks can be set/reset only while FREEZE_MASK bit isn't set. This bit can not
be set back to zero.
Important: All write accesses have to be full word (32-bit) accesses. No error/abort will
be responded in case of different access size, but no data will be written. Similarly, there
will be no error response in case of access to undefined memory space.
Read access will return 32-bit data, which may be truncated on system level in case it
wasn't full word acces.
DCIC memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
20E_4000 DCIC Control Register (DCIC1_DCICC) 32 R/W 0000_0070h 20.3.1/788
20E_4004 DCIC Interrupt Control Register (DCIC1_DCICIC) 32 R/W 0000_0003h 20.3.2/789
20E_4008 DCIC Status Register (DCIC1_DCICS) 32 w1c 0000_0000h 20.3.3/790
20E_4010 DCIC ROI Config Register m (DCIC1_DCICRC) 32 R/W 0000_0000h 20.3.4/791
20E_4014 DCIC ROI Size Register m (DCIC1_DCICRS) 32 R/W 0000_0000h 20.3.5/792
Table continues on the next page...
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HSYNC_POL
VSYNC_POL
R 0 0
CLK_POL
IC_EN
DE_
POL
W
Reset 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0
R 0
EXT_
SIG_
W
EN
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0
FREEZE_
EI_MASK
FI_MASK
MASK
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
EI_STAT
FI_STAT
R 0
W w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R ROI_MATCH_STAT
W w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 No pending Interrupt
1 Pending Interrupt
ROI_MATCH_ Each set bit of this field indicates there was a mismatch at appropriate ROIs signature during the last
STAT frame.
Valid only for active ROIs.
Write "1" to clear.
R 0
ROI_EN
START_OFFSET_Y
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
START_OFFSET_X
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R CALCULATED_SIGNATURE
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21.1 Overview
Low-Frequency
Clock Reference Clock
State Machine
Generator
Reference Clock
Interrupt Request
DMA Requests
SPI_RDY
SS[3:0]
SCLK
Shift Register MISO
MOSI
21.1.1 Features
Key features of the ECSPI include:
• Full-duplex synchronous serial interface
• Master/Slave configurable
• Four Chip Select (SS) signals to support multiple peripherals
• Transfer continuation function allows unlimited length data transfers
• 32-bit wide by 64-entry FIFO for both transmit and receive data
• Polarity and phase of the Chip Select (SS) and SPI Clock (SCLK) are configurable
• Direct Memory Access (DMA) support
• Refer to the product data sheet for the maximum operating frequency
Figure 21-2 shows the ECSPI in master mode connected to four external devices in a
one-way communication link.
ECSPI
SS[0] SS[1] SS[2] SS[3]
SS[3:0]
(Master)
SCLK
MOSI
21.3 Clocks
The following table describes the clock sources for eCSPI. Please see Clock Controller
Module (CCM) for clock setting, configuration and gating information.
Table 21-6. eCSPI Clocks
Clock name Clock Root Description
ipg_clk ipg_clk_root Peripheral clock
ipg_clk_32k ckil_sync_clk_root Low-frequency reference clock (32kHz)
ipg_clk_per ecspi_clk_root eCSPI module clock
ipg_clk_s ipg_clk_root Peripheral access clock
21.4.4 Operations
The information found here describes the ECSPI's operations.
SS
SCLK
MOSI 1 1 0 1 0 0 1 0
MISO 0 1 1 0 0 1 1 0
In the above figure, the Chip Select (SS) signal enables the selected external SPI device,
and the SCLK synchronizes the data transfer. The MOSI and MISO signals change on
rising edge of SCLK and the MISO signal is latched on the falling edge of the SCLK.
The figure above shows a data of 0xD2 is shifted out, and a data of 0x66 is shifted in.
SS
SPI_RDY
SCLK
MOSI
MISO
Figure 21-5. Relationship Between a SPI Burst and SPI_RDY: Falling-Edge Triggered
A SPI burst does not start until the falling edge of the SPI_RDY signal is detected. The
next SPI burst starts when the next SPI_RDY falling edge is detected, after the last burst
has finished.
If SPI Data Ready Control (ECSPI_CONREG[DRCTL]) is set to 10, the SPI burst can be
triggered only if the SPI_RDY signal is low.
The following figure shows the relationship between a SPI burst and the SPI_RDY
signal. The SPI burst does not begin until the SPI_RDY signal goes low. The ECSPI will
keep transmitting SPI burst if the SPI_RDY signal remains low.
SS
SPI_RDY
SCLK
MOSI
MISO
Figure 21-6. Relationship Between a SPI Burst and SPI_RDY: Low-Level Triggered
SS
Wait States
SCLK
MOSI
MISO
When the SPI SS Wave Form Select (SS_CTL[3:0]) is set, the current operation is
multiple bursts transfer. When the SPI SS Wave Form Select (SS_CTL[3:0]) bit is
cleared, the current operation is single burst transfer. A SPI burst can contains multiple
words as defined in the BURST LENGTH field of the ECSPI_CONREG register.
SS Waiting for
software to
write data to
SCLK the TXFIFO
MOSI
MISO
In Figure 21-8, two 8-bit bursts in the TXFIFO have been combined and transmitted in
one SPI burst. The maximum length of a single SPI burst is defined by the BURST
LENGTH and limited by the FIFO size. (Figure 21-8 corresponds to a BURST LENGTH
of 8.) This provides a way for transferring a longer SPI burst by writing data into
TXFIFO while the ECSPI is transmitting.
SS
SCLK
MOSI
MISO
In Figure 21-9, two FIFO entries are transmitted, one entry with each SPI burst. The
ECSPI will continue to transmit SPI bursts until the TXFIFO is empty. When wait states
can be inserted between SPI bursts, the SS will negate between SPI bursts until the wait
states finish.
When the Phase control (ECSPI_CONREG[PHA]) bit is set, the transmit data will shift
out on the rising edge of SCLK, and the receive data is latched on the falling edge of
SCLK. The most-significant bit is output on the first rising SCLK edge.
When ECSPI_CONREG[PHA] is cleared, the transmit data is shifted out on the falling
edge of SCLK and the receive data is latched on the rising edge of SCLK. The MSB is
output when the host processor loads the transmitted data.
Inverting the SCLK polarity does not impact the edge-triggered operations because they
are internal to the serial peripheral interface master. Figure 21-10 shows how SPI burst
works with different POL and PHA configuration.
SS
(POL=0, PHA=0)
(POL=1, PHA=0)
(POL=0, PHA=1)
SCLK
(POL=1, PHA=1)
MOSI
MISO
Figure 21-10. SPI Burst with Different POL and PHA Configurations
The SS, SCLK, and MOSI are inputs and MISO is output. Most of the timing diagrams
are similar to the diagrams shown previously for the SPI in Master mode (Mode = 1),
because the inputs come from a SPI master device.
However, the timing is different when SS is used to advance the data FIFO. When the
SS_POL=0 is set while the ECSPI is configured in Slave mode, the data FIFO will
advance on the rising edge of the SS signal. When the polarity is reversed (SS_POL = 1),
the data FIFO will advance on the falling edge of the SS signal.
The figure below shows a SPI burst in which the data FIFO is advanced by the rising
edge of the SS signal.
SS
SCLK
MOSI
MISO
In the above case, only the most significant 7 bits are loaded to the RXFIFO.
21.4.5 Reset
Whenever a device reset occurs, a reset is performed on the ECSPI, resetting all registers
to their default values.
Software can reset the block using the CONREG[EN] bit; see ECSPI.
21.4.6 Interrupts
Interrupt control provides a way to manage the ECSPI FIFOs:
• For transmitting data, software can enable the TXFIFO empty, TXFIFO data request,
and TXFIFO full interrupts to maintain the TXFIFO using an interrupt service
routine.
• For receiving data, software can enable the RXFIFO ready, RXFIFO data request,
and RXFIFO full interrupts to retrieve data from the RXFIFO using an interrupt
service routine.
Other interrupt sources can be used to control or debug the SPI bursts:
• The transfer-completed interrupt means that there is no data left in the TXFIFO and
that the data in the Shift register has been shifted out.
• The RXFIFO overflow interrupt means that the RXFIFO received more than 64
words and will not accept any other words.
Enable CSPI
Enable interrupts
Enable XCH
Wait until all needed data are transferred Retrieve data using interrupt service routine
TC interrupt
TC clear by writing 1
Done
NOTE
The TC bit does not provide a reliable indication that the
transfer is complete. Under some conditions, the TC interrupt
can occur before the transfer is completed. If the TC bit is used
as an interrupt source, the XCH bit should be polled after the
TC interrupt occurs to accurately confirm that the transfer is
complete.
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 6, 05/2020
NXP Semiconductors 809
Functional Description
21.4.7 DMA
DMA control provides another method to utilize the FIFOs in the ECSPI. By using DMA
request and acknowledge signals, larger amounts of data can be transferred, and will
reduce interrupts and host processor loading. When the appropriate conditions are
matched, the block will send out a DMA request.
The DMA can deal with the following conditions:
• TXFIFO empty
• TXFIFO data request
• RXFIFO data request
• RXFIFO full
The figure below shows a program sequence of SPI bursts using DMA control.
Enable CSPI
Enable DMA
Enable XCH
Wait until all needed data is transferred Retrieve data using DMA
TC interrupt
Done
NOTE
The TC bit does not provide a reliable indication that the
transfer is complete. Under some conditions, the TC interrupt
can occur before the transfer is completed. If the TC bit is used
21.5 Initialization
This section provides initialization information for ECSPI.
To initialize the block:
1. Clear the EN bit in ECSPI_CONREG to reset the block.
2. Enable the clocks for ECSPI within the CCM.
3. Configure the Control Register and then set the EN bit in the ECSPI_CONREG to
put ECSPI out of reset.
4. Configure corresponding IOMUX for ECSPI external signals.
5. Configure registers of ECSPI properly according to the specifications of the external
SPI device.
21.6 Applications
Fill TXFIFO
Transfer Completed
Transfer Completed
NOTE
The TC bit does not provide a reliable indication that the
transfer is complete. Under some conditions, the TC interrupt
can occur before the transfer is completed. If the TC bit is used
as an interrupt source, the XCH bit should be polled after the
TC interrupt occurs to accurately confirm that the transfer is
complete.
This section includes the block memory map and detailed descriptions of all registers. For
the base address of a particular block instantiation, see the system memory map.
The Receive Data register (ECSPI_RXDATA) is a read-only register that forms the top
word of the 64 x 32 receive FIFO. This register holds the data received from an external
SPI device during a data transaction. Only word-sized read operations are allowed.
Address: Base address + 0h offset
Bit 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
R ECSPI_RXDATA
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The Transmit Data (ECSPI_TXDATA) register is a write-only data register that forms
the bottom word of the 64 x 32 TXFIFO. The TXFIFO can be written to as long as it is
not full, even when the SPI Exchange bit (XCH) in ECSPI_CONREG is set. This allows
software to write to the TXFIFO during a SPI data exchange process. Writes to this
register are ignored when the ECSPI is disabled (ECSPI_CONREG[EN] bit is cleared).
Address: Base address + 4h offset
Bit 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
W ECSPI_TXDATA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
PRE_DIVIDER POST_DIVIDER CHANNEL_MODE SMC XCH HT EN
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000 Divide by 1.
0001 Divide by 2.
0010 Divide by 3.
...
1101 Divide by 14.
1110 Divide by 15.
1111 Divide by 16.
11–8 SPI Post Divider. ECSPI uses a two-stage divider to generate the SPI clock. This field defines the post-
POST_DIVIDER divider of the reference clock using the equation: 2 n .
0000 Divide by 1.
0001 Divide by 2.
Table continues on the next page...
0 Slave mode.
1 Master mode.
3 Start Mode Control. This bit applies only to channels configured in Master mode (CHANNEL MODE = 1).
SMC
It controls how the ECSPI starts a SPI burst, either through the SPI exchange bit, or immediately when the
TXFIFO is written to.
0 SPI Exchange Bit (XCH) controls when a SPI burst can start. Setting the XCH bit will start a SPI burst
or multiple bursts. This is controlled by the SPI SS Wave Form Select (SS_CTL). Refer to XCH and
SS_CTL descriptions.
1 Immediately starts a SPI burst when data is written in TXFIFO.
2 SPI Exchange Bit. This bit applies only to channels configured in Master mode (CHANNEL MODE = 1).
XCH
If the Start Mode Control (SMC) bit is cleared, writing a 1 to this bit starts one SPI burst or multiple SPI
bursts according to the SPI SS Wave Form Select (SS_CTL). The XCH bit remains set while either the
data exchange is in progress, or when the ECSPI is waiting for an active input if SPIRDY is enabled
through DRCTL. This bit is cleared automatically when all data in the TXFIFO and the shift register has
been shifted out.
0 Idle.
1 Initiates exchange (write) or busy (read).
1 Hardware Trigger Enable. This bit is used in master mode only. It enables hardware trigger (HT) mode.
HT Note, HT mode is not supported by this product.
0 Disable HT mode.
1 Enable HT mode.
0 SPI Block Enable Control. This bit enables the ECSPI. This bit must be set before writing to other registers
EN or initiating an exchange. Writing zero to this bit disables the block and resets the internal logic with the
exception of the ECSPI_CONREG. The block's internal clocks are gated off whenever the block is
disabled.
0 Stay low.
1 Stay high.
19–16 DATA CTL. This field controls inactive state of the data line for each SPI channel.
DATA_CTL
DATA CTL[3] is for SPI channel 3.
DATA CTL[2] is for SPI channel 2.
DATA CTL[1] is for SPI channel 1.
DATA CTL[0] is for SPI channel 0.
0 Stay high.
1 Stay low.
15–12 SPI SS Polarity Select. In both Master and Slave modes, this field selects the polarity of the Chip Select
SS_POL (SS) signal.
SS POL[3] is for SPI channel 3.
SS POL[2] is for SPI channel 2.
SS POL[1] is for SPI channel 1.
SS POL[0] is for SPI channel 0.
Table continues on the next page...
0 Phase 0 operation.
1 Phase 1 operation.
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RDREN
TDREN
ROEN
TCEN
RRE
Reserved RFEN TFEN TEEN
N
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Disable
1 Enable
3 RXFIFO Ready Interrupt enable. This bit enables the RXFIFO Ready Interrupt.
RREN
0 Disable
1 Enable
0 Disable
1 Enable
0 TXFIFO Empty Interrupt enable. This bit enables the TXFIFO Empty Interrupt.
TEEN
0 Disable
1 Enable
R
Reserved
Reserved
RXTDEN
RXDEN
RX_DMA_LENGTH RX_THRESHOLD
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
Reserved
TEDEN
Reserved TX_THRESHOLD
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Disable
1 Enable
30 This field is reserved.
- Reserved
29–24 RX DMA LENGTH. This field defines the burst length of a DMA operation. Applies only when RXTDEN is
RX_DMA_ set.
LENGTH
23 RXFIFO DMA Request Enable. This bit enables/disables the RXFIFO DMA Request.
RXDEN
0 Disable
1 Enable
22 This field is reserved.
- Reserved
21–16 RX THRESHOLD. This field defines the FIFO threshold that triggers a RX DMA/INT request.
RX_
A RX DMA/INT request is issued when the number of data entries in the RXFIFO is greater than
THRESHOLD
RX_THRESHOLD.
15–8 This field is reserved.
- Reserved
7 TXFIFO Empty DMA Request Enable. This bit enables/disables the TXFIFO Empty DMA Request.
TEDEN
0 Disable
1 Enable
6 This field is reserved.
- Reserved
TX_ TX THRESHOLD. This field defines the FIFO threshold that triggers a TX DMA/INT request.
THRESHOLD
A TX DMA/INT request is issued when the number of data entries in the TXFIFO is not greater than
TX_THRESHOLD.
The ECSPI Status Register (ECSPI_STATREG) reflects the status of the ECSPI's
operating condition. If the ECSPI is disabled, this register reads 0x0000_0003.
Address: Base address + 18h offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R TC RO RF RDR RR TF TDR TE
Reserved
W w1c w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
NOTE: The TC bit does not provide a reliable indication that the transfer is complete. Under some
conditions, the TC interrupt can occur before the transfer is completed. If the TC bit is used as an
interrupt source, the XCH bit should be polled after the TC interrupt occurs to accurately confirm
that the transfer is complete.
0 Transfer in progress.
1 Transfer completed.
6 RXFIFO Overflow. When set, this bit indicates that RXFIFO has overflowed. Writing 1 to this bit clears it.
RO
0 RXFIFO has no overflow.
1 RXFIFO has overflowed.
5 RXFIFO Full. This bit is set when the RXFIFO is full.
RF
0 Not Full.
1 Full.
4 RXFIFO Data Request.
RDR
0 When RXTDE is set - Number of data entries in the RXFIFO is not greater than RX_THRESHOLD.
1 When RXTDE is set - Number of data entries in the RXFIFO is greater than RX_THRESHOLD or a
DMA TAIL DMA condition exists.
0 When RXTDE is clear - Number of data entries in the RXFIFO is not greater than RX_THRESHOLD.
1 When RXTDE is clear - Number of data entries in the RXFIFO is greater than RX_THRESHOLD.
Reserved CSD_CTL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
CSRC
SAMPLE_PERIOD
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
Reserved
Reserv
RXCNT TXCNT
ed
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Not connected.
1 Transmitter and receiver sections internally connected for Loopback.
30–28 This field is reserved.
- Reserved, all bits should be ignored.
27–15 This field is reserved.
- Reserved
14–8 RXFIFO Counter. This field indicates the number of words in the RXFIFO.
RXCNT
The Message Data Register (ECSPI_MSGDATA) forms the top word of the 16 x 32
MSG Data FIFO. Only word-size accesses are allowed for this register. Reading from
this register returns zero, and writing to this register stores data in the MSG Data FIFO.
Address: Base address + 40h offset
Bit 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
W ECSPI_MSGDATA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
22.1 Overview
The EIM handles the interface to devices external to the chip, including generation of
chip selects, clock and control for external peripherals and memory. It provides
asynchronous access to devices with SRAM-like interface and synchronous access to
devices with NOR-Flash-like or PSRAM-like interface.
IPP_DO_STROBE
AXI IPP_DO_CS_B[5:0]
controls
LPMD IPP_DO_WE_B
AXI IPP_DO_OE_B
LPACK Interface
Output
Control IPP_DO_BE_B[3:0]
EIM_GRANT
IPP_DO_ADV_B
IPP_CBE_MADDR_DIR[1:0]
IPI_EIM_INT CONFIGURATION
EIM_BOOT[2:0] IPP_IND_RDY_INT
IPP_DO_CRE_S
Config.
Registers
IPG_CLK_S
IPP_DO_CRE
IPS
Interface
IPS CONTROLS
ACLK
IPP_DO_BCLK
GATED CLOCKS
BCLK
Clock Generation
Gating
AXI_ADDR[31:0] Addr
Path
IPP_DO_ADDR_OUT[27:0]
READ_BIGEND,WRITE_BIGEND
IPP_DO_DATA_MADDR[31:0]
IPP_MUXED_DATA_IN[15:0]
WDATA[31:0] IPP_IND_READ_DATA[31:0]
Data
Path
IPP_IND_WAIT_B
RDATA[31:0]
IPP_IND_FB_BCLK
IPP_IND_DTACK
22.1.1 Features
• Four chip selects for external devices
• Flexible address decoding. Each chip select memory space determined
separately, according to VIA port configuration (see Chip Select Memory Map).
Configurable Chip Select 0 base address (by VIA)
• Individual select signal for each one of the memory space defined. Up to 6
memory spaces may be defined and programmed individually.
• 128 MByte maximum supported density by default (AUS bit is cleared). When
the AUS bit is set, maximum supported density is 32 MBytes.
• Selectable Write Protection for each Chip Select
• Support for multiplexed address / data bus operation x16 and x32 port size
• Programmable Data Port Size for each Chip Select (x8, x16 and x32)
• Programmable Wait-State generator for each Chip Select, for write and read accesses
separately
• Asynchronous accesses with programmable setup and hold times for control signals
• Support for Asynchronous page mode accesses (x16 and x32 port size)
• Independent synchronous Memory Burst Read Mode support for NOR-Flash and
PSRAM memories (x16 and x32 port size)
• Independent synchronous Memory Burst Write Mode support for PSRAM and NOR-
Flash like memories (CellularRAM™ from Micron, Infineon, and Cypress,
OneNAND™ and utRAM™ from Samsung, and COSMORAM™ from Toshiba)
• Support of NAND-Flash devices with NOR-Flash like interface - MDOC™ (M-
Systems), OneNAND™ (Samsung)
• Independent programmable variable/fix Latency support for read and write
synchronous (burst) mode
• Support for Big Endian and Little Endian operation modes per access
• Arm AXI slave interface. One ID at a time support.
• External Interrupt support, RDY_INT signal function as external interrupt
• Boot from external device support according to boot signals, using RDY_INT signal
• RDY signal support assertion after reset for MDOC™ (M-Systems) device
• INT signal support assertion after reset for OneNAND™ (Samsung) device
22.3 Clocks
The following table describes the clock sources for EIM. Please see Clock Controller
Module (CCM) for clock setting, configuration and gating information.
Table 22-4. EIM Clocks
Clock name Clock Root Description
aclk aclk_eim_slow_clk_root EIM clock (main)
aclk_slow aclk_eim_slow_clk_root EIM clock (slow)
ipg_clk_s ipg_clk_root Peripheral access clock
aclk_exsc aclk_eim_slow_clk_root EIM clock (external device)
• ACLK: EIM clock (main clock, AXI clock) with a Max frequency of 133 MHz. Can
be gated externally when there is no active AXI access.
• ACLK_SLOW: EIM all time running ACLK. Used for flip-flops that must be active
even when EIM is in low power down mode to provide clock for lpack/lpmd
registers, IP registers and IP to AXI sync registers.
• IPG_CLK_S: IPG clock for IP accesses. IP registers are activated by ACLK_SLOW
clock.
• ACLK_EXSC: Clock created from EIM clock for External device usage. Integer
division by 1, 2, 3 and 4 of the clock can be use with BCD bit field configuration,
according to external devices demands. EIM clock frequency may be reduced for
lower frequency support which cannot be achieved via BCD bit field.
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 6, 05/2020
840 NXP Semiconductors
Chapter 22 External Interface Module (EIM)
NOTE
A word access to or from a x16 port requires two external bus
cycles to complete the transfer.
A word access to or from a x8 port requires four external bus
cycles to complete the transfer.
For details, see the bit field descriptions of SWR / SRD / MUM. All modes are supported
in with 8-, 16- or 32-bit port configuration, according to DSZ bit field.
Table 22-5. EIM Operation Modes Field Settings
Control bit fields Brief mode description
MUM SRD SWR
0 0 0 Asynchronous write / Asynchronous read for APR=0 /
Asynchronous page read for APR=1, none multiplexed
1 Synchronous write/ Asynchronous read or APR=0 /
Asynchronous page read for APR=1,none multiplexed
1 0 Asynchronous write/Synchronous read none multiplexed
1 Synchronous write/read none multiplexed
1 0 0 Asynchronous write/read multiplexed
1 Synchronous write/ Asynchronous read multiplexed
1 0 Asynchronous write/Synchronous read multiplexed
1 Synchronous write/read multiplexed
Memory burst accesses are terminated by the EIM whenever it detects the following:
• The specific burst length has executed completely (end of access)
• Write access - missing data in write buffer (Master is delaying the data transfer
toward the EIM)
• Next sequential access crosses boundary with unequal condition (wrap/increment,
burst length) on the Master and memory
• Current memory burst length reached
Care must be exercised when setting BCS bit field in conjunction with the BCD and
RWSC/WWSC bit fields. See the external timing diagrams in Burst (Synchronous Mode)
Read Memory Accesses Timing Diagram - BCD=1 and Burst (Synchronous Mode) Read
Memory Accesses Timing Diagram - BCD=0 for examples of how to use the BCS, BCD
and RWSC/WWSC bit fields together.
• new read access is valid on the read address channel and is reflected on the RID bus
output toward the master.
AWID bus is sampled when:
• new write access is valid on the write address channel and is reflected on the
WID/BID bus output toward the master.
ARPROT and AWPROT signal are partially used. ARPROT[0] and AWPROT[0] bits are
used for normal/privileged access detection. ARPROT[2:1] and AWPROT[2:1] are not
used.
When sampling a valid access on both of the address channels, the read access will be
performed first while write access is pending. After last data transfer completed, the
pending write will be executed.
A new access may be executed one cycle after sampling a valid access on the read or
write address channels, assuming there is no current access (back to back) which can
cause a recovery or end of access penalty cycles, for write access, also assuming data is
in write buffer for fast execution.
NOTE
• Only 32-bit word size accesses are supported for burst
mode accesses.
• Only 8-bit (1 byte), 16-bit (2 byte) and 32-bit (4 byte) word
size supported for single access.
• Maximum number of burst length is 16.
• According to AXI protocol, burst access should not cross 4
KB blocks. In case EIM gets an access that crosses the 4
KB, memory address calculation is invalid.
AXI transfers shown in the table below are also supported. These AXI cycles will be
translated into the necessary cycles on the memory side. For example, for optimal
operation in case Arm cache is configured to 8 beat burst with wrap, a synchronous flash
and cellular RAM memory should be configured in 16 word wrap burst mode when using
a 16-bit data port, and in 8 word wrap burst mode when using a 32-bit data port. EIM
uses BL bit field to support different memory configurations. The controller splits the
transaction when needed in some cases. See Table 22-7.
Table 22-6. AXI Burst Cycles Supported
Burst Length - Burst size - Bytes Burst type Description
Number of data in transfer
transfers
1 1 INCR Single transfer
• First Write Data ID and write address ID match but one or more of the other
Write data IDs does not match the First Write data ID (data is written to memory
according)
• Access duration to external device from CSx signal assertion is
128/256/512/1024 cycles (access is terminated by the controller) - This error can
be disabled be software.
• IPS errors
• User read or write access to a reserved/non-valid address in the EIM
Configuration Register
When ERRST bit is set, RDY_INT signal is monitored to determine ready after reset of
the external device located on CS0.
The monitoring is taking place when CS0 is accessed for the first time. The access will be
pending until assertion of the signal is detected. When detection occurs, ERRST bit is
self-cleared and pending access is executed to the external device on CS0.
22.5.19 Endianness
Big and Little endianness are supported by the controller according to the following table.
Table 22-8. EIM Out/in Data in Case AXI Out/in Data is 0xB3B2B1B0
Endian AXI AXI Port size and used bits
mode access address
Word port Half word port Byte port
[1:0]
[31:24] [23:16] [15:8] [7:0] External [31:24] [23:16] External [31:24]
address address
([15:8]) ([7:0]) ([23:16])
[0] [1:0]
([15:8])
([7:0])
Big Word 0 0xB3 0xB2 0xB1 0xB0 0 0xB3 0xB2 0 0xB3
1 0xB2
1 0xB1 0xB0 2 0xB1
3 0xB0
Half 0 0xB1 0xB0 0 0xB3 0xB2 0 0xB3
Word 1 0xB2
2 0xB3 0xB2 1 0xB1 0xB0 2 0xB1
3 0xB0
Byte 0 0xB0 0 0xB3 0 0xB3
1 0xB1 0xB2 1 0xB2
2 0xB2 1 0xB1 2 0xB1
3 0xB3 0xB0 3 0xB0
Little Word 0 0xB3 0xB2 0xB1 0xB0 0 0xB1 0xB0 0 0xB0
1 0xB1
1 0xB3 0xB2 2 0xB2
3 0xB3
Half 0 0xB1 0xB0 0 0xB1 0xB0 0 0xB0
Word 1 0xB1
2 0xB3 0xB2 1 0xB3 0xB2 2 0xB2
3 0xB3
Byte 0 0xB0 0 0xB0 0 0xB0
1 0xB1 0xB1 1 0xB1
2 0xB2 1 0xB2 2 0xB2
3 0xB3 0xB3 3 0xB3
At any time point when address/data is valid on the external bus, the strobe signal will
generate a positive edge, which can be used to sample the external data and control
signal.
NOTE
Strobe signal for read data is active (RL + 1) cycles after data
on external bus is valid.
All addresses are byte addresses. "CS0" is a Chip Select 0 base address. "EIM_" is a
prefix of EIM's registers. 'h is a prefix of hexadecimal constant. "//" is a comment
beginning. csba[cs] is a dimension of CS base addresses. "addr" means an address offset
in current CS address space. Examples use CS0 address space, but it may apply to any CS
except for boot mode functionality.
Configuration examples were verfied with the memory models listed below and may
require some adjustments for other family members.
EIM clk
ARVALID
ARLEN 0
ARADDR V1
ARREADY
RVALID
RLSAT
RWSC
CSo
ADV
OE
RW
DATA_IN V1
EIM clk
AWVALID
AWLEN 0
AWADDR V1
AWREADY
WDATA V1
WVALID
WLSAT
AWREADY
WWSC
CSo
WE
ADV
EB
EIM CLK
BCLK
RWSC WWSC
CSo
WEA WEN
WE Write
Read
RADVN+RADVA+1 WADVN+WADVA+1
RADVA RADVN+1 WADVA WADVN+1
ADV
OEA OEN
OE
BEA BEN
BE
Figure 22-4.
RCSA=1,RADVA=2,OEA=1,RADVN=1,RCSN=1,OEN=1,WCSA=1,WEA=1,WADVA=1,BEA=
1,WADVN=1,WCSN=1,WEN=1,BEN=1
EIM CLK
BCLK
RWSC WWSC
CSo
WEN
WE Write
Read
RADVN+RADVA+1 WADVN+WADVA+1
RADVA RADVN+1 WADVN+1
ADV
OEA OEN
OE
BEN
BE
Figure 22-5.
RWSC=5,RCSA=1,RCSN=1,RADVA=1,RADVN=1,OEA=1,OEN=1,WWSC=4,WCSA=0,WCS
N=1,WEA=0,WEN=1,WADVA=1,WADVN=1,BEA=0,BEN=1,CSREC=1
EIM CLK
BCLK
RWSC WWSC
CSo
WEN
WE Write
Read
RAL =1 WAL =1
RADVA CSREC
ADV
OEA
OE
BEA BEN
BE
Figure 22-6.
RAL=1,RCSN=1,RADVA=2,OEA=1,RCSN=1,CSREC=1,WCSA=1,WEA=0,WADVA=0,BEA=
1,WAL=1,WCSN=1,WEN=1,BEN=1
EIM CLK
WWSC WWSC
CSo
WE
ADV
BE
OE
BCLK
Figure 22-7.
WWSC=4,WCSA=0,WEA=0,WADVA=0,BEA=0,WCSN=0,WEN=0,WADVN=0,BEN=0,CSRE
C=0
EIM CLK
WWSC CSREC WWSC
CSo
WE
ADV
Write
BE
OE
BCLK
Figure 22-8.
WWSC=4,WCSA=0,WEA=0,WADVA=0,BEA=0,WCSN=0,WEN=0,WADVN=0,BEN=0,CSRE
C=2
EIM CLK
WWSC WWSC
CSo
WEA WEN WEA
WE
WADVA+WADVN+1
ADV
BEA BEN
Write
BE BEA
OE
BCLK
Figure 22-9.
WWSC=7,WCSA=1,WCSN=1,WEA=1,WEN=2,WADVA=0,WADVN=2,BEA=1,BEN=2
EIM CLK
RWSC RWSC
CSo
OE
ADV
Read
BE
WE
BCLK
EIM CLK
RWSC CSREC RWSC
CSo
OE
ADV
WE
BE
BCLK
EIM clock
awvalid
awready
awaddr V1
awlen 1
wvalid
wready
wdata D1 D2
BCLK
CS
WR
ADV
ADDR ADDR
DATA_OUT D1 D2
WAIT
ACLK
ARVALID
ARLEN 4
ARADDR V1
ARREADY
RVALID
RLSAT
RREADY
CSo
ADV
OEA
OE
ACLK
ARVALID
ARLEN 0
V1
ARADDR
ARREADY
RDATA V1 Word
RVALID
CSo
RW
ADV
OE
DAPS Sync Time
DTACK
DATA_IN V1 Word
ACLK
ARVALID
ARLEN 0
ARADDR V1
ARREADY
RDATA V1 Word
RVALID
CSo
RW
ADV
OE
Sync Time
DTACK
DATA_IN V1 Word
ACLK
ARVALID
ARLEN 0
ARADDR V1
ARREADY
RDATA V1 Word
RVALID
CSo
RW
ADV
OE
Sync Time
DTACK
DATA_IN V1 Word
ACLK
AWVALID
AWLEN 0
AWADDR V1
AWREADY
WDATA V1 word
WVALID
CSo
OE
ADV
WE
DAPS Sync Time
DTACK
DATA_OUT V1 Word
ACLK
ARVALID
ARLEN 1
ARADDR V1
ARREADY
RVALID
CSo
RW
ADV
OE
DAPS Sync Time DAPS Sync Time
DTACK
The EIM includes 33 user-accessible 32-bit registers. The the EIM Configuration
Register (EIM_WCR) contains control bits that configure the EIM for certain operation
modes.
The 160 bits used to control Individual Chip Select are divided into five registers:
• Chip Select n General Configuration Register 1 (EIM_CSnGCR1)
• Chip Select n General Configuration Register 2 (EIM_CSnGCR2)
• Chip Select n Read Configuration Register 1 (EIM_CSnRCR1)
• Chip Select n Read Configuration Register 2 (EIM_CSnRCR2)
• Chip Select n Write Configuration Register (EIM_CSnWCR)
In addition there are 3 general registers: EIM_WCR, EIM_WIAR, and EIM_EAR.
NOTE
• All EIM registers are sampled by IPG_CLK_S, therefore
IPG_CLK_S must be active when accessing through IP
bus.
• Read access from all registers (except EIM_WIAR and
EIM_EAR) will generate one IPG_XFR_WAIT cycle.
• Read access from EIM_WIAR and EIM_EAR will
generate six IPG_XFR_WAIT cycles.
• Write access to all registers (except EIM_EAR) will
generate three IPG_XFR_WAIT cycles.
• Write access to EIM_EAR will generate six
IPG_XFR_WAIT cycles.
EIM memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
Chip Select n General Configuration Register 1
21B_8000 32 R/W 0061_0088h 22.9.1/883
(EIM_CS0GCR1)
Chip Select n General Configuration Register 2
21B_8004 32 R/W 0000_1010h 22.9.2/887
(EIM_CS0GCR2)
Chip Select n Read Configuration Register 1
21B_8008 32 R/W 1C00_2000h 22.9.3/888
(EIM_CS0RCR1)
Chip Select n Read Configuration Register 2
21B_800C 32 R/W 0000_0000h 22.9.4/891
(EIM_CS0RCR2)
Chip Select n Write Configuration Register 1
21B_8010 32 R/W 1C00_0000h 22.9.5/892
(EIM_CS0WCR1)
Chip Select n Write Configuration Register 2
21B_8014 32 R/W 0000_0000h 22.9.6/895
(EIM_CS0WCR2)
Chip Select n General Configuration Register 1
21B_8018 32 R/W 0061_0088h 22.9.1/883
(EIM_CS1GCR1)
Table continues on the next page...
Reset 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CSEN
BCS BCD WC BL CREP CRE RFL WFL MUM SRD SWR
W
Reset 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
000 minimum of 0 EIM clock cycles before next access from different chip select (async. mode only)
001 minimum of 1 EIM clock cycles before next access from different chip select
010 minimum of 2 EIM clock cycles before next access from different chip select
111 minimum of 7 EIM clock cycles before next access from different chip select
23 Address UnShifted. This bit indicates an unshifted mode for address assertion for the relevant chip select
AUS accesses. AUS bit is cleared by hardware reset.
0 Address shifted according to port size (DSZ config) (128 Mbyte maximum supported memory density).
1 Address unshifted (32 Mbyte maximum supported memory density).
22–20 CS Recovery. This bit field, according to the settings shown below, determines the minimum pulse width
CSREC of CS, OE, and WE control signals before executing a new back to back access to the same chip select.
CSREC is cleared by a hardware reset.
NOTE: The reset value for EIM_CS0GCR1, CSREC[2:0] is 0b110. For EIM_CS1GCR1 - EIM_CS5GCR,
the reset value is 0b000.
Example settings:
000 0 EIM clock cycles minimum width of CS, OE and WE signals (read async. mode only)
001 1 EIM clock cycles minimum width of CS, OE and WE signals
010 2 EIM clock cycles minimum width of CS, OE and WE signals
111 7 EIM clock cycles minimum width of CS, OE and WE signals
19 Supervisor Protect. This bit prevents accesses to the address range defined by the corresponding chip
SP select when the access is attempted in the User mode. SP is cleared by a hardware reset.
0 User mode accesses are allowed in the memory range defined by chip select.
1 User mode accesses are prohibited. All attempts to access an address mapped by this chip select in
User mode results in an error response and no assertion of the chip select output.
18–16 Data Port Size. This bit field defines the width of an external device's data port as shown below.
DSZ
NOTE: Only async. access supported for 8 bit port.
NOTE: The reset value for EIM_CS0GCR1, DSZ[2] = 0, DSZ[1:0] = EIM_BOOT[1:0]. For EIM_CS1GCR1
- EIM_CS5GCR1, the reset value is 0b001.
000 Reserved.
001 16 bit port resides on DATA[15:0]
010 16 bit port resides on DATA[31:16]
011 32 bit port resides on DATA[31:0]
100 8 bit port resides on DATA[7:0]
101 8 bit port resides on DATA[15:8]
110 8 bit port resides on DATA[23:16]
111 8 bit port resides on DATA[31:24]
15–14 Burst Clock Start. When SRD=1 or SWR=1,this bit field determines the number of EIM clock cycles delay
BCS from start of access before the first rising edge of BCLK is generated.
When BCD=0 value of BCS=0 results in a half clock delay after the start of access. For other values of
BCD a one clock delay after the start of access is applied, not an immediate assertion. BCS is cleared by
a hardware reset.
NOTE: For other then the mentioned below frequency such as 104 MHz, EIM clock (input clock) should
be adjust accordingly.
000 4 words Memory wrap burst length (read page burst size when APR = 1)
001 8 words Memory wrap burst length (read page burst size when APR = 1)
010 16 words Memory wrap burst length (read page burst size when APR = 1)
011 32 words Memory wrap burst length (read page burst size when APR = 1)
100 Continuous burst length (2 words read page burst size when APR = 1)
101 Reserved
110 Reserved
111 Reserved
7 Configuration Register Enable Polarity. This bit indicates CRE memory pin assertion state, active-low or
CREP active-high, while executing a memory register set command to the external device (PSRAM memory
type). CREP is set by a hardware reset.
NOTE: Whenever PSRAM is connected the CREP value must be correct also for accesses where CRE
is disabled.
For Non-PSRAM memory CREP value should be 1.
0 the External device WAIT signal is being monitored, and it reflect the external data bus state
1 the state of the External devices is determined internally (Fix latency mode only)
4 Write Fix Latency. This bit field determine if the controller is monitoring the WAIT signal from the External
WFL device connected to the chip select (handshake mode - fix or variable data latency) or if it start data
transfer according to WWSC field, it only valid in synchronous mode. WFL is cleared by a hardware reset.
When WFL=1 Burst access is terminated on page boundary and resume on the following page according
to BL bit field configuration, because WAIT signal is not monitored from the external device
0 the External device WAIT signal is being monitored, and it reflect the external data bus state
1 the state of the External devices is determined internally (Fix latency mode only)
3 Multiplexed Mode. This bit determines the address/data multiplexed mode for asynchronous and
MUM synchronous accesses for 8 bit, 16 bit or 32 bit devices (DSZ config. dependent).
NOTE: Reset value for EIM_CS0GCR1 for CSEN is 1. For EIM_CS1GCR1-CS1GCR5 reset value is 0.
0 Chip select function is disabled; attempts to access an address mapped by this chip select results in
an error respond and no assertion of the chip select output
1 Chip select is enabled, and is asserted when presented with a valid access.
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MUX16_BYP_
R 0 0 0
GRANT
Reset 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0
0000 3 EIM clk cycle between start of access and first DTACK check
0001 4 EIM clk cycles between start of access and first DTACK check
0010 5 EIM clk cycles between start of access and first DTACK check
0111 10 EIM clk cycles between start of access and first DTACK check
1011 14 EIM clk cycles between start of access and first DTACK check
1111 18 EIM clk cycles between start of access and first DTACK check
3–2 This read-only field is reserved and always has the value 0.
Reserved
ADH Address hold time - This bit field determine the address hold time after ADV negation when mum = 1
(muxed mode).
When mum = 0 this bit has no effect. For read accesses the field determines when the pads direction will
be switched.
NOTE: Reset value for EIM_CS0GCR2 for ADH is 0b10. For EIM_CS1GCR2-EIM_CS5GCR2 reset
value is 0b00.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0 0 0
OEA OEN RCSA RCSN
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The reset value for EIM_CS0RCR1, RWSC[5:0] = 0b011100. For CG1RCR1 - CS1RCR5 the
reset value is 0b000000.
Example settings:
000000 Reserved
000001 RWSC value is 1
000010 RWSC value is 2
111101 RWSC value is 61
111110 RWSC value is 62
111111 RWSC value is 63
23 This read-only field is reserved and always has the value 0.
Reserved
22–20 ADV Assertion. This bit field determines when ADV signal is asserted for synchronous or asynchronous
RADVA read modes according to the settings shown below. RADVA is cleared by a hardware reset.
Example settings:
000 0 EIM clock cycles between beginning of access and ADV assertion
001 1 EIM clock cycles between beginning of access and ADV assertion
010 2 EIM clock cycles between beginning of access and ADV assertion
111 7 EIM clock cycles between beginning of access and ADV assertion
19 Read ADV Low. This bit field determine ADV signal negation time. When RAL=1, RADVN bit field is
RAL ignored and ADV signal will stay asserted until end of access. When RAL=0 negation of ADV signal is
according to RADVN bit field configuration.
18–16 ADV Negation. This bit field determines when ADV signal to memory is negated during read accesses.
RADVN
When SRD=1 (synchronous read mode), ADV negation occurs according to the following formula:
(RADVN + RADVA + BCD + BCS + 1) EIM clock cycles from start of access.
When asynchronous read mode is applied (SRD=0) and RAL=0 ADV negation occurs according to the
following formula: (RADVN + RADVA + 1) EIM clock cycles from start of access. RADVN is cleared by a
hardware reset.
NOTE: The reset value for EIM_CS0RCR1[RADVN] = 0b010. For EIM_CS1RCR1 - EIM_CS5RCR1, the
reset value is 0b000.
NOTE: This field should be configured so ADV negation will occur before the end of access. For ADV
negation at the same time with the end of access user should RAL bit.
NOTE: The reset value for EIM_CS0RCR1[OEA] is 0b000 if EIM_BOOT[2] = 0. If EIM_BOOT[2] is 1, the
reset value for EIM_CS0RCR1[OEA] is 0b010. The reset value of this field for EIM_CS1RCR1 -
EIM_CS5RCR1 is 0b000.
Example settings:
000 0 EIM clock cycles between beginning of read access and CS assertion
001 1 EIM clock cycles between beginning of read access and CS assertion
010 2 EIM clock cycles between beginning of read access and CS assertion
111 7 EIM clock cycles between beginning of read access and CS assertion
3 This read-only field is reserved and always has the value 0.
Reserved
RCSN Read CS Negation. This bit field determines when CS signal is negated during read cycles in
asynchronous single mode only (SRD=0 and APR = 0), according to the settings shown below. This bit
field is ignored when SRD=1. RCSN is cleared by a hardware reset.
Example settings:
000 0 EIM clock cycles between end of read access and CS negation
001 1 EIM clock cycles between end of read access and CS negation
010 2 EIM clock cycles between end of read access and CS negation
111 7 EIM clock cycles between end of read access and CS negation
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0
APR PAT RL RBEA RBE RBEN
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00 Feedback clock loop delay is up to 1 cycle for BCD = 0 or 1.5 cycles for BCD != 0
01 Feedback clock loop delay is up to 2 cycles for BCD = 0 or 2.5 cycles for BCD != 0
Table continues on the next page...
000 0 EIM clock cycles between beginning of read access and BE assertion
001 1 EIM clock cycles between beginning of read access and BE assertion
010 2 EIM clock cycles between beginning of read access and BE assertion
111 7 EIM clock cycles between beginning of read access and BE assertion
3 Read BE enable. This bit field determines if BE will be asserted during read access.
RBE
0 BE are disabled during read access.
1 BE are enable during read access according to value of RBEA and RBEN bit fields.
RBEN Read BE Negation. This bit field determines when BE signal is negated during read cycles in
asynchronous single mode only (SRD=0 and APR=0), according to the settings shown below. This bit field
is ignored when SRD=1. RBEN is cleared by a hardware reset.
Example settings:
000 0 EIM clock cycles between end of read access and BE negation
001 1 EIM clock cycles between end of read access and BE negation
010 2 EIM clock cycles between end of read access and BE negation
111 7 EIM clock cycles between end of read access and BE negation
R
WBED
Reset 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
WBE
WBEN WEA WEN WCSA WCSN
A
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The reset value for EIM_CS0WCR1, WWSC[5:0] = 0b011100. For EIM_CS1WCR1 -
EIM_CS5WCR1, the reset value of this field is 0b000000.
Example settings:
000000 Reserved
000001 WWSC value is 1
000010 WWSC value is 2
000011 WWSC value is 3
111111 WWSC value is 63
23–21 ADV Assertion. This bit field determines when ADV signal is asserted for synchronous or asynchronous
WADVA write modes according to the settings shown below. WADVA is cleared by a hardware reset.
Example settings:
000 0 EIM clock cycles between beginning of access and ADV assertion
001 1 EIM clock cycles between beginning of access and ADV assertion
010 2 EIM clock cycles between beginning of access and ADV assertion
111 7 EIM clock cycles between beginning of access and ADV assertion
20–18 ADV Negation. This bit field determines when ADV signal to memory is negated during write accesses.
WADVN
When SWR=1 (synchronous write mode), ADV negation occurs according to the following formula:
(WADVN + WADVA + BCD + BCS + 1) EIM clock cycles.
When asynchronous read mode is applied (SWR=0) ADV negation occurs according to the following
formula: (WADVN + WADVA + 1) EIM clock cycles.
NOTE: Reset value for EIM_CS0WCR for WADVN is 0b010. For EIM_CS1WCR - EIM_CS5WCR reset
value is 0b000.
NOTE: This field should be configured so ADV negation will occur before the end of access. For ADV
negation at the same time as the end of access, S/W should set the WAL bit.
17–15 BE Assertion. This bit field determines when BE signal is asserted during write cycles in async. mode only
WBEA (SWR=0), according to the settings shown below. BEA is cleared by a hardware reset.
Table continues on the next page...
NOTE: Reset value for EIM_CS0WCR for WBEN is 0b010. For EIM_CS1WCR - EIM_CS5WCR reset
value is 0b000.
Example settings:
NOTE: Reset value for EIM_CS0WCR for WEA is 0b010. For EIM_CS1WCR - EIM_CS5WCR reset
value is 0b000.
Example settings:
NOTE: Reset value for EIM_CS0WCR for WEN is 0b010. For EIM_CS1WCR - EIM_CS5WCR reset
value is 0b000.
Example settings:
000 0 EIM clock cycles between beginning of write access and CS assertion
Table continues on the next page...
000 0 EIM clock cycles between end of read access and CS negation
001 1 EIM clock cycles between end of read access and CS negation
010 2 EIM clock cycles between end of read access and CS negation
111 7 EIM clock cycles between end of read access and CS negation
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
WBCDD
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WDOG_EN
R 0 0 0
INTPOL
INTEN
WDOG_
GBCD BCM
LIMIT
W
Reset 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
NOTE: The BCLK frequency in this mode is according to GBCD bit field.
NOTE: The BCLK phase is opposite to the EIM clock in this mode if GBCD is 0.
NOTE: This bit should be used only in async. accesses. No sync access can be executed if this bit is set.
0 The burst clock runs only when accessing a chip select range with the SWR/SRD bits set. When the
burst clock is not running it remains in a logic 0 state. When the burst clock is running it is configured
by the BCD and BCS bit fields in the chip select Configuration Register.
1 The burst clock runs whenever ACLK is active (independent of chip select configuration)
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0
ACLK_EN
R
ERRST
IPS_ IPS_
INT
ACK REQ
W
Reset 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 ACLK is disabled
1 ACLK is enabled
3 READY After Reset. This bit controls the initial ready/busy status for external devices on CS0 immediately
ERRST after hardware reset. This is a sticky bit which is cleared once the RDY_INT signal is asserted by the
external device.
When ERRST = 1 the first fetch access from EIM to the external device located on CS0 will be pending
until RDY_INT signal indicates that the external device is ready, then EIM will execute the access.
Bit 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
R
W
Error_ADDR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
23.1 Introduction
The MAC-NET core, in conjunction with a 10/100/1000-Mbit/s MAC, implements layer
3 network acceleration functions. These functions are designed to accelerate the
processing of various common networking protocols, such as IP, TCP, UDP, and ICMP,
providing wire speed services to client applications.
23.2 Overview
The core implements a triple-speed 10/100/1000-Mbit/s Ethernet MAC compliant with
the IEEE802.3-2002 standard. The MAC layer provides compatibility with half- or full-
duplex 10/100-Mbit/s and full-duplex gigabit Ethernet LANs.
The MAC operation is fully programmable and can be used in Network Interface Card
(NIC), bridging, or switching applications. The core implements the remote network
monitoring (RMON) counters according to IETF RFC 2819.
The core also implements a hardware acceleration block to optimize the performance of
network controllers providing TCP/IP, UDP, and ICMP protocol services. The
acceleration block performs critical functions in hardware, which are typically
implemented with large software overhead.
The core implements programmable embedded FIFOs that can provide buffering on the
receive path for lossless flow control.
Advanced power management features are available with magic packet detection and
programmable power-down modes.
A unified DMA (uDMA), internal to the ENET module, optimizes data transfer between
the ENET core and the SoC, and supports an enhanced buffer descriptor programming
model to support IEEE 1588 functionality.
The programmable Ethernet MAC with IEEE 1588 integrates a standard IEEE 802.3
Ethernet MAC with a time-stamping module. The IEEE 1588 standard provides accurate
clock synchronization for distributed control nodes for industrial automation applications.
23.2.1 Features
The MAC-NET core includes the following features.
• Provides IPv6 support to datagrams with base header only — datagrams with
extension headers are passed transparently unmodifed/unchecked
• Provides statistics information for received IP and protocol errors
• Configurable automatic discard of erroneous frames
• Configurable automatic host-to-network (RX) and network-to-host (TX) byte order
conversion for IP and TCP/UDP/ICMP headers within the frame
• Configurable padding remove for short IP datagrams on receive
• Configurable Ethernet payload alignment to allow for 32-bit word-aligned header
and payload processing
• Programmable store-and-forward operation with clock and rate decoupling FIFOs
MII/RMII/RGMII
RX control
application
TCP/IP
interface
Receive
interface
receive
RX performance
FIFO
optimization
CRC Pause frame
AHB check terminate
system
bus I/F
MII/RMII/RGMII
TX control
application
TCP/IP
interface
interface
Transmit
transmit
TX performance
FIFO optimization
CRC Pause frame
generate generate
management
interface
Configuration MDIO
PHY
statistics master
Register interface
23.4 Clocks
The table found here describes the clock sources for ENET. Please see Clock Controller
Module (CCM) for clock setting, configuration and gating information.
Table 23-2. ENET Clocks
Clock name Clock Root Description
ipg_clk ahb_clk_root Module clock
ipg_clk_mac0 ahb_clk_root MAC peripheral clock
ipg_clk_mac0_s ipg_clk_root MAC peripheral access clock
ipg_clk_s ipg_clk_root Peripheral access clock
ipg_clk_time ipg_clk_root Peripheral clock
mac0_rxmem_clk ahb_clk_root MAC receive memory clock
mac0_txmem_clk ahb_clk_root MAC transmit memory clock
NOTE
The ENET module requires ahb_clk_root to be 125 MHz or
greater.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TS_AVAIL
WAKEUP
EBERR
BABR
BABT
GRA
UN
0 TXF TXB RXF RXB MII PLR
LC
RL
R
W w1c w1c w1c w1c w1c w1c w1c w1c w1c w1c w1c w1c w1c w1c w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TS_TIMER
W w1c 0 0 0 0 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The GRA interrupt is asserted only when the TX transitions into the stopped state. If this bit is
cleared by writing 1 and the TX is still stopped, the bit is not set again.
27 Transmit Frame Interrupt
TXF
Indicates a frame has been transmitted and the last corresponding buffer descriptor has been updated.
26 Transmit Buffer Interrupt
TXB
Indicates a transmit buffer descriptor has been updated.
25 Receive Frame Interrupt
RXF
Indicates a frame has been received and the last corresponding buffer descriptor has been updated.
24 Receive Buffer Interrupt
RXB
Indicates a receive buffer descriptor is not the last in the frame has been updated.
23 MII Interrupt.
MII
Indicates that the MII has completed the data transfer requested.
22 Ethernet Bus Error
EBERR
Indicates a system bus error occurred when a uDMA transaction is underway. When this bit is set,
ECR[ETHEREN] is cleared, halting frame processing by the MAC. When this occurs, software must
ensure proper actions, possibly resetting the system, to resume normal operation.
21 Late Collision
LC
Indicates a collision occurred beyond the collision window (slot time) in half-duplex mode. The frame
truncates with a bad CRC and the remainder of the frame is discarded.
20 Collision Retry Limit
RL
Indicates a collision occurred on each of 16 successive attempts to transmit the frame. The frame is
discarded without being transmitted and transmission of the next frame commences. This error can only
occur in half-duplex mode.
19 Transmit FIFO Underrun
UN
Indicates the transmit FIFO became empty before the complete frame was transmitted.
NOTE: In situations where the device has various masters generating high traffic, a FIFO underrun can
occur on the transmit FIFO. To avoid transmit FIFO underrun, store and forward can be enabled
Table continues on the next page...
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TS_AVAIL
R
WAKEUP
EBERR
BABR BABT GRA TXF TXB RXF RXB MII LC RL UN PLR
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TS_TIMER
W 0 0 0 0 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RDAR is a command register, written by the user, to indicate that the receive descriptor
ring has been updated, that is, that the driver produced empty receive buffers with the
empty bit set.
Address: 218_8000h base + 10h offset = 218_8010h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 0
RDAR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 0
TDAR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
RXC_ TXC_
Reserved
DLY DLY
W
Reset 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ETHEREN
MAGICEN
R
Reserved
Reserved
Reserved
STOPEN
DBSWP
EN1588
DBGEN
SPEED
RESET
SLEEP
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 The buffer descriptor bytes are not swapped to support big-endian devices.
1 The buffer descriptor bytes are swapped to support little-endian devices.
7 STOPEN Signal Control
STOPEN
Controls device behavior in doze mode.
In doze mode, if this field is set then all the clocks of the ENET assembly are disabled, except the
RMII /MII clock. Doze mode is similar to a conditional stop mode entry for the ENET assembly depending
on ECR[STOPEN].
NOTE: If module clocks are gated in this mode, the module can still wake the system after receiving a
magic packet in stop mode. MAGICEN must be set prior to entering sleep/stop mode.
6 Debug Enable
DBGEN
Enables the MAC to enter hardware freeze mode when the device enters debug mode.
NOTE: MAGICEN is relevant only if the SLEEP field is set. If MAGICEN is set, changing the SLEEP field
enables/disables sleep mode and magic packet detection.
NOTE: EIMR[WAKEUP] must be written to one if Magic packet wakeup is programed to wake up the chip
from low power mode.
NOTE: • ETHEREN must be set at the very last step during ENET configuration/setup/initialization,
only after all other ENET-related registers have been configured.
• If ETHEREN is cleared to 0 by software then next time ETHEREN is set, the EIR interrupts
must cleared to 0 due to previous pending interrupts.
0 Reception immediately stops and transmission stops after a bad CRC is appended to any currently
transmitted frame.
1 MAC is enabled, and reception and transmission are possible.
0 Ethernet MAC Reset
RESET
When this field is set, it clears the ETHEREN field.
Bit 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
R
W
ST OP PA RA TA DATA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This is the field for data to be written to or read from the PHY register.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 DIS_ 0
HOLDTIME MII_SPEED
W PRE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Preamble enabled.
1 Preamble (32 ones) is not prepended to the MII management frame.
6–1 MII Speed
MII_SPEED
Controls the frequency of the MII management interface clock (MDC) relative to the internal module clock.
A value of 0 in this field turns off MDC and leaves it in low voltage state. Any non-zero value results in the
MDC frequency of:
1/((MII_SPEED + 1) x 2) of the internal module clock frequency
0 This field is reserved.
Reserved This read-only field is reserved and always has the value 0.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MIB_IDLE
R 0
MIB_CLEAR
MIB_DIS
Reset 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: This field is not self-clearing. To clear the MIB counters set and then clear this field.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GRS
NLC MAX_FL
Reset 0 0 0 0 0 1 0 1 1 1 1 0 1 1 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
RMII_MODE
MII_MODE
RGMII_EN
CRCFWD
RMII_10T
PAUFWD
PADEN
PROM
LOOP
CFEN
BC_
FCE DRT
REJ
W 0 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 MAC control frames with any opcode other than 0x0001 (pause frame) are accepted and forwarded to
the client interface.
1 MAC control frames with any opcode other than 0x0001 (pause frame) are silently discarded.
14 Terminate/Forward Received CRC
CRCFWD
Specifies whether the CRC field of received frames is transmitted or stripped.
NOTE: If padding function is enabled (PADEN = 1), CRCFWD is ignored and the CRC field is checked
and always terminated and removed.
0 Disabled.
1 Enabled.
2 Media Independent Interface Mode
MII_MODE
This field must always be set.
0 Reserved.
1 MII or RMII mode, as indicated by the RMII_MODE field.
1 Disable Receive On Transmit
DRT
0 Receive path operates independently of transmit (i.e., full-duplex mode). Can also be used to monitor
transmit activity in half-duplex mode.
1 Disable reception of frames while transmitting. (Normally used for half-duplex mode.)
0 Internal Loopback
LOOP
This is an MII internal loopback, therefore MII_MODE must be written to 1 and RMII_MODE must be
written to 0.
0 Loopback disabled.
1 Transmitted frames are looped back internal to the device and transmit MII output signals are not
asserted. DRT must be cleared.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RFC_PAUSE
R 0
TFC_PAUSE
CRCFWD
Reserved
ADDINS
FDEN
ADDSEL GTS
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
PADDR1
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bytes 0 (bits 31:24), 1 (bits 23:16), 2 (bits 15:8), and 3 (bits 7:0) of the 6-byte individual address are used
for exact match and the source address field in PAUSE frames.
Bit 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
R TYPE
PADDR2
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0
Bit 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
R OPCODE
PAUSE_DUR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
IADDR1
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
IADDR2
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
GADDR1
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
GADDR2
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0
STRFWD
TFWR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
If TFWR[STRFWD] is cleared, this field indicates the number of bytes, in steps of 64 bytes, written to the
transmit FIFO before transmission of a frame begins.
NOTE: If a frame with less than the threshold is written, it is still sent independently of this threshold
setting. The threshold is relevant only if the frame is larger than the threshold given.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
R_DES_START
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
R_DES_START
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
TDSR provides a pointer to the beginning of the circular transmit buffer descriptor queue
in external memory. This pointer must be 64-bit aligned (bits 2–0 must be zero);
however, it is recommended to be 128-bit aligned, that is, evenly divisible by 16.
NOTE
This register must be initialized prior to operation.
Address: 218_8000h base + 184h offset = 218_8184h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
X_DES_START
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
X_DES_START
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 0
R_BUF_SIZE
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 RX_SECTION_FULL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 0 0 RX_SECTION_EMPTY
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 RX_ALMOST_EMPTY
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Bit 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
R 0 RX_ALMOST_FULL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Bit 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
R 0 TX_SECTION_EMPTY
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TX_ALMOST_EMPTY
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Bit 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
R 0 TX_ALMOST_FULL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
NOTE: A FIFO overflow is a fatal error and requires a global reset on the transmit datapath or at least
deassertion of ETHEREN.
Bit 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
R 0 IPG
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
Indicates the IPG, in bytes, between transmitted frames. Valid values range from 8 to 26. If the written
value is less than 8 or greater than 26, the internal (effective) IPG is 12.
NOTE: The IPG value read will be the value that was written, even if it is out of range.
Bit 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
R 0 TRUNC_FL
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1
Indicates the value a receive frame is truncated, if it is greater than this value. Must be greater than or
equal to RCR[MAX_FL].
NOTE: Truncation happens at TRUNC_FL. However, when truncation occurs, the application (FIFO) may
receive less data, guaranteeing that it never receives more than the set limit.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
PROCHK
SHIFT16
IPCHK
W 0 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
PADREM
SHIFT16
LINEDIS
PRODIS
IPDIS
W 0 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: This function only affects the FIFO storage and has no influence on the statistics, which use the
actual length of the frame received.
0 Disabled.
1 Instructs the MAC to write two additional bytes in front of each frame received into the RX FIFO.
6 Enable Discard Of Frames With MAC Layer Errors
LINEDIS
0 Frames with errors are not discarded.
1 Any frame received with a CRC, length, or PHY error is automatically discarded and not forwarded to
the user application interface.
5–3 This field is reserved.
Reserved This write-only field is reserved. It must always be written with the value 0.
2 Enable Discard Of Frames With Wrong Protocol Checksum
PRODIS
0 Frames with wrong checksum are not discarded.
1 If a TCP/IP, UDP/IP, or ICMP/IP frame is received that has a wrong TCP, UDP, or ICMP checksum,
the frame is discarded. Discarding is only available when the RX FIFO operates in store and forward
mode (RSFL cleared).
1 Enable Discard Of Frames With Wrong IPv4 Header Checksum
IPDIS
0 Frames with wrong IPv4 header checksum are not discarded.
1 If an IPv4 frame is received with a mismatching header checksum, the frame is discarded. IPv6 has no
header checksum and is not affected by this setting. Discarding is only available when the RX FIFO
operates in store and forward mode (RSFL cleared).
0 Enable Padding Removal For Short IP Frames
PADREM
0 Padding not removed.
1 Any bytes following the IP payload section of the frame are removed from the frame.
Bit 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
R Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 TXPKTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R TXOCTS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: Does not increment for the broadcast frames when broadcast reject is enabled and promiscuous
mode is disabled within the receive control register (RCR).
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: Counts total octets (includes header and FCS fields). Does not increment for the broadcast
frames when broadcast reject is enabled and promiscuous mode is disabled within the receive
control register (RCR).
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0
CAPTURE
RESTART
R
Reserved
Reserved
OFFRST
PINPER
PEREN
OFFEN
SLAVE
EN
W 0 0 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: Timer slave mode is not supported on this device. This field must be set to 0.
0 The timer is active and all configuration fields in this register are relevant.
1 The internal timer is disabled and the externally provided timer value is used. All other fields, except
CAPTURE, in this register have no effect. CAPTURE can still be used to capture the current timer
value.
12 This field is reserved.
Reserved Always write 0 to this field.
11 Capture Timer Value
CAPTURE
When this field is set, all other fields are ignored during a write. This field automatically clears to 0 after the
command completes.
NOTE: To ensure that the correct time value is read from the ATVR register, a minimum amount of time
must elapse from issuing this command to reading the ATVR register. This minimum time is
defined by the greater of either six register clock cycles or six 1588/timestamp clock cycles.
0 No effect.
1 The current time is captured and can be read from the ATVR register.
10 This field is reserved.
Reserved Always write 0 to this field.
9 Reset Timer
RESTART
Resets the timer to zero. This has no effect on the counter enable. If the counter is enabled when this field
is set, the timer is reset to zero and starts counting from there. When set, all other fields are ignored during
a write. This field automatically clears to 0 after the command completes. RESTART should be used when
the timer is enabled.
NOTE: The Reset Timer command requires at least 6 clock cycles of either the register clock or the
1588/timestamp clock, whichever is greater, to complete.
8 This field is reserved.
Reserved
7 Enables event signal output assertion on period event.
PINPER
NOTE: Not all devices contain the event signal output. See the chip configuration details.
0 Disable.
1 Enable.
6 This field is reserved.
Reserved
5 This field is reserved.
Reserved
NOTE: This field must be written always with one.
4 Enable Periodical Event
PEREN
Table continues on the next page...
NOTE: Not all devices contain the event signal output. See the chip configuration details.
3 Reset Timer On Offset Event
OFFRST
0 The timer is not affected and no action occurs, besides clearing OFFEN, when the offset is reached.
1 If OFFEN is set, the timer resets to zero when the offset setting is reached. The offset event does not
cause a timer interrupt.
2 Enable One-Shot Offset Event
OFFEN
0 Disable.
1 The timer can be reset to zero when the given offset time is reached (offset event). The field is cleared
when the offset event is reached, so no further event occurs until the field is set again. The timer offset
value must be set before setting this field.
1 This field is reserved.
Reserved
0 Enable Timer
EN
0 The timer stops at the current value.
1 The timer starts incrementing.
Bit 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
R
W
ATIME
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
OFFSET
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
PERIOD
Reset 0 0 1 1 1 0 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 COR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
COR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: This value is given in clock cycles, not in nanoseconds as all other values.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0
INC_CORR INC
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The timer increments by this amount each clock cycle. For example, set to 10 for 100 MHz, 8 for 125 MHz,
5 for 200 MHz.
NOTE: For highest precision, use a value that is an integer fraction of the period set in ATPER.
Bit 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
R TIMESTAMP
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0
TF
R
Reserved
Reserved TMODE TDRE
W w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This register is double buffered between the module clock and 1588 clock domains.
When configured for compare, the 1588 clock domain updates with the value in the module clock domain
whenever the Timer Channel is first enabled and on each subsequent compare. Write to this register with
the first compare value before enabling the Timer Channel. When the Timer Channel is enabled, write the
second compare value either immediately, or at least before the first compare occurs. After each compare,
write the next compare value before the previous compare occurs and before clearing the Timer Flag.
The compare occurs one 1588 clock cycle after the IEEE 1588 Counter increments past the compare
value in the 1588 clock domain. If the compare value is less than the value of the 1588 Counter when the
Timer Channel is first enabled, then the compare does not occur until following the next overflow of the
7 octets Preamble
1 octet SFD
Optionally, MAC frames can be VLAN-tagged with an additional four-byte field inserted
between the MAC source address and the type/length field. VLAN tagging is defined by
the IEEE P802.1q specification. VLAN-tagged frames have a maximum length of 1522
bytes, excluding the preamble and the SFD bytes.
7 octets Preamble
1 octet SFD
Note
Although the IEEE specification defines a maximum frame
length, the MAC core provides the flexibility to program any
value for the frame maximum length.
There is no payload length field found within a pause frame and a pause frame is always
padded with 42 bytes (0x00).
If a pause frame with a pause value greater than zero (XOFF condition) is received, the
MAC stops transmitting data as soon the current frame transfer is completed. The MAC
stops transmitting data for the value defined in pause quanta. One pause quanta fraction
refers to 512 bit times.
If a pause frame with a pause value of zero (XON condition) is received, the transmitter
is allowed to send data immediately (see Full-duplex flow control operation for details).
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 6, 05/2020
NXP Semiconductors 983
Functional description
Source address
Destination address
23.6.3.1.1 UDP/IP
The 1588 messages (v1 and v2) can be transported using UDP/IP multicast messages.
Table 23-17 shows IP multicast groups defined for PTP. The table also shows their
respective MAC layer multicast address mapping according to RFC 1112 (last three
octets of IP follow the fixed value of 01-00-5E).
Table 23-17. UDP/IP multicast domains
Name IP Address MAC Address mapping
DefaultPTPdomain 224.0.1.129 01-00-5E-00-01-81
AlternatePTPdomain1 224.0.1.130 01-00-5E-00-01-82
AlternatePTPdomain2 224.0.1.131 01-00-5E-00-01-83
AlternatePTPdomain3 224.0.1.132 01-00-5E-00-01-84
The type of message is encoded in the messageType and control fields as shown in Table
23-21 :
The PTPv2 flags field contains further details on the type of message, especially if one-
step or two-step implementations are used. The one- or two-step implementation is
controlled by the TWO_STEP bit in the first octet of the flags field as shown below.
Reserved bits are cleared.
Table 23-24. PTPv2 message flags field definitions
Bit Name Description
0 ALTERNATE_MASTER See IEEE 1588 Clause 17.4
1 TWO_STEP 1 Two-step clock
0 One-step clock
2 UNICAST 1 Transport layer address uses a unicast destination address
0 Multicast is used
3 — Reserved
4 — Reserved
5 Profile specific
6 Profile specific
7 — Reserved
If the MAC is programmed to operate in half-duplex mode, it will also check if the frame
is received with a collision.
Collision
Discard
Half duplex only
Receive payload
Remove padding
Verify CRC
Although the IEEE specification dictates that the inner-packet gap should be at least 96
bits, the MAC core is designed to accept frames separated by only 64 10/100-Mbit/s
operation (MII) bits.
The MAC core removes the preamble and SFD bytes.
For example, if eight group addresses are stored in the hash table and random group
addresses are received, the hash table prevents roughly 56/64 (or 87.5%) of the group
address frames from reaching memory. Those that do reach memory must be further
filtered by the processor to determine if they truly contain one of the eight desired
addresses.
The effectiveness of the hash table declines as the number of addresses increases.
The user must initialize the hash table registers. Use this CRC32 polynomial to compute
the hash:
• FCS(x) = x32+ x26+ x23+ x22+ x16+ x12+ x11+ x10+ x8+ x7+ x5+ x4+ x2+ x1+ 1
The 32 bits of the CRC value are placed in the frame check sequence (FCS) field with the
x31 term as right-most bit of the first octet. The CRC bits are thus received in the
following order: x31, x30,..., x1, x0.
If a CRC error is detected, the frame is marked invalid and RxBD[CR] is set.
When the MAC is configured to operate in half-duplex mode, the following additional
tasks are performed:
• Collision detection
• Frame retransmit after back-off timer expires
Send Preamble
Send payload
Send padding
(if necessary)
Send CRC
The 32 bits of the CRC value are placed in the FCS field so that the x31 term is the right-
most bit of the first octet. The CRC bits are thus transmitted in the following order: x31,
x30,..., x1, x0.
MAC Tx Engine
Backoff
Control
Period
PHY
MAC FIFO
Retransmit Enable
Buffer
Control MAC Transmit
address
address
Control
read
write
64x8 Frame
Discard
Retransmit
Buffer
Transmit FIFO
Interface
Interface
MAC Transmit
PHY
Datapath
The backoff time is represented by an integer multiple of slot times. One slot is equal to a
512-bit time period. The number of the delay slot times, before the nth re-transmission
attempt, is chosen as a uniformly-distributed random integer in the range:
• 0 < r < 2k
• k = min(n, N); where n is the number of retransmissions and N = 10
For example, after the first collision, the backoff period is 0 or 1 slot time. If a collision
occurs on the first retransmission, the backoff period is 0, 1, 2, or 3, and so on.
The maximum backoff time (in 512-bit time slots) is limited by N = 10 as specified in the
IEEE 802.3 standard.
If a collision occurs after 16 consecutive retransmissions, the core reports an excessive
collision condition (ENETn_EIR[RL] interrupt field and TxBD[EE]) and discards the
current packet from the FIFO.
In networks violating the standard requirements, a collision may occur after transmission
of the first 64 bytes. In this case, the core stops the current packet transmission and
discards the rest of the packet from the transmit FIFO. The core resumes transmission
with the next packet available in the core transmit FIFO.
warning
Ethernet PHYs that support the SQE Test, or "heartbeat,"
feature must disable this feature. When this feature is enabled,
Frame transfer resumes when the time specified by the quanta expires and if no new
quanta value is received, or if a new pause frame with a quanta value set to 0x0000 is
received. The MAC also resets RFC_PAUSE to zero.
If ENETn_RCR[FCE] cleared, the MAC ignores received pause frames.
Optionally and independent of ENETn_RCR[FCE], pause frames are forwarded to the
client interface if PAUFWD is set.
When an XOFF pause frame is generated, the pause quanta (payload byte P1 and P2) is
filled with the value programmed in ENETn_OPD[PAUSE_DUR].
TFC_PAUSE PAUSE_DUR
Note
Although the flow control mechanism should prevent any FIFO
overflow on the MAC core receive path, the core receive FIFO
is protected. When an overflow is detected on the receive FIFO,
the current frame is truncated with an error indication set in the
frame status word. The frame should subsequently be discarded
by the user application.
When a magic packet is detected, EIR[WAKEUP] is set and none of the statistic registers
are incremented.
23.6.7.3 Wakeup
When a magic packet is detected, indicated by ENETn_EIR[WAKEUP],
ENETn_ECR[SLEEP] should be cleared to resume normal operation of the MAC.
Clearing the SLEEP bit automatically masks ENETn_ECR[MAGICEN], disabling magic
packet detection.
The TCP/UDP length value is the length of the TCP or UDP datagram, which is equal to
the payload of an IP datagram. It is derived by subtracting the IP header length from the
complete IP datagram length that is given in the IP header (IPv4), or directly taken from
the IP header (IPv6). The protocol field is the corresponding value from the IP header.
The Zero fields are all zeroes.
For IPv6, the complete 128-bit addresses are considered. The next header value identifies
the upper layer protocol as either TCP or UDP. It may differ from the next header value
of the IPv6 header if extension headers are inserted before the protocol header.
The checksum calculation uses 16-bit words in network byte order: The first byte sent/
received is the MSB, and the second byte sent/received is the LSB of the 16-bit value to
add to the checksum. If the frame ends on an odd number of bytes, a zero byte is
appended for checksum calculation only, and is not actually transmitted.
Table 23-28. 64-bit interface data structure with SHIFT16 enabled (continued)
Byte 5 Byte 4 Byte 3 Byte 2 Byte 1 Byte 0 Any value Any value
Byte 13 Byte 12 Byte 11 Byte 10 Byte 9 Byte 8 Byte 7 Byte 6
...
If one of the errors occurs and the IP accelerator function is configured to discard frames
(ENETn_RACC), the frame is automatically discarded. Statistics are maintained
normally and are not affected by this discard function.
When the transmitter has reached its stopped state, the following events occur:
• The GRA interrupt is asserted, when transitioned into stopped.
• In Hardware Freeze mode, the GRA interrupt does not wait for the application write
completion and asserts when the transmit state machine (in other words, line side of
TX FIFO) reaches its stopped state.
Note
The assertion of GRS does not wait for an ongoing FIFO read
transaction on the application side of the FIFO (FIFO read).
The GRA interrupt is triggered only once when the stopped state is entered. If the
interrupt is cleared while the stop condition persists, no further interrupt is triggered.
Control/status
Adjustable Events
timer generator
n pulses/sec (pps)
Timing module
Control/status
Data Control
User application
Adjustable
Counter
timer
ENET_ATPER mod
To MAC
Correction
counter
The counter produces the current time. During each time-stamping clock cycle, a constant
value is added to the current time as programmed in ENETn_ATINC. The value depends
on the chosen time-stamping clock frequency. For example, if it operates at 125 MHz,
setting the increment to eight represents 8 ns.
The period, configured in ENETn_ATPER, defines the modulo when the counter wraps.
In a typical implementation, the period is set to 1 × 109 so that the counter wraps every
second, and hence all timestamps represent the absolute nanoseconds within the one
second period. When the period is reached, the counter wraps to start again respecting the
period modulo. This means it does not necessarily start from zero, but instead the counter
is loaded with the value (Current + Inc –(1 × 109)), assuming the period is set to 1 × 109.
The correction counter operates fully independently, and increments by one with each
time-stamping clock cycle. When it reaches the value configured in ENETn_ATCOR, it
restarts and instructs the timer once to increment by the correction value, instead of the
normal value.
The normal and correction increments are configured in ENETn_ATINC. To speed up
the timer, set the correction increment more than the normal increment value. To slow
down the timer, set the correction increment less than the normal increment value.
The correction counter only defines the distance of the corrective actions, not the amount.
This allows very fine corrections and low jitter (in the range of 1 ns) independent of the
chosen clock frequency.
MAC receive
MAC transmit
Line interface
MAC interface
ENETn_RCR[LOOP],
The size of a frame on the FIFO interface may not be a modulo of 64-bit.
The user application may not care about the Ethernet frame formats in full detail. It needs
to provide and receive an Ethernet frame with the following structure:
• Ethernet MAC destination address
• Ethernet MAC source address
• Optional 802.1q VLAN tag (VLAN type and info field)
• Ethernet length/type field
• Payload
Frames on the FIFO interface do not contain preamble and SFD fields, which are inserted
and discarded by the MAC on transmit and receive, respectively.
• On receive, CRC and frame padding can be stripped or passed through transparently.
• On transmit, padding and CRC can be provided by the user application, or appended
automatically by the MAC independently for each frame. No size restrictions apply.
Note
On transmit, if ENETn_TCR[ADDINS] is set, bytes 6–11 of
each frame can be set to any value, since the MAC overwrites
the bytes with the MAC address programmed in the
ENETn_PAUR and ENETn_PALR registers.
Table 23-39. FIFO interface frame format
Byte number Field
0–5 Destination MAC address
VLAN-tagged frames are supported on both transmit and receive, and implement
additional information (VLAN type and info).
Table 23-40. FIFO interface VLAN frame format
Byte number Field
0–5 Destination MAC address
6–11 Source MAC address
12–15 VLAN tag and info
16–17 Length/type field
18–N Payload data
Note
The standard defines that the LSB of the MAC address is sent/
received first, while for all the other header fields — in other
words, length/type, VLAN tag, VLAN info, and pause quanta
— the MSB is sent/received first.
2 Payload (cont.)
3 Payload (cont.)
1 VLAN info VLAN info VLAN tag VLAN tag Source address (cont.)
(low) (high) (0x00) (0x81)
3 Payload (cont.)
If CRC forwarding is enabled (CRCFWD = 0), the last four valid octets of the frame
contain the FCS field. The non-significant bytes of the last word can have any value.
• Asserts the MII error signal (MII_TXER) (1 in Figure 23-16) to indicate that the
fragment already transferred is not valid
• Deasserts the MII transmit enable signal (MII_TXEN) to terminate the frame transfer
(2)
After an underflow, when the application completes the frame transfer (3), the MAC
transmit logic discards any new data available in the FIFO until the end of packet is
reached (4) and sets the enhanced TxBD[UE] field.
The MAC starts to transfer data on the MII interface when the application sends a new
frame with a start of frame indication (5).
4
3
Transmit FIFO
TX CLK
TX ready
FIFO data
Internal signals
section empty
Write enable
Start of packet
End of packet
TX data
TX error status
MII Transmit
External signals
MII_TXCLK
MII_TXEN
MII_TXD[3:0] 55 55
MII_TXER
2 5
1
Note
Overflow is a fatal error and must be addressed by resetting the
core or clearing ENETn_ECR[ETHER_EN], to clear the FIFOs
and prepare for normal operation again.
MII_RXCLK
MII_RXDV
MII_RXD[3:0]
MII_RXER
Receive FIFO
RX CLK
RX ready
Frame available
Internal signals
Data valid
Start of packet
End of packet
RX data
RX error
RX error status
2 3
1
The core implements a master MDIO interface, which can be connected to up to 32 PHY
devices.
All bits are transmitted from left to right (Preamble bits first) and all fields have their
Most-Significant bit sent first (leftmost in above table). The complete frame has a length
of 64 bits (32-bit preamble, 14-bit command, 2-bit bus direction change, 16-bit data).
Each bit is transferred with the rising edge of the MDIO clock (MDC).
The fields and transactions are summarized in the following tables.
Table 23-44. MDIO clause 45 frame field descriptions
Field Description
ST Start indication. Indicates the end of the preamble and start of the frame. This value is 00 for
extended MDIO (Clause 45) frames.
OP Opcode defines if a read or write operation is performed and is programmed with
ENETn_MMFR[OP]. See Table 23-45 for more information.
00 Address write
01 Write operation
10 Read inc. operation
11 Read operation
PRTAD The port address specifies a MDIO port. Each Port can have up to 32 devices which each can have
a separate set of registers.
DEVAD Device address. Up to 32 devices can be addressed (within a port).
TA Turnaround time, programmed with ENETn_MMFR[TA]. Two bit-times are reserved for read
operations to switch the data bus from write to read. The PHY device presents its register contents
in the data phase and drives the bus from the second bit of the turnaround phase.
ADDR/DATA 16-bit address (for address write) or data, set by ENETn_MMFR[DATA], written to or read from the
PHY.
Start
Read ENETn_EIR
N
MII = 1?
RMII_REF_CLK
RMII_CRS_DV
RMII_RXD1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 x x x x x x 0
RMII_RXD0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 x x x x x x 0
If a false carrier is detected (bad SSD), then RXD[1:0] is 10 until the end of the receive
event. This is a unique pattern since a false carrier can only occur at the beginning of a
packet where the preamble is decoded (RXD[1:0] = 01).
RMII_REF_CLK
RMII_CRS_DV
RMII_RXD1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
RMII_RXD0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
In RMII transmit mode, TXD[1:0] provides valid data for each REF_CLK period while
TXEN is asserted.
RMII_REF_CLK
RMII_TXEN
RMII_TXD1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 x x x x x x 0
RMII_TXD0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 x x x x x x 0
Pream bl e SFD D ata
RGMII_TX_CTL TXEN *
* TXERR XOR TXEN
RGMII_TXC
(at receiver)
RGMII_RXC
(at transmitter)
RGMII_RX_CTL RXDV *
* RXERR XOR RXDV
RGMII_RXC
(at receiver)
MII_TXCLK
MII_TXD[3:0] 5 04 05 06 07 08 09 0A 0F 10 11 12 13 14 15 16 17 18 19 1A 1C 1E 1F 20 21 22 23 24 25 26 27 28 29 2B 2E 2F 30 31 32 33 34 35 36 37 38 39 3B 3F 40 99 80 28
MII_TXEN
MII_TXER
If a frame is received on the FIFO interface with an error (for example, RxBD[ME] set)
the frame is subsequently transmitted with the MII_TXER error signal for one clock
cycle at any time during the packet transfer.
CRC-32
Preamble SFD
MII_TXCLK
MII_TXD[3:0] 5
MII_TXEN
MII_TXER
MII_TXCLK
MII_TXD[3:0] 5
MII_TXEN
MII_TXER
MII_CRS
MII_COL
CRC-32
Preamble SFD
MII_RXCLK
MII_RXD[3:0] 5
MII_RXDV
MII_RXER
If the PHY detects an error on the frame received from the line, the PHY asserts the MII
error signal, MII_RXER, for at least one clock cycle at any time during the packet
transfer.
CRC-32
Preamble SFD
MII_RXCLK
MII_RXD[3:0] 5
MII_RXDV
MII_RXER
A frame received on the MII interface with a PHY error indication is subsequently
transferred on the FIFO interface with RxBD[ME] set.
24.1 Overview
EPIT is a 32-bit set-and-forget timer that is capable of providing precise interrupts at
regular intervals with minimal processor intervention. EPIT begins counting after it is
enabled by software.
The following figure shows the EPIT block diagram.
Clock off
ipg_clk_highfreq
Prescaled
Peripheral Bus Clock
Counter Reload
32
Counter Register ITIF EPITn_OUT
32 bit
CMP OM
Load Register
32 bit
ITIE interrupt
Compare Register
32 bit
24.3 Clocks
The table found here describes the clock sources for EPIT.
Please see Clock Controller Module (CCM) for clock setting, configuration and gating
information.
The clock that feeds the prescaler can be selected from among the following sources:
• High-frequency reference clock (ipg_clk_highfreq)
This clock is provided by the Clock Control Module (CCM). This clock remains on
during low-power mode when the peripheral clock is turned off, allowing EPIT to
use this clock in low-power mode. In normal mode, the CCM synchronizes this clock
to ahb_clk; in low-power mode, CCM switches to an unsynchronized version.
• Low-frequency reference clock (ipg_clk_32k)
This 32 kHz reference clock is provided by the CCM. This clock remains on in low-
power mode when the peripheral clock is turned off, so EPIT can use this clock
during low-power mode. In normal mode, the CCM synchronizes this clock to
ahb_clk; in low-power mode, CCM switches to an unsynchronized version. This
clock is derived from the external 32 kHz crystal.
• Peripheral clock (ipg_clk)
This is the peripheral clock (PER Clock) which is provided (and optionally gated) by
the CCM. This clock is typically used in normal operations. In low-power modes, if
the EPIT is programmed to be disabled (via STOPEN or WAITEN), then the
peripheral clock can be switched off.
The clock input source is determined by the CLKSRC field in the control register. The
clock input to the prescaler can also be disabled by setting CLKSRC to 0b00. This field
value should only be changed after first disabling the EPIT by clearing the EN bit in
the EPIT_EPITCR. For other programming requirements that apply while changing
clock source, refer section Change of Clock Source.
The PRESCALER field in the control register is used to select the divide ratio of the
input clock that drives the main counter. The prescaler can divide the input clock by a
value between 1 and 4096. A change in the value of the PRESCALER field is
immediately reflected on its output clock frequency. The following figure shows the
timing for a change in the prescaler value.
Clk
Prescaled Clk
To directly initalize the counter, set the EPIT counter overwrite enable bit
(EPIT_EPITCL[IOVW]) and write to EPIT_EPITLR with the required initialization
value.
24.4.2 Operations
EPIT has a single 32-bit down counter, which starts counting when the block is enabled
by software.
The start value of the counter is loaded from the EPIT load register, which can be written
to at any time by the processor. The value in the compare register determines the time
that the interrupt occurs.
When EPIT is disabled (EN = 0), both the main counter and the prescaler counter freeze
their count at their current count values. When EPIT is re-enabled (EN = 1), the ENMOD
bit, which is a RW bit, decides the counter value:
• If ENMOD is set, the main counter is loaded with the load value (If RLD = 1)/
FFFF FFFFh (If RLD = 0) and the prescaler counter is reset (000h).
• If ENMOD is cleared, both main counter and prescaler counter restart counting from
their frozen values.
If EPIT is programmed to be disabled in a low-power mode (STOP/WAIT), both the
main counter and the prescaler counter freeze at their current count values when EPIT
enters low-power mode. When EPIT exits the low-power mode, both the main counter
and the prescaler counter start counting from their frozen values regardless of the
ENMOD bit.
A hardware reset resets all EPIT registers to their respective reset values. There is a
software reset which has the same effect on all registers except for the EN, ENMOD,
STOPEN and WAITEN bits in the control register. The state of these bits are not affected
by software reset. A software reset can be asserted even when the EPIT is disabled.
The compare output pin is set, cleared, toggled, or not affected at all depending on the
setting of the output mode (OM) bits in the control register. If an interrupt is required at
rollover (when the counter value reaches 0x0000_0000 and the new value is loaded) then
the compare register value should be set equal to the load register value in set-and-forget
mode, or equal to 0xFFFF_FFFF in free-running mode.
The following figure shows the timing for a compare event and interrupt.
Clk
Counter 0 4 3 2 1 0 4 3 2 1 0 4 3 2 1 0
Compare Value 2
Load Value 4
Output Signal
toggle clear set
Interrupt
EPIT will generate a compare event in the next count if the EPITx_CNR from the
previous count equals the new EPITx_CMPR configured before re-enabling the EPIT in
the next count. Even in case a new start counter value was updated in EPITx_LR before
re-enabling the EPIT for the next round. To avoid this, configure the EPITx_CMPR to
previous EPITx_CNR+1. Or, in set and forget mode, configure EPITx_LR with
IOVW=1, before disabling EPIT. Also can do an extra disable/enable iteration to clear
OCIF and update EPITx_CNR.
The EPIT includes five user-accessible 32-bit registers. The following table summarizes
these registers and their addresses.
Peripheral bus write access to the EPIT control register (EPITCR) and the EPIT load
register (EPITLR) results in one cycle of wait state, while other valid peripheral bus
accesses are with 0 wait state.
R 0 0
STOPEN
WAITEN
DBGEN
IOVW
CLKSRC OM SWR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ENMOD
OCIEN
PRESCALAR RLD EN
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00 Clock is off
01 Peripheral clock
10 High-frequency reference clock
11 Low-frequency reference clock
23–22 EPIT output mode.This bit field determines the mode of EPIT output on the output pin.
OM
00 EPIT output is disconnected from pad
01 Toggle output pin
10 Clear output pin
11 Set output pin
21 EPIT stop mode enable. This read/write control bit enables the operation of the EPIT during stop mode.
STOPEN This bit is reset by a hardware reset and unaffected by software reset.
0 Write to load register does not result in counter value being overwritten.
1 Write to load register results in immediate overwriting of counter value.
0x000 Divide by 1
0x001 Divide by 2...
0xFFF Divide by 4096
3 Counter reload control.
RLD
This bit is cleared by hardware reset. It decides the counter functionality, whether to run in free-running
mode or set-and-forget mode.
0 When the counter reaches zero it rolls over to 0xFFFF_FFFF (free-running mode)
1 When the counter reaches zero it reloads from the modulus register (set-and-forget mode)
2 Output compare interrupt enable.
OCIEN
This bit enables the generation of interrupt on occurrence of compare event.
0 Counter starts counting from the value it had when it was disabled.
1 Counter starts count from load value (RLD=1) or 0xFFFF_FFFF (If RLD=0)
0 This bit enables the EPIT. EPIT counter and prescaler value when EPIT is enabled (EN = 1), is dependent
EN upon ENMOD and RLD bit as described for ENMOD bit. It is recommended that all registers be properly
programmed before setting this bit. This bit is reset by a hardware reset. A software reset does not affect
this bit.
0 EPIT is disabled
1 EPIT is enabled
The EPIT status register (EPIT_SR) has a single status bit for the output compare event.
The bit is a write 1 to clear bit.
Address: Base address + 4h offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 OCIF
W w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The EPIT load register (EPIT_LR) contains the value that is to be loaded into the counter
when EPIT counter reaches zero if the RLD bit in EPIT_CR is set. If the IOVW bit in the
EPIT_CR is set then a write to this register overwrites the value of the EPIT counter
register in addition to updating this registers value. This overwrite feature is active even
if the RLD bit is not set.
Address: Base address + 8h offset
Bit 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
R
W
LOAD
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The EPIT compare register (EPIT_CMPR) holds the value that determines when a
compare event is generated.
Address: Base address + Ch offset
Bit 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
R
W
COMPARE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The EPIT counter register (EPIT_CNR) contains the current count value and can be read
at any time without disturbing the counter. This is a read-only register and any attempt to
write into it generates a transfer error. But if the IOVW bit in EPIT_CR is set, the value
of this register can be overwritten with a write to EPIT_LR. This change is reflected
when this register is subsequently read.
Address: Base address + 10h offset
Bit 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
R COUNT
W
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
25.1 Overview
The Enhanced Serial Audio Interface (ESAI) provides a full-duplex serial port for serial
communication with a variety of serial devices, including industry-standard codecs,
Sony/Phillips Digital Interface (SPDIF) transceivers, and other DSPs.
The ESAI consists of independent transmitter and receiver sections, each section with its
own clock generator. It is a superset of the 56300 Family ESSI peripheral and of the
56000 Family SAI peripheral.
All serial transfers in the module are synchronized to a clock. Additional synchronization
signals are used to delineate the word frames. The normal mode of operation is used to
transfer data at a periodic rate, one word per period. The network mode is similar in that
it is also intended for periodic transfers; however, it supports up to 32 words (time slots)
per period. This mode can be used to build time division multiplexed (TDM) networks. In
contrast, the on-demand mode is intended for non-periodic transfers of data and to
transfer data serially at high speed when the data becomes available.
The following figure shows the ESAI block diagram.
TX RX
FIFO FIFO
IP Bus
ESAI_TX0
ESAI_RSMA
ESAI_TSMA
ESAI_TX1
ESAI_TSMB
ESAI_RCCR ESAI_TX2
ESAI_RCR
Shift Register TX2_RX3 [PC9]
ESAI_TCCR ESAI_RX3
ESAI_TCR
ESAI_TX3
ESAI_SAISR ESAI_RX2
ESAI_TX4
ESAI_TSR
ESAI_RX1
Clock/Frame Sync
Generators
and
Control Logic ESAI_TX5
RCLK
TCLK
ESAI_RX0
[PC2] HCKR
[PC0] SCKR
[PC5] HCKT
[PC3] SCKT
[PC1] FSR
[PC4] FST
25.1.1 Features
• Independent (asynchronous mode) or shared (synchronous mode) transmit and
receive sections with separate or shared internal/external clocks and frame syncs,
operating in Master or Slave mode.
• Up to six transmitters and four receivers with TX2_RX3, TX3_RX2, TX4_RX1, and
TX5_RX0 pins shared by transmitters 2 to 5 and receivers 0 to 3. TX0 AND TX1
pins are used by transmitters 0 and 1 only.
• Programmable data interface modes such as I2S, LSB aligned, MSB aligned
• Programmable word length (8, 12, 16, 20 or 24bits)
• Flexible selection between system clock or external oscillator as input clock source,
programmable internal clock divider and frame sync generation
• AC97 support
• Time Slot Mask Registers for reduced ARM platform overhead (for both Transmit
and Receive)
• 128-word Transmit FIFO shared by six transmitters
• 128-word Receive FIFO shared by four receivers
For the network mode, 2 to 32 time slots per frame may be selected. During each frame, 0
to 32 data words of I/O may be received or transmitted. In either case, the transfers are
periodic. The frame sync signal indicates the first time slot in the frame. Network mode is
typically used in time division multiplexed (TDM) networks of codecs, DSPs with
multiple words per frame, or multi-channel devices.
Selecting the network mode and setting the frame rate divider to zero (DC=00000) selects
the on-demand mode. This special case does not generate a periodic frame sync. A frame
sync pulse is generated only when data is available to transmit. The on-demand mode
requires that the transmit frame sync be internal (output) and the receive frame sync be
external (input). Therefore, for simplex operation, the synchronous mode could be used;
however, for full-duplex operation, the asynchronous mode must be used. Data
transmission that is data driven is enabled by writing data into each TX. Although the
ESAI is double buffered, only one word can be written to each TX, even if the transmit
shift register is empty. The receive and transmit interrupts function as usual using TDE
and RDF; however, transmit underruns are impossible for on-demand transmission and
are disabled.
The transmitter frame format is defined by the TFSL bit in the ESAI_TCR register. The
receiver frame format is defined by the RFSL bit in the ESAI_RCR register.
1. In the word-long frame sync format, the frame sync signal is asserted during the
entire word data transfer period. This frame sync length is compatible with codecs,
SPI serial peripherals, serial A/D and D/A converters, shift registers and
telecommunication PCM serial I/O.
2. In the bit-long frame sync format, the frame sync signal is asserted for one bit clock
immediately before the data transfer period. This frame sync length is compatible
with Intel and National components, codecs and telecommunication PCM serial I/O.
The relative timing of the word length frame sync as referred to the data word is specified
by the TFSR bit in the ESAI_TCR register for the transmitter section and by the RFSR
bit in the ESAI_RCR register for the receive section. The word length frame sync may be
generated (or expected) with the first bit of the data word, or with the last bit of the
previous word. TFSR and RFSR are ignored when a bit length frame sync is selected.
Polarity of the frame sync signal may be defined as positive (asserted high) or negative
(asserted low). The TFSP bit in the ESAI_TCCR register specifies the polarity of the
frame sync for the transmitter section. The RFSP bit in the ESAI_RCCR register
specifies the polarity of the frame sync for the receiver section.
The ESAI receiver looks for a receive frame sync leading edge (trailing edge if RFSP is
set) only when the previous frame is completed. If the frame sync goes high before the
frame is completed (or before the last bit of the frame is received in the case of a bit
frame sync or a word length frame sync with RFSR set), the current frame sync is not
recognized, and the receiver is internally disabled until the next frame sync. Frames do
not have to be adjacent, that is, a new frame sync does not have to immediately follow
the previous frame. Gaps of arbitrary periods can occur between frames. Enabled
transmitters are tri-stated during these gaps.
When operating in the synchronous mode (SYN=1), all clocks including the frame sync
are generated by the transmitter section.
becomes high impedance for a full clock period after the last data bit has been
transmitted, assuming another data word does not follow immediately. If a data word
follows immediately, there is no high-impedance interval.
TX3_RX2 may be programmed as a disconnected pin (PC8) when the ESAI TX3 and
RX2 functions are not being used. See Table 25-14.
SCKT may be programmed as a disconnected pin (PC3) when the ESAI SCKT function
is not being used. See Table 25-14.
For more information about EXTAL/ESAI clocking control bits (ETI, ETO), see ESAI
Control Register (ESAI_ECR).
NOTE
Although the external ESAI serial clocks can be independent of
and asynchronous to the internal ESAI system clock, the
external ESAI serial clock cannot exceed the internal ESAI
system clock divided by 6.
In the asynchronous mode (SYN=0), the FSR pin operates as the frame sync input or
output used by all the enabled receivers. In the synchronous mode (SYN=1), it operates
as either the serial flag 1 pin (TEBE=0), or as the transmitter external buffer enable
control (TEBE=1, RFSD=1). For FSR pin mode definitions, see Table 25-12; for receiver
clock signals, see Table 25-2.
When this pin is configured as serial flag pin, its direction is determined by the RFSD bit
in the ESAI_RCCR register. When configured as the output flag OF1, this pin reflects the
value of the OF1 bit in the ESAI_SAICR register, and the data in the OF1 bit shows up at
the pin synchronized to the frame sync being used by the transmitter and receiver
sections. When configured as the input flag IF1, the data value at the pin is stored in the
IF1 bit in the ESAI_SAISR register, synchronized by the frame sync in normal mode or
the slot in network mode.
FSR may be programmed as a disconnected pin (PC1) when the ESAI FSR function is
not being used. See Table 25-14.
clock source to the ESAI transmitter rather than the ARM Core main clock. When
programmed as output it can serve as a high frequency sample clock (to external DACs
for example) or as an additional system clock (see Table 25-3).
HCKT may be programmed as a disconnected pin (PC5) when the ESAI HCKT function
is not being used. See Table 25-14.
Each flag can be separately programmed. Flag 0 (SCKR pin) direction is selected by
RCKD, RCKD=1 for output and RCKD=0 for input. Flag 1 (FSR pin) is enabled when
the pin is not configured as external transmitter buffer enable (TEBE=0) and its direction
is selected by RFSD, RFSD=1 for output and RFSD=0 for input. Flag 2 (HCKR pin)
direction is selected by RHCKD, RHCKD=1 for output and RHCKD=0 for input.
When programmed as input flags, the SCKR, FSR and HCKR logic values, respectively,
are latched at the same time as the first bit of the receive data word is sampled. Because
the input was latched, the signal on the input flag pin (SCKR, FSR or HCKR) can change
without affecting the input flag until the first bit of the next receive data word. When the
received data words are transferred to the receive data registers, the input flag latched
values are then transferred to the IF0, IF1 and IF2 bits in the SAISR register, where they
may be read by software.
When programmed as output flags, the SCKR, FSR and HCKR logic values are driven by
the contents of the OF0, OF1 and OF2 bits in the ESAI_SAICR register respectively, and
they are driven when the transmit data registers are transferred to the transmit shift
registers. The value on SCKR, FSR and HCKR is stable from the time the first bit of the
transmit data word is transmitted until the first bit of the next transmit data word is
transmitted. Software may change the OF0-OF2 values thus controlling the SCKR, FSR
and HCKR pin values for each transmitted word. The normal sequence for setting output
flags when transmitting data is as follows: wait for TDE (transmitter empty) to be set;
first write the flags, and then write the transmit data to the transmit registers. OF0, OF1,
and OF2 are double buffered so that the flag states appear on the pins when the transmit
data is transferred to the transmit shift register, that is, the flags are synchronous with the
data.
25.3 Clocks
The table found here describes the clock sources for ESAI.
Please see clock control block for clock setting, configuration and gating information.
Table 25-4. ESAI Clocks
Clock name Clock Root Description
extal_clk esai_clk_root ESAI system clock
ipg_clk_esai ahb_clk_root Bus clock
ipg_clk_s ipg_clk_root Peripheral access clock
mem_clk ahb_clk_root Mem clock
Occurs, if enabled (RLIE=1), after the last slot of the frame ended (in network mode
only) regardless of the receive mask register setting. The receive last slot interrupt
may be used for resetting the receive mask slot register, reconfiguring the DMA
channels and reassigning data memory pointers. Using the receive last slot interrupt
guarantees that the previous frame was serviced with the previous setting and the
new frame is serviced with the new setting without synchronization problems. Note
that the maximum receive last slot interrupt service time should not exceed N-1
ESAI bits service time (where N is the number of bits in a slot).
5. ESAI Transmit Data with Exception Status
Occurs when the transmit exception interrupt is enabled (TEIE=1), at least one
transmit data register of the enabled transmitters is empty (TDE=1) and a transmitter
underrun error has occurred (TUE=1). TUE is cleared by first reading the SAISR and
then writing to all the enabled transmit data registers, or to the TSR register.
6. ESAI Transmit Last Slot Interrupt
Occurs, if enabled (TLIE=1), at the start of the last slot of the frame in network mode
regardless of the transmit mask register setting. The transmit last slot interrupt may
be used for resetting the transmit mask slot register, reconfiguring the DMA channels
and reassigning data memory pointers. Using the transmit last slot interrupt
guarantees that the previous frame was serviced with the previous setting and the
new frame is serviced with the new setting without synchronization problems. Note
that the maximum transmit last slot interrupt service time should not exceed N-1
ESAI bits service time (where N is the number of bits in a slot).
7. ESAI Transmit Even Data
Occurs when the transmit even slot data interrupt is enabled (TEDIE=1), at least one
of the enabled transmit data registers is empty (TDE=1), the slot is an even slot
(TEDE=1) and no exception has occurred (TUE=0 or TEIE=0). Writing to all the TX
registers of the enabled transmitters or to TSR clears this interrupt request.
8. ESAI Transmit Data
Occurs when the transmit interrupt is enabled (TIE=1), at least one of the enabled
transmit data registers is empty (TDE=1), no exception has occurred (TUE=0 or
TEIE=0) and no even slot interrupt has occurred (TEDE=0 or TEDIE=0). Writing to
all the TX registers of the enabled transmitters, or to the TSR clears this interrupt
request.
23 16 15 8 7 0
7 0 7 0 7 0
23 16 15 8 7 0
16 BIT RX
12 BIT
8 BIT RSWS4-
RSW0
MSB LSB
12-BIT DATA
MSB LSB
16-BIT DATA
MSB LSB
20-BIT DATA
MSB LSB
24-BIT DATA
NOTES:
1. Data is received MSB first if RSHFD=0.
2. 24-bit fractional format (ALC=0).
(b) Transmit Registers 3. 32-bit mode is not shown
23 16 15 8 7 0
ESAI TRANSMIT DATA
TRANSMIT HIGH BYTE TRANSMIT MIDDLE BYTE TRANSMIT LOW BYTE REGISTER
(WRITE ONLY)
7 0 7 0 7 0
23 16 15 8 7 0
TX TRANSMIT HIGH BYTE TRANSMIT MIDDLE BYTE TRANSMIT LOW BYTE ESAI TRANSMIT
SHIFT REGISTER
7 0 7 0 7 0
MSB LSB
12-BIT DATA
MSB LSB
16-BIT DATA
MSB LSB
20-BIT DATA
MSB LSB
24-BIT DATA
NOTES:
1. Data is sent MSB first if TSHFD=0.
2. 24-bit fractional format (ALC=0).
3. 32-bit mode is not shown.
4. Data word is left-aligned (TWA=0, PADC=0).
23 16 15 8 7 0
ESAI RECEIVE DATA
RECEIVE HIGH BYTE RECEIVE MIDDLE BYTE RECEIVE LOW BYTE REGISTER
(READ ONLY)
7 0 7 0 7 0
23 16 15 8 7 0
RECEIVE HIGH BYTE RECEIVE MIDDLE BYTE RECEIVE LOW BYTE ESAI RECEIVE
RX
SHIFT REGISTER
7 0 7 0 7 0
MSB LSB
12-BIT DATA
MSB LSB
16-BIT DATA
MSB LSB
20-BIT DATA
MSB LSB
24-BIT DATA
NOTES:
1. Data is received LSB first if RSHFD=1.
2. 24-bit fractional format (ALC=0).
3. 32-bit mode is not shown.
23 16 15 8 7 0
7 0 7 0 7 0
23 16 15 8 7 0
TRANSMIT HIGH BYTE TRANSMIT MIDDLE BYTE TRANSMIT LOW BYTE ESAI TRANSMIT
SHIFT REGISTER
7 0 7 0 7 0
24 BIT
20 BIT
16 BIT TX
12 BIT
8 BIT TSWS4-
TSW0
MSB LSB
8-BIT DATA 0 0 0 0
MSB LSB
12-BIT DATA
MSB LSB
16-BIT DATA
MSB LSB
20-BIT DATA
MSB LSB
24-BIT DATA
NOTES:
1. Data is sent LSB first if TSHFD=1.
2. 24-bit fractional format (ALC=0).
3. 32-bit mode is not shown.
4. Data word is left aligned (TWA=0,PADC=0).
All status bits of the interface are set to their reset state however, the control bits are not
affected. This procedure allows the programmer to reset the ESAI separately from the
other internal peripherals. During individual reset, internal DMA accesses to the data
registers of the ESAI are not valid and data read is undefined.
The programmer must use an individual ESAI reset when changing the ESAI control
registers (except for TEIE, REIE, TLIE, RLIE, TIE, RIE, TE0-TE5, RE0-RE3) to ensure
proper operation of the interface.
NOTE
If the ESAI receiver section is already operating with some of
the receivers and enabling additional receivers on the fly, that
is, without first putting the ESAI receiver in the personal reset
state by setting their REx control bits, it will result in erroneous
data being received as the first data word for the newly enabled
receivers.
8. Configure time slot registers, first set ESAI_TSMB, then ESAI_TSMA, then
ESAI_RSMB, then ESAI_RSMA.
9. From now on ESAI can be serviced either by polling, interrupts, or DMA.
Operation proceeds as follows:
• For internally generated clock and frame sync, these signals are active immediately
after ESAI is enabled (step 4 above).
• Data is received only when one of the receive enable (REx) bits is set and after the
occurrence of frame sync signal (either internally or externally generated).
• Data is transmitted only when the transmitter enable (TEx) bit is set and after the
occurrence of frame sync signal (either internally or externally generated). The
transmitter outputs remain tri-stated after TEx bit is set until the frame sync occurs.
Bit 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
R 0
W ETDR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R ERDR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
ETI ETO ERI ERO
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
ESAIEN
ERST
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Transmitter has finished initializing the Transmit Data Registers (or Transmit FIFO is not enabled or
Transmit Initialization is not enabled).
1 Transmitter has not finished initializing the Transmit Data Registers.
9 Receive FIFO Full. Indicates that the number of data words in the Receive FIFO has equaled or exceeded
RFF the Receive FIFO Watermark. This flag also drives the ESAI Receiver DMA request line. ESAI FIFO DMA
requests see ESAI DMA Requests from the FIFOs.
0 Number of empty slots in Transmit FIFO less than Transmit FIFO watermark.
1 Number of empty slots in Transmit FIFO is equal to or greater than Transmit FIFO watermark.
7 Transmit Last Slot. Reading this register when TLS is set will negate the Transmit Last Slot interrupt.
TLS
0 TLS is not the highest priority active interrupt.
1 TLS is the highest priority active interrupt.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reserved
Reserved
TIEN TWA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Transmit Data Registers are not initialized from the FIFO once the Transmit FIFO is enabled. Software
must manually initialize the Transmit Data Registers separately.
1 Transmit Data Registers are initialized from the FIFO once the Transmit FIFO is enabled.
18–16 Transmit Word Alignment. Configures the alignment of the data written into the ESAI Transmit Data
TWA Register and then passed to the relevant 24 bit Transmit shift register.
NOTE: The settings shown below assume TCR[TWA]=0, TCR[PADC]=1 and TCR[TSHFD]=0.
000 MSB of data is bit 31. Data bits 7-0 are ignored when passed to transmit shift register.
001 MSB of data is bit 27. Data bits 3-0 are ignored when passed to transmit shift register.
010 MSB of data is bit 23.
Table continues on the next page...
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reserved
Reserved
REXT RWA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
000 MSB of data is at bit 31. Data bits 7-0 are zeroed.
001 MSB of data is at bit 27. Data bits 3-0 are zeroed.
010 MSB of data is at bit 23.
011 MSB of data is at bit 19. Data bits 3-0 from receive shift register are ignored.
100 MSB of data is at bit 15. Data bits 7-0 from receive shift register are ignored.
101 MSB of data is at bit 11. Data bits 11-0 from receive shift register are ignored.
Table continues on the next page...
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R 0 0
W TXn
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 0
W TSR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ESAI_RX3, ESAI_RX2, ESAI_RX1, and ESAI_RX0 are 32-bit read-only registers that
accept data from the receive shift registers when they become full (Figure 25-2 and
Figure 25-3). The data occupies the most significant portion of the receive data registers,
according to the ALC control bit setting. The unused bits (least significant portion and 8
most significant bits when ALC=1) read as zeros. The Core is interrupted whenever RXn
becomes full if the associated interrupt is enabled.
Address: 202_4000h base + A0h offset + (4d × i), where i=0d to 3d
Bit 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
R 0 RXn
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The Status Register (ESAI_SAISR) is a read-only status register used by the ARM Core
to read the status and serial input flags of the ESAI.
Address: 202_4000h base + CCh offset = 202_40CCh
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TODFE
TEDE
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RODF
REDF
ROE
RDF
TDE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ASYNCHRONOUS (SYN=0)
TRANSMITTER
SDO
FRAME
CLOCK SYNC
CLOCK FRAME
SYNC
SDI
RECEIVER
NOTE: Transmitter and receiver may have different clocks and frame syncs.
SYNCHRONOUS (SYN=1)
TRANSMITTER
SDO
FRAME
CLOCK SYNC
CLOCK FRAME
SYNC
SDI
RECEIVER
NOTE: Transmitter and receiver have the same clocks and frame syncs.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0
ALC TEBE SYN OF2 OF1 OF0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NORMAL MODE
SERIAL CLOCK
FRAME SYNC
TRANSMITTER INTERRUPT (OR DMA REQUEST)
AND FLAGS SET
DATA DATA
SERIAL DATA
RECEIVER INTERRUPT (OR DMA
REQUEST) AND FLAGS SET
NOTE: Interrupts occur and data is transferred once per frame sync.
NETWORK MODE
SERIAL CLOCK
FRAME SYNC
TRANSMITTER INTERRUPT (OR DMA REQUEST)
AND FLAGS SET
NOTE: Interrupts occur and a word may be transferred at every time slot.
SERIAL CLOCK
SERIAL CLOCK
NOTE: Frame sync occurs for one bit time preceding the data.
SERIAL CLOCK
RX FRAME SYNC
TX FRAME SYNC
SERIAL
SERIAL CLOCK
CLOCK
RX FRAME SYNC
TX FRAME SYNC
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 0
TEDIE
PADC
TLIE TIE TEIE TPR TFSR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TSHFD
TFSL TSWS TMOD TWA TE5 TE4 TE3 TE2 TE1 TE0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ERI=1
EXTAL
RHCKD=1 PRESCALE DIVIDER DIVIDER
DIVIDE DIVIDE BY 1 DIVIDE BY 1 DIVIDE BY 1
Fsys OR TO DIVIDE BY TO DIVIDE BY
ERI=0 BY 2 DIVIDE BY 8 256 16
ERO=1
EXTAL
HCKR
ERO=0
RHCKD
RSWS4-RSWS0
RX WORD RX WORD
LENGTH DIVIDER CLOCK
SYN=1 SYN=0
TCKD
TX SHIFT REGISTER
THCKD
ETO=0
HCKT
THCKD=0
NOTE
1. ETI, ETO, ERI and ERO bit descriptions are covered in
ESAI Control Register (ESAI_ECR). 2. Fsys is the ESAI
system 133 MHz clock. 3. EXTAL is the on-chip clock sources
other than ESAI system 133MHz clock.
RX WORD
CLOCK
INTERNAL RX FRAME CLOCK
RECEIVER SYNC
FRAME RATE TYPE
DIVIDER RFSD
RFSD= 1 SYN=0
FSR
SYN= 0
RECEIVE
RECEIVE
CONTROL
LOGIC FRAME SYNC RFSD= 0 SYN=1
SYN=1
TRANSMIT
TRANSMIT
CONTROL
LOGIC FRAME SYNC
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
THCKD
THCKP
TCKD
TCKP
TFSD TFSP TFP
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: Do not use the combination TPSR = 1 and TPM7-RPM0 = 0x00, which causes synchronization
problems when using the internal core clock as source (THCKD = 1 or TCKD = 1).
TPM ESAI_TCCR Transmit Prescale Modulus Select. The TPM7-TPM0 bits specify the divide ratio of the
prescale divider in the ESAI transmitter clock generator. A divide ratio from 1 to 256 (TPM=0x00 to 0xFF)
may be selected. The bit clock output is available at the transmit serial bit clock (SCKT) pin. The bit clock
output is also available internally for use as the bit clock to shift the transmit and receive shift registers.
The ESAI transmit clock generator functional diagram is shown in Figure 25-7.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 0
REDIE
RLIE RIE REIE RPR RFSR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
RSHFD
RFSL RSWS RMOD RWA RE3 RE2 RE1 RE0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
RHCKD
RHCKP
RCKD
RCKP
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The Transmit Slot Mask Register A together with Transmit Slot Mask Register B
(ESAI_TSMA and ESAI_TSMB) are two read/write registers used by the transmitters in
network mode to determine for each slot whether to transmit a data word and generate a
transmitter empty condition (TDE=1), or to tri-state the transmitter data pins. Fields
ESAI_TSMA[TS] and ESAI_TSMB[TS] are concatenated to form the 32-bit field
TS[31:0]. Bit number n in TS is the enable/disable control bit for transmission in slot
number n.
Address: 202_4000h base + E4h offset = 202_40E4h
Bit 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
R 0 TS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
When bit number N in ESAI_TSMA is cleared, all the transmit data pins of the enabled transmitters are tri-
stated during transmit time slot number N. The data is still transferred from the transmit data registers to
the transmit shift registers but neither the TDE nor the TUE flags are set. This means that during a
disabled slot, no transmitter empty interrupt is generated. The Core is interrupted only for enabled slots.
Data that is written to the transmit data registers when servicing this request is transmitted in the next
enabled transmit time slot.
When bit number N in ESAI_TSMA register is set, the transmit sequence is as usual: data is transferred
from the TX registers to the shift registers and transmitted during slot number N, and the TDE flag is set.
Using the slot mask in ESAI_TSMA does not conflict with using TSR. Even if a slot is enabled in
ESAI_TSMA, the user may choose to write to TSR instead of writing to the transmit data registers TXn.
This causes all the transmit data pins of the enabled transmitters to be tri-stated during the next slot.
Data written to the ESAI_TSMA affects the next frame transmission. The frame being transmitted is not
affected by this data and would comply to the last ESAI_TSMA setting. Data read from ESAI_TSMA
returns the last written data.
After hardware or software reset, the ESAI_TSMA register is preset to 0x0000FFFF, which means that all
16 possible slots are enabled for data transmission.
When operating in normal mode, bit 0 of the ESAI_TSMA register must be set, otherwise no output is
generated.
The Transmit Slot Mask Register B together with Transmit Slot Mask Register A
(ESAI_TSMA and ESAI_TSMB) are two read/write registers used by the transmitters in
network mode to determine for each slot whether to transmit a data word and generate a
transmitter empty condition (TDE=1), or to tri-state the transmitter data pins. Fields
ESAI_TSMA[TS] and ESAI_TSMB[TS] are concatenated to form the 32-bit field
TS[31:0]. Bit number n in TS is the enable/disable control bit for transmission in slot
number n.
Address: 202_4000h base + E8h offset = 202_40E8h
Bit 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
R 0 TS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The Receive Slot Mask Register A together with Receive Slot Mask Register B
(ESAI_RSMA and ESAI_RSMB) are two read/write registers used by the receiver in
network mode to determine for each slot whether to receive a data word and generate a
receiver full condition (RDF=1), or to ignore the received data. Fields ESAI_RSMA[RS]
and ESAI_RSMB[RS] are concatenated to form the 32-bit field RS[31:0]. Bit number n
in RS is an enable/disable control bit for receiving data in slot number n.
Address: 202_4000h base + ECh offset = 202_40ECh
Bit 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
R 0 RS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The Receive Slot Mask Register B together with Receive Slot Mask Register A
(ESAI_RSMA and ESAI_RSMB) are two read/write registers used by the receiver in
network mode to determine for each slot whether to receive a data word and generate a
receiver full condition (RDF=1), or to ignore the received data. Fields ESAI_RSMA[RS]
and ESAI_RSMB[RS] are concatenated to form the 32-bit field RS[31:0]. Bit number n
in RS is an enable/disable control bit for receiving data in slot number n.
Address: 202_4000h base + F0h offset = 202_40F0h
Bit 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
R 0 RS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 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
R 0 PDC
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 PC
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
26.1 Overview
The Flexible Controller Area Network (FLEXCAN) module is a communication
controller implementing the CAN protocol according to the CAN 2.0B protocol
specification.
The CAN protocol was primarily designed to be used as a vehicle serial data bus meeting
the specific requirements of this field: real-time processing, reliable operation in the EMI
environment of a vehicle, cost-effectiveness and required bandwidth. The FLEXCAN
module is a full implementation of the CAN protocol specification, which supports both
standard and extended message frames. 64 Message Buffers are supported by the Flexcan
module.
IPS
Control
IRQs Registers Host
Interface
MB 0
MB 1 Rx
Match
MB 5
Tx
Arbitration
MB 63
RAM
FlexCAN
Protocol
Engine
RX Pin
Tx Pin
CAN Bus
Figure 26-1. FLEXCAN Block Diagram
This low power mode is entered when the MDIS bit in the MCR Register is asserted and
the LPM_ACK is asserted by the FlexCAN. When disabled, the module requests to
disable the clocks to the CAN Protocol Engine and Controller Host Interface sub-
modules. Exit from this mode is done by negating the MDIS bit in the MCR Register. See
Module Disable Mode for more information.
• Stop Mode:
This low power mode is entered when Stop Mode is requested at Arm level and the
LPM_ACK bit in the MCR Register is asserted by the FlexCAN. When in Stop Mode,
the module puts itself in an inactive state and then informs the Arm that the clocks can be
shut down globally. Exit from this mode happens when the Stop Mode request is
removed or when activity is detected on the CAN bus and the Self Wake Up mechanism
is enabled. See Stop Mode for more information.
26.3 Clocks
The table found here describes the clock sources for FLEXCAN.
Please see Clock Controller Module (CCM) for clock setting, configuration and gating
information.
Table 26-2. FLEXCAN Clocks
Clock name Clock Root Description
ipg_clk ipg_clk_root Peripheral clock
ipg_clk_chi ipg_clk_root CHI clock
ipg_clk_pe can_clk_root Protocol Engine clock
ipg_clk_pe_nogate can_clk_root Protocol Engine clock (no gating)
ipg_clk_s ipg_clk_root Peripheral access clock
mem_ram_CLK ipg_clk_root RAM clock
This 4-bit field can be accessed (read or write) by the CPU and by the FLEXCAN
module itself, as part of the message buffer matching and arbitration process. The
encoding is shown in the following tables. See Functional Description for additional
information.
Table 26-4. Message Buffer Code for Rx buffers
CODE Description Rx Code SRV1 Rx Code RRS3 Comment
BEFORE AFTER
receive successfu
New l
Frame reception2
0b0000: INACTIVE- INACTIVE - - - MB does not participate in the matching
MB is not active. process.
0b0100: EMPTY - EMPTY - FULL - When a frame is received successfully (after
move-in process. Refer to Move-in for details),
MB is active and
the CODE field is automatically updated to
empty.
FULL.
0b0010: FULL - FULL Yes FULL - The act of reading the C/S word followed by
unlocking the MB (SRV) does not make the
MB is full.
code return to EMPTY. It remains FULL. If a
new frame is moved to the MB after the MB
was serviced, the code still remains FULL.
Refer to Matching Process for matching details
related to FULL code.
No OVERRUN - If the MB is FULL and a new frame is moved to
this MB before the CPU services it, the CODE
field is automatically updated to OVERRUN.
Refer to Matching Process for details about
overrun behavior.
0b0110: OVERRUN - OVERRUN Yes FULL - If the CODE field indicates OVERRUN and
MB is being overwritten CPU has serviced the MB, when a new frame
into a full buffer. is moved to the MB, the code returns to FULL.
No OVERRUN - If the CODE field already indicates OVERRUN,
and another new frame must be moved, the MB
will be overwritten again, and the code will
remain OVERRUN. Refer to Matching Process
for details about overrun behavior.
0b1010: RANSWER4 - RANSWER - TANSWER( 0 A Remote Answer was configured to recognize
A frame was configured 0b1110) a remote request frame received, after that a
to recognize a Remote MB is set to transmit a response frame. The
Request Frame and code is automatically changed to TANSWER
transmit a Response (0b1110). Refer to Matching Process for
Frame in return. details.
If CTRL2[RRS] is negated, transmit a response
frame whenever a remote request frame with
the same ID is received.
- 1 This code is ignored during matching and
arbitration process. Refer to Matching Process
for details.
1. SRV: Serviced MB. MB was read and unlocked by reading TIMER or other MB.
2. A frame is considered successful reception after the frame to be moved to MB (move-in process). Refer to Move-in for
details)
3. Remote Request Stored bit from CTRL2 register. Refer to CTRL2 for details.
4. Code 4'b1010 is not considered as a Tx and a MB with this code should not to be aborted.
5. Note that for Tx MBs, the BUSY bit should be ignored upon read, except when AEN bit is set in the MCR register. If this bit
is asserted, the corresponding MB does not participate in the matching process.
Fixed recessive bit, used only in extended format. It must be set to '1' by the user for
transmission (Tx Buffers) and will be stored with the value received on the CAN bus for
Rx receiving buffers. It can be received as either recessive or dominant. If FLEXCAN
receives this bit as dominant, then it is interpreted as arbitration loss.
1= Recessive value is compulsory for transmission in Extended Format frames
0= Dominant is not a valid value for transmission in Extended Format frames
IDE - ID Extended Bit
This bit identifies whether the frame format is standard or extended. It is also used as part
of the reception filter.
1= Frame format is extended
0= Frame format is standard
RTR - Remote Transmission Request
This bit affects the behavior of Remote Frames and is part of the reception filter. Refer to
the tables above and RRS bit in Control 2 Register (FLEXCAN_CTRL2) for additional
details.
If FLEXCAN transmits this bit as '1' (recessive) and receives it as '0' (dominant), it is
interpreted as arbitration loss. If this bit is transmitted as '0' (dominant), then if it is
received as '1' (recessive), the FLEXCAN module treats it as bit error. If the value
received matches the value transmitted, it is considered as a successful bit transmission.
1= Indicates the current MB has a Remote Frame to be transmitted if MB is Tx. If the
MB is Rx then incoming Remote Request Frames may be stored.
0= Indicates the current MB has a Data Frame to be transmitted. In Rx MB it may be
considered in matching processes.
DLC - Length of Data in Bytes
This 4-bit field is the length (in bytes) of the Rx or Tx data, which is located in offset
0x08 through 0x0F of the MB space (see the first table above). In reception, this field is
written by the FLEXCAN module, copied from the DLC (Data Length Code) field of the
received frame. In transmission, this field is written by the Arm and corresponds to the
DLC field value of the frame to be transmitted. When RTR=1, the Frame to be
transmitted is a Remote Frame and does not include the data field, regardless of the
Length field. The DLC field indicates which DATA BYTEs are valid as shown in the
table below.
TIME STAMP - Free-Running Counter Time Stamp
This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at
the time when the beginning of the Identifier field appears on the CAN bus.
PRIO - Local priority
This 3-bit field is only used when MCR[LPRIO_EN] bit is asserted and it only makes
sense for Tx mailboxes. These bits are not transmitted. They are appended to the regular
ID to define the transmission priority. See Arbitration process.
ID - Frame Identifier
In Standard Frame format, only the 11 most significant bits (28 to 18) are used for frame
identification in both receive and transmit cases. The 18 least significant bits are ignored.
In Extended Frame format, all bits are used for frame identification in both receive and
transmit cases.
DATA BYTE 0-7 - Data Field
Up to eight bytes can be used for a data frame.
For Rx frames, the data is stored as it is received from the CAN bus. DATA BYTE (n) is
valid only if n is less than DLC as shown in the table below.
For Tx frames, the CPU prepares the data field to be transmitted within the frame.
Table 26-6. DATA BYTEs validity
DLC Valid DATA BYTEs
0 none
1 DATA BYTE 0
2 DATA BYTE 0-1
3 DATA BYTE 0-2
4 DATA BYTE 0-3
5 DATA BYTE 0-4
6 DATA BYTE 0-5
7 DATA BYTE 0-6
8 DATA BYTE 0-7
The region 0x80-0x8C contains the output of the FIFO which must be read by the CPU as
a Message Buffer. This output contains the oldest message received and not read yet. The
region 0x90-0xDC is reserved for internal use of the FIFO engine.
An additional memory area, that starts at 0xE0 and may extend up to 0x2DC (normally
occupied by MBs 6 up to 37) depending on the CTRL2[RFFN] field setting, contains the
ID Filter Table (configurable from 8 to 128 memory positions) that specifies filtering
criteria for accepting frames into the FIFO.Table 26-7 shows the Rx FIFO data structure.
Each ID Filter Table Element occupies an entire 32-bit word and can be compounded by
one, two or four Identifier Acceptance Filters (IDAF) depending on the MCR[IDAM]
field setting. Table 26-8, Table 26-9 and Table 26-10 show the IDAF indexation. Table
26-11 show the three different formats that the IDAF can assume, depending on the
MCR[IDAM] field setting. Note that all elements of the table must have the same format.
See Rx FIFO for more information.
Out of reset, the ID Filter Table flexible memory area defaults to 0xE0 and only extends
to 0xFC, which corresponds to MBs 6 to 7 for RFFN=0.
Table 26-7. Rx FIFO Structure
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
0x80 S I R DLC TIME STAMP
R D T
R E R
0x84 ID Standard ID Extended
0x88 Data Byte 0 Data Byte 1 Data Byte 2 Data Byte 3
0x8C Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7
0x90 Reserved
to
0xDC
0xE0 ID Filter Table Element 0
0xE4 ID Filter Table Element 1
0xE8 ID Filter Table Elements 2 through 125
to
0x2D
4
0x2D ID Filter Table Element 126
8
0x2D ID Filter Table Element 127
C
B R ID RXIDB_0 R ID RXIDB_1
T E T E
(Standard = 29-19, Extended = 29-16) (Standard = 13-3, Extended = 13-0)
R R
bit negated), just write the INACTIVE code (0b1000) to the CODE field to inactivate
the MB but then the pending frame may be transmitted without notification (see
Message Buffer Inactivation).
3. Write the ID word.
4. Write the data bytes.
5. Write the DLC, Control and Code fields of the Control and Status word to activate
the MB.
Once the MB is activated, it will participate into the arbitration process and eventually be
transmitted according to its priority.
At the end of the successful transmission, the value of the Free Running Timer at the time
of the second bit of frame's Identifier field is written into the MB's Time Stamp field, the
CODE field in the Control and Status word is updated, the CRC Register is updated, a
status flag is set in the Interrupt Flag Register and an interrupt is generated if allowed by
the corresponding Interrupt Mask Register bit. The new CODE field after transmission
depends on the code that was used to activate the MB in step four (see Table 26-4 and
Table 26-5 in Message Buffer Structure).
When the Abort feature is enabled (MCR[AEN] bit is asserted), after the Interrupt Flag is
asserted for a Mailbox configured as transmit buffer, the Mailbox is blocked, therefore
the CPU is not able to update it until it negates the Interrupt Flag. It means that the CPU
must clear the corresponding IFLAG before starting to prepare this MB for a new
transmission or reception.
As the PRIO field is the most significant part of the arbitration value Mailboxes with low
PRIO values have higher priority than Mailboxes with high PRIO values regardless the
rest of their arbitration values.
Note that the PRIO field is not part of the frame on the CAN bus. Its purpose is only to
affect the internal arbitration process.
Once the arbitration winner is found, its content is copied to a hidden auxiliary MB called
Tx Serial Message Buffer (Tx SMB), which has the same structure as a normal MB but is
not user accessible. This operation is called "move-out" and after it is done, write access
to the corresponding MB is blocked (if the AEN bit in MCR is asserted). The write
access is released in the following events:
• After the MB is transmitted
• FlexCAN enters in Freeze Mode or Bus Off
• FlexCAN loses the bus arbitration or there is an error during the transmission
At the first opportunity window on the CAN bus, the message on the Tx SMB is
transmitted according to the CAN protocol rules. FlexCAN transmits up to eight data
bytes, even if the DLC (Data Length Code) field value is greater than that.
Arbitration process can be triggered in the following situations:
• During Rx and Tx frames from CAN CRC field to end of frame. Arbitration start
point depends on instantiation parameters NUMBER_OF_MB and TASD.
Additionally, TASD value may be changed (see Control 2 Register
(FLEXCAN_CTRL2)) to optimize the arbitration start point.
• During CAN Bus Off state from TX_ERR_CNT=124 to 128. Arbitration start point
depends on instantiation parameters NUMBER_OF_MB and TASD. Additionally,
1. If the Mailbox is active (either Tx or Rx) inactivate the Mailbox (see Message Buffer
Inactivation), preferably with a safe inactivation (see Transmission Abort
Mechanism);
2. Write the ID word;
3. Write the EMPTY code (0b0100) to the CODE field of the Control and Status word
to activate the Mailbox.
Once the Mailbox is activated in the third step, it will be able to receive frames that
match the programmed filter. At the end of a successful reception, the Mailbox is updated
by the move-in process (see Move-in) as follows:
1. The received Data field (8 bytes at most) is stored;
2. The received Identifier field is stored;
3. The value of the Free Running Timer at the time of the second bit of frame's
Identifier field is written into the Mailbox Time Stamp field;
4. The received SRR, IDE, RTR and DLC fields are stored;
5. The CODE field in the Control and Status word is updated. (see Table 26-4 and
Table 26-5 in Section Message Buffer Structure)
6. A status flag is set in the Interrupt Flag Register and an interrupt is generated if
allowed by the corresponding Interrupt Mask Register bit.
The recommended way for the CPU servicing (read) the frame received in a Mailbox is
using the following procedure:
1. Read the Control and Status word of that Mailbox;
2. Check if the BUSY bit is deasserted, indicating that the Mailbox is locked. Repeat
step 1) while it is asserted. See Message Buffer Lock Mechanism;
3. Read the contents of the Mailbox. Once Mailbox is locked now, its contents won't be
modified by FlexCAN Move-in processes. See Move-in;
4. Acknowledge the proper flag at IFLAG registers;
5. Read the Free Running Timer. It is optional but recommended to unlock Mailbox as
soon as possible and make it available for reception.
The CPU should synchronize to frame reception by the status flag bit for the specific
Mailbox in one of the IFLAG Registers and not by the CODE field of that Mailbox.
Polling the CODE field does not work because once a frame was received and the CPU
services the Mailbox (by reading the C/S word followed by unlocking the Mailbox), the
CODE field will not return to EMPTY. It will remain FULL. If the CPU tries to
workaround this behavior by writing to the C/S word to force an EMPTY code after
reading the Mailbox without a prior safe inactivation, a newly received message
matching the filter of that Mailbox may be lost.
In summary: never do polling by reading directly the C/S word of the Mailboxes. Instead,
read the IFLAG registers.
Note that the received frame's Identifier field is always stored in the matching Mailbox,
thus the contents of the ID field in a Mailbox may change if the match was due to
masking. Note also that FlexCAN does receive frames transmitted by itself if there exists
a matching Rx Mailbox, provided the MCR[SRX_DIS] bit is not asserted. If
MCR[SRX_DIS] bit is asserted, FlexCAN will not store messages transmitted by itself in
any MB, even if it contains a matching MB, and no interrupt flag or interrupt signal will
be generated due to the frame reception.
To be able to receive CAN messages through the Rx FIFO, the CPU must enable and
configure the Rx FIFO during Freeze Mode(see Rx FIFO). Upon receiving the Frames
Available in Rx FIFO interrupt(see Interrupt Masks 1 Register (FLEXCAN_IMASK1),
bit IFLAG[BUF5I] - Frames available in Rx FIFO), the CPU should service the received
frame using the following procedure:
1. Read the Control and Status word (optional - needed only if a mask was used for IDE
and RTR bits);
2. Read the ID field (optional - needed only if a mask was used);
3. Read the Data field;
4. Read the RXFIR register (optional);
5. Clear the Frames Available in Rx FIFO interrupt by writing 1 to IFLAG[BUF5I] bit
(mandatory - releases the MB and allows the CPU to read the next Rx FIFO entry)
If a matching ID is found in the FIFO table or in one of the Mailboxes, the contents of the
SMB will be transferred to the FIFO or to the matched Mailbox by the move-in process.
If any CAN protocol error is detected then no match results will be transferred to the
FIFO or to the matched Mailbox at the end of reception.
The matching process scans all matching elements of both Rx FIFO (if enabled) and
active Rx Mailboxes (CODE is EMPTY, FULL, OVERRUN or RANSWER) in search of
a successful comparison with the matching elements of the Rx SMB that is receiving the
frame on the CAN bus. The SMB has the same structure of a Mailbox. The reception
structures (Rx FIFO or Mailboxes) associated with the matching elements that had a
successful comparison are the matched structures. The matching winner is selected at the
end of the scan among those matched structures and depends on conditions described
ahead. Refer to the following table for details.
Table 26-14. Matching architecture
Structure SMB[RTR] CTRL2[RRS] CTRL2[EACEN] MB[IDE] MB[RTR] MB[ID]1 MB[CODE]
Mailbox 0 - 0 cmp2 no_cmp3 cmp_msk4 EMPTY or
FULL or
OVERRUN
Mailbox 0 - 1 cmp_msk cmp_msk cmp_msk EMPTY or
FULL or
OVERRUN
Mailbox 1 0 - cmp no_cmp cmp RANSWER
Mailbox 1 1 0 cmp no_cmp cmp_msk EMPTY or
FULL or
OVERRUN
Mailbox 1 1 1 cmp_msk cmp_msk cmp_msk EMPTY or
FULL or
OVERRUN
FIFO5 - - - cmp_msk cmp_msk cmp_msk -
1. For Mailbox structure, If SMB[IDE] is asserted, the ID is 29 bits (ID Standard + ID Extended). In case of SMB[IDE] to be
negated, the ID is only 11 bits (ID Standard). Please, refer to Message Buffer Structure for ID details. For FIFO structure,
the ID depends on IDAM. Please, refer to Rx FIFO Structure for IDAM details.
2. cmp: Compares the SMB contents with the MB contents regardless the masks.
3. no_cmp: The SMB contents are not compared with the MB contents.
4. cmp_msk: Compares the SMB contents with MB contents taking into account the masks.
5. SMB[IDE] and SMB[RTR] are not taken into account when IDAM is type C.
• the CODE field of the Mailbox is either FULL or OVERRUN and an inactivation is
performed. (see Message Buffer Inactivation)
• the Rx FIFO is not full.
The scan order for Mailboxes and Rx FIFO is from the matching element with lowest
number to the higher ones.
The matching winner search for Mailboxes is affected by the MCR[IRMQ] bit. If it is
negated the matching winner is the first matched Mailbox regardless if it is free-to-
receive or not . If it is asserted, the matching winner is selected according to the priority
below:
1. the first free-to-receive matched Mailbox;
2. the last non free-to-receive matched Mailbox.
It is possible to select the priority of scan between Mailboxes and Rx FIFO by the
CTRL2[MRP] bit.
If the selected priority is Rx FIFO first:
• if the Rx FIFO is a matched structure and is free-to-receive then the Rx FIFO is the
matching winner regardless of the scan for Mailboxes;
• otherwise (the Rx FIFO is not a matched structure or is not free-to-receive), then the
matching winner is searched among Mailboxes as described above.
If the selected priority is Mailboxes first:
• if a free-to-receive matched Mailbox is found, it is the matching winner regardless
the scan for Rx FIFO;
• if no matched Mailbox is found, then the matching winner is searched in the scan for
the Rx FIFO;
• if both conditions above are not satisfied and a non free-to-receive matched Mailbox
is found then the matching winner determination is conditioned by the MCR[IRMQ]
bit:
• if MCR[IRMQ] bit is negated the matching winner is the first matched Mailbox;
• if MCR[IRMQ] bit is asserted the matching winner is the Rx FIFO if it is a free-
to-receive matched structure, otherwise the matching winner is the last non free-
to-receive matched Mailbox.
Please, refer to the table below for a summary of matching possibilities.
If a non-safe Mailbox inactivation (see Message Buffer Inactivation) occurs during
matching process and the Mailbox inactivated is the temporary matching winner then the
temporary matching winner is invalidated. The matching elements scan is not stopped nor
restarted, it continues normally. The consequence is that the current matching process
works as if the matching elements compared before the inactivation did not exist,
therefore a message may be lost.
Suppose, for example, that the FIFO is disabled, IRMQ is enabled and there are two MBs
with the same ID, and FlexCAN starts receiving messages with that ID. Let us say that
these MBs are the second and the fifth in the array. When the first message arrives, the
matching algorithm will find the first match in MB number 2. The code of this MB is
EMPTY, so the message is stored there. When the second message arrives, the matching
algorithm will find MB number 2 again, but it is not "free-to-receive", so it will keep
looking and find MB number 5 and store the message there. If yet another message with
the same ID arrives, the matching algorithm finds out that there are no matching MBs
that are "free-to-receive", so it decides to overwrite the last matched MB, which is
number 5. In doing so, it sets the CODE field of the MB to indicate OVERRUN.
Table 26-15. Matching Possibilities and Resulting Reception Structures
RFEN IRMQ MRP Matched in MB Matched in Reception Description
FIFO Structure
No FIFO, only MB, match is always MB first
0 0 X1 None2 -3 None Frame lost by no match
0 0 X Free4 - FirstMB
0 1 X None - None Frame lost by no match
0 1 X Free - FirstMB
0 1 X NotFree - LastMB Overrun
FIFO enabled, no match in FIFO is as if FIFO does not exist
1 0 X None None5 None Frame lost by no match
1 0 X Free None FirstMB
1 1 X None None None Frame lost by no match
1 1 X Free None FirstMB
1 1 X NotFree None LastMB Overrun
FIFO enabled, Queue disabled
1 0 0 X NotFull6 FIFO
1 0 0 None Full7 None Frame lost by FIFO full (FIFO Overflow)
1 0 0 Free Full FirstMB
1 0 0 NotFree Full FirstMB
1 0 1 None NotFull FIFO
1 0 1 None Full None Frame lost by FIFO full (FIFO Overflow)
1 0 1 Free X FirstMB
1 0 1 NotFree X FirtsMB Overrun
FIFO enabled, Queue enabled
1 1 0 X NotFull FIFO
1 1 0 None Full None Frame lost by FIFO full (FIFO Overflow)
The ability to match the same ID in more than one MB can be exploited to implement a
reception queue (in addition to the full featured FIFO) to allow more time for Arm to
service the MBs. By programming more than one MB with the same ID, received
messages will be queued into the MBs. Arm can examine the Time Stamp field of the
MBs to determine the order in which the messages arrived.
Matching to a range of IDs is possible by using ID Acceptance Masks. FlexCAN
supports individual masking per MB. Please refer to Rx Mailboxes Global Mask Register
(FLEXCAN_RXMGMASK). During the matching algorithm, if a mask bit is asserted,
then the corresponding ID bit is compared. If the mask bit is negated, the corresponding
ID bit is "don't care". Please note that the Individual Mask Registers are implemented in
RAM, so they are not initialized out of reset. Also, they can only be programmed while
the module is in Freeze Mode,, otherwise they are blocked by hardware.
FlexCAN also supports an alternate masking scheme with only four mask registers
(RGXMASK, RX14MASK, RX15MASK and RXFGMASK) for backward
compatibility. This alternate masking scheme is enabled when the IRMQ bit in the MCR
Register is negated.
26.6.6.1 Move-in
The move-in process is the copy of a message received by an Rx SMB to a Rx Mailbox
or FIFO that has matched it. If the move destination is the Rx FIFO, attributes of the
message are also copied to the RXFIR FIFO. Each Rx SMB has its own move-in process,
but only one is performed at a given time as described ahead. The move-in starts only
when the message held by the Rx SMB has a corresponding matching winner (see
Matching Process) and all of the following conditions are true:
• the CAN bus has reached or let past either:
• the second bit of Intermission field next to the frame that carried the message
that is in the Rx SMB;
• the first bit of an overload frame next to the frame that carried the message that
is in the Rx SMB;
• there is no ongoing matching process;
• the destination Mailbox is not locked by Arm;
• there is no ongoing move-in process from another Rx SMB. If more than one move-
in processes are to be started at the same time both are performed and the newest
substitutes the oldest.
The term pending move-in is used throughout the document and stands for a move-to-be
that still does not satisfy all of the aforementioned conditions.
The move-in is cancelled and the Rx SMB is able to receive another message if any of
the following conditions is satisfied:
• the destination Mailbox is inactivated after the CAN bus has reached the first bit of
Intermission field next to the frame that carried the message and its matching process
has finished;
• there is a previous pending move-in to the same destination Mailbox.
• the Rx SMB is receiving a frame transmitted by the FlexCAN itself and the self-
reception is disabled;
• any CAN protocol error is detected.
Note that the pending move-in is not cancelled if the module enters in Freeze or Low
Power Mode. It only stays on hold waiting for exiting Low Power Mode and to be
unlocked. If an MB is unlocked during Freeze Mode, the move-in happens immediately.
The move-in process consists of the following steps:
1. if the message is destined to the Rx FIFO, push IDHIT into the RXFIR FIFO;
2. reads the words DATA0-3 and DATA4-7 from the Rx SMB;
3. writes it in the words DATA0-3 and DATA4-7 of the Rx Mailbox;
26.6.6.2 Move-out
The move-out process is the copy of the content from a Tx Mailbox to the Tx SMB when
a message for transmission is available (see Arbitration process). The move-out occurs in
the following conditions:
• the first bit of Intermission field;
• during Bus off field when TX Error Counter is in the 124 to 128 range;
• during BusIdle field;
• during Wait For Bus Idle field.
The move-out process is not atomic. Only Arm has priority to access the memory
concurrently out of BusIdle state. In BusIdle, the move-out has the lowest priority to the
concurrent memory accesses.
In order to abort a transmission, Arm must write a specific abort code (0b1001) to the
CODE field of the Control and Status word. The active MBs configured as transmission
must be aborted first and then they may be updated. If the abort code is written to a
Mailbox that is currently being transmitted, or to a Mailbox that was already loaded into
the SMB for transmission, the write operation is blocked and the MB is kept active, but
the abort request is captured and kept pending until one of the following conditions are
satisfied:
• The module loses the bus arbitration
• There is an error during the transmission
• The module is put into Freeze Mode
• The module enters in BusOff state
• There is an overload frame
If none of conditions above are reached, the MB is transmitted correctly, the interrupt
flag is set in the IFLAG register and an interrupt to the Arm is generated (if enabled). The
abort request is automatically cleared when the interrupt flag is set. In the other hand, if
one of the above conditions is reached, the frame is not transmitted, therefore the abort
code is written into the CODE field, the interrupt flag is set in the IFLAG and an interrupt
is (optionally) generated to Arm.
If Arm writes the ABORT code before the transmission begins internally, then the write
operation is not blocked, therefore the MB is updated and the interrupt flag is set. In this
way Arm just needs to read the abort code to make sure the active MB was safely
inactivated. Although the AEN bit is asserted and Arm wrote the abort code, in this case
the MB is inactivated and not aborted, because the transmission did not start yet. One
Mailbox is only aborted when the abort request is captured and kept pending until one of
the previous conditions are satisfied.
The abort procedure can be summarized as follows:
1. Arm checks the corresponding IFLAG and clears it, if asserted.
2. Arm writes 0b1001 into the CODE field of the C/S word.
3. Arm waits for the corresponding IFLAG indicating that the frame was either
transmitted or aborted.
4. Arm reads the CODE field to check if the frame was either transmitted
(CODE=0b1000) or aborted (CODE=0b1001).
5. It is necessary to clear the corresponding IFLAG in order to allow the MB to be
reconfigured.
The locking mechanism only applies to Rx MBs that are not part of FIFO and have a
code different than INACTIVE (0b0000) or EMPTY1 (0b0100). Also, Tx MBs can not
be locked.
Suppose, for example, that the FIFO is disabled and the second and the fifth MBs of the
array are programmed with the same ID, and FlexCAN has already received and stored
messages into these two MBs. Suppose now that the Arm decides to read MB number 5
and at the same time another message with the same ID is arriving. When Arm reads the
Control and Status word of MB number 5, this MB is locked. The new message arrives
and the matching algorithm finds out that there are no "free-to-receive" MBs, so it
decides to override MB number 5. However, this MB is locked, so the new message can
not be written there. It will remain in the SMB waiting for the MB to be unlocked, and
only then will be written to the MB. If the MB is not unlocked in time and yet another
new message with the same ID arrives, then the new message overwrites the one on the
SMB and there will be no indication of lost messages either in the CODE field of the MB
or in the Error and Status Register.
While the message is being moved-in from the SMB to the MB, the BUSY bit on the
CODE field is asserted. If Arm reads the Control and Status word and finds out that the
BUSY bit is set, it should defer accessing the MB until the BUSY bit is negated.
If the BUSY bit is asserted or if the MB is empty, then reading the Control and Status
word does not lock the MB.
Inactivation takes precedence over locking. If Arm inactivates a locked Rx Mailbox, then
its lock status is negated and the Mailbox is marked as invalid for the current matching
round. Any pending message on the SMB will not be transferred anymore to the
Mailbox.An MB is unlocked when Arm reads the Free Running Timer Register (see Free
Running Timer Register (FLEXCAN_TIMER)), or the C/S word of another MB.
Lock and unlock mechanisms have the same functionality in both Normal and Freeze
modes.
An unlock during Normal or Freeze mode results in the move-in of the pending message.
However, the move-in is postponed if an unlock occurs during any of the low power
modes (see in Modes of Operation specific information on Module Disable or Stop
modes) and it will take place only when the module resumes to Normal or Freeze modes.
26.6.8 Rx FIFO
The receive-only FIFO is enabled by asserting the RFEN bit in the MCR.
1. In previous FlexCAN versions, reading the C/S word locks the MB even if it is EMPTY. This behavior is maintained when
the IRMQ bit is negated.
The reset value of this bit is zero to maintain software backward compatibility with
previous versions of the module that did not have the FIFO feature. The FIFO is 6-
message deep, therefore when the FIFO is enabled, the memory region occupied by the
first 6 Message Buffers is reserved for use of the FIFO engine (see Rx FIFO Structure).
Arm can read the received messages sequentially, in the order they were received, by
repeatedly reading a Message Buffer structure at the output of the FIFO.
The IFLAG[BUF5I] (Frames available in Rx FIFO) is asserted when there is at least one
frame available to be read from the FIFO. An interrupt is generated if it is enabled by the
corresponding mask bit. Upon receiving the interrupt, Arm can read the message
(accessing the output of the FIFO as a Message Buffer) and the RXFIR register and then
clear the interrupt. If there are more messages in the FIFO the act of clearing the interrupt
updates the output of the FIFO with the next message and update the RXFIR with the
attributes of that message, reissuing the interrupt to Arm. Otherwise, the flag remains
negated. The output of the FIFO is only valid when the IFLAG[BUF5I] is asserted.
The IFLAG[BUF6I] (Rx FIFO Warning) is asserted when the number of unread
messages within the Rx FIFO is increased to 5 from 4 due to the reception of a new one,
meaning that the Rx FIFO is almost full. The flag remains asserted until Arm clears it.
The IFLAG[BUF7I] (Rx FIFO Overflow) is asserted when an incoming message was lost
because the Rx FIFO is full. Note that the flag will not be asserted when the Rx FIFO is
full and the message was captured by a Mailbox. The flag remains asserted until the Arm
clears it.
Clearing one of those three flags does not affect the state of the other two.
An interrupt is generated if an IFLAG bit is asserted and the corresponding mask bit is
asserted too.
A powerful filtering scheme is provided to accept only frames intended for the target
application, thus reducing the interrupt servicing work load. The filtering criteria is
specified by programming a table of up to 128 32-bit registers, according to
CTRL2[RFFN] setting, that can be configured to one of the following formats (see also
Rx FIFO Structure):
• Format A: 128 IDAFs (extended or standard IDs including IDE and RTR)
• Format B: 256 IDAFs (standard IDs or extended 14-bit ID slices including IDE and
RTR)
• Format C: 512 IDAFs (standard or extended 8-bit ID slices)
Every frame available in the FIFO has a corresponding IDHIT (Identifier Acceptance
Filter Hit Indicator) that can be read by accessing the RXFIR register. The
RXFIR[IDHIT] field refers to the message at the output of the FIFO and is valid whilst
the IFLAG[BUF5I] flag is asserted. The RXFIR register must be read only before
clearing the flag, which guarantees that the information refers to the correct frame within
the FIFO.
Up to thirty two elements of the ID Filter Table are individually affected by the
Individual Mask Registers (RXIMR0 - RXIMR31), according to CTRL2[RFFN] setting
(refer to Control 2 Register (FLEXCAN_CTRL2)), allowing very powerful filtering
criteria to be defined. If the MCR[IRMQ] bit is negated (or if the RXIMR are not
available for the particular MCU), then the FIFO ID Filter Table is affected by
RXFGMASK.
automatic remote response frame will be generated. The mask registers are used in
the matching process.
• If RFEN is asserted FlexCAN will not generate an automatic response for remote
request frames that match the FIFO filtering criteria. If the remote frame matches one
of the target IDs, it will be stored in the FIFO and presented to the Arm. Note that for
filtering formats A and B, it is possible to select whether remote frames are accepted
or not. For format C, remote frames are always accepted (if they match the
ID).Remote Request Frames are considered as normal frames, and generate a FIFO
overflow when a successful reception occurs and the FIFO is already full.
fCANCLK
fTq =
(Prescaler value)
fTq
Bit Rate =
(number of Time Quanta)
2. For further explanation of the underlying concepts please refer to ISO/DIS 11519-1, Section 10.3. Reference also the
Bosch CAN 2.0A/B protocol specification dated September 1991 for bit timing.
NRZ Signal
1 2 ... 16 2 ... 8
where:
NCCP is the number of peripheral clocks in one CAN bit;
fCANCLK is the Protocol Engine (PE) Clock in Hz;
fSYS is the frequency of operation of the system (CHI) clock, in Hz;
PSEG1 is the value in CTRL1[PSEG1] field;
PSEG2 is the value in CTRL1[PSEG2] field;
PROPSEG is the value in CTRL1[PROPSEG] field;
PRESDIV is the value in CTRL1[PRESDIV] field.
For example, 180 CAN bits = 180 x NCCP peripheral clock periods.
Figure 26-2 gives an overview of the CAN compliant segment settings and the related
parameter values.
Table 26-16. Time Segment Syntax
Syntax Description
SYNC_SEG System expects transitions to occur on the bus during this period.
Transmit Point A node in transmit mode transfers a new value to the CAN bus at this point.
Sample Point A node samples the bus at this point. If the three samples per bit option is selected, then this
point marks the position of the third sample.
NOTE
The user must ensure the bit time settings are in compliance
with the CAN Protocol standard (ISO 11898-1).
Start Move
(bit 2)
DLC (4) DATA and/ or CRC (15 to79) EOF (7) Interm
Move-in
Matching WIndow (26 to90 bits) Window
Move-out
Arbitration Window (25 bits) Window
BusOff
Figure 26-5. Arbitration at the end of Bus Off and Move-Out Time Windows
When doing matching and arbitration, FlexCAN needs to scan the whole Message Buffer
memory during the available time window. In order to have sufficient time to do that, the
following requirements must be observed:
• A valid CAN bit timing must be programmed, as indicated in Table 26-17
• The peripheral clock frequency can not be smaller than the oscillator clock
frequency, i.e. the PLL can not be programmed to divide down the oscillator clock
• There must be a minimum ratio between the peripheral clock frequency and the CAN
bit rate, as specified in the following table.
Table 26-18. Minimum Ratio Between Peripheral Clock Frequency and CAN Bit Rate
Number of Message Buffers RFEN Minimum Number of Peripheral
Clocks per CAN bit
16 and 32 0 16
64 0 25
16 1 16
32 1 17
64 1 30
A direct consequence of the first requirement is that the minimum number of time quanta
per CAN bit must be 8, so the oscillator clock frequency should be at least 8 times the
CAN bit rate. The minimum frequency ratio specified in Table 26-18 can be achieved by
choosing a high enough peripheral clock frequency when compared to the oscillator clock
frequency, or by adjusting one or more of the bit timing parameters (PRESDIV,
PROPSEG, PSEG1, PSEG2). As an example, taking the case of 64 MBs, if the oscillator
and peripheral clock frequencies are equal and the CAN bit timing is programmed to
have 8 time quanta per bit, then the prescaler factor (PRESDIV + 1) should be at least 2.
For prescaler factor equal to one and CAN bit timing with 8 time quanta per bit, the ratio
between peripheral and oscillator clock frequencies should be at least 2.
After requesting Freeze Mode, the user must wait for the FRZ_ACK bit to be asserted in
MCR before executing any other action, otherwise FlexCAN may operate in an
unpredictable way. In Freeze mode, all memory mapped registers are accessible, except
for CTRL1[CLK_SRC] bit that can be read but cannot be written.
Exiting Freeze Mode is done in one of the following ways:
• Arm negates the FRZ bit in the MCR Register
• The Arm is removed from Debug Mode and the HALT bit is negated
The FRZ_ACK bit is negated after protocol engine recognizes the negation of freeze
request. Once out of Freeze Mode, FlexCAN tries to re-synchronize to the CAN bus by
waiting for 11 consecutive recessive bits.
mode is done by negating the MDIS bit by Arm, which make FlexCAN requests to
resume the clocks and negates the LPM_ACK bit after CAN protocol engine recognizes
the negation of disable mode requested by Arm.
The sensitivity to CAN bus activity can be modified by applying a low-pass filter
function to the FLEXCAN_RX input line while in Stop Mode. See the WAK_SRC bit in
Module Configuration Register (FLEXCAN_MCR) . This feature can be used to protect
FlexCAN from waking up due to short glitches on the CAN bus lines. Such glitches can
result from electromagnetic interference within noisy environments, the glitch filter width
can be set in Glitch Filter Width Register (FLEXCAN_GFWR).
26.6.11 Interrupts
The module can generate up to 70 interrupt sources (64 interrupts due to message buffers
and 6 interrupts due to Ored interrupts from MBs, Bus Off, Error, Tx Warning, Rx
Warning and Wake Up)).
The number of actual sources depends on the configured number of message buffers.
Each one of the message buffers can be an interrupt source, if its corresponding IMASK
bit is set. There is no distinction between Tx and Rx interrupts for a particular buffer,
under the assumption that the buffer is initialized for either transmission or reception.
Each of the buffers has assigned a flag bit in the IFLAG Registers. The bit is set when the
corresponding buffer completes a successful transmission/reception and is cleared when
the Arm writes it to '1' (unless another interrupt is generated at the same time).
If the Rx FIFO is enabled (bit RFEN on MCR set), the interrupts corresponding to MBs 0
to 7 have a different behavior. Bit 7 of the IFLAG1 becomes the "FIFO Overflow" flag;
bit 6 becomes the FIFO Warning flag, bit 5 becomes the "Frames Available in FIFO flag"
and bits 4-0 are unused. See Interrupt Flags 1 Register (FLEXCAN_IFLAG1) for more
information.
A combined interrupt for all MBs is also generated by an Or of all the interrupt sources
from MBs. This interrupt gets generated when any of the Mailboxes or FIFO generates an
interrupt. The Arm must read the IFLAG Registers to determine which MB or FIFO
caused the interrupt.
The other 5 interrupt sources (Bus Off, Error, Tx Warning, Rx Warning and Wake Up
generate interrupts like the MB ones, and can be read from both the Error and Status
Register 1 and 2. The Bus Off, Error, Tx Warning and Rx Warning interrupt mask bits
are located in the Control 1 Register and the Wake-Up interrupt mask bit is located in the
MCR.
The complete memory map for a FLEXCAN module with 64 MBs capability is shown in
the following table. Each individual register is identified by its complete name and the
corresponding mnemonic. The access type can be Supervisor (S) or Unrestricted (U).
Most of the registers can be configured to have either Supervisor or Unrestricted access
by programming the SUPV bit in the MCR Register. The MCR register allows only
Supervisor access regardless the SUPV bit state.
The FLEXCAN module stores CAN messages for transmission and reception using a
Mailboxes and Rx FIFO structure.
FLEXCAN memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
209_0000 Module Configuration Register (FLEXCAN1_MCR) 32 R/W 5980_000Fh 26.8.1/1169
209_0004 Control 1 Register (FLEXCAN1_CTRL1) 32 R/W 0000_0000h 26.8.2/1174
209_0008 Free Running Timer Register (FLEXCAN1_TIMER) 32 R/W 0000_0000h 26.8.3/1177
Rx Mailboxes Global Mask Register
209_0010 32 R/W FFFF_FFFFh 26.8.4/1177
(FLEXCAN1_RXMGMASK)
209_0014 Rx Buffer 14 Mask Register (FLEXCAN1_RX14MASK) 32 R/W FFFF_FFFFh 26.8.5/1178
209_0018 Rx Buffer 15 Mask Register (FLEXCAN1_RX15MASK) 32 R/W FFFF_FFFFh 26.8.6/1179
209_001C Error Counter Register (FLEXCAN1_ECR) 32 R/W 0000_0000h 26.8.7/1180
209_0020 Error and Status 1 Register (FLEXCAN1_ESR1) 32 R/W 0000_0000h 26.8.8/1181
209_0024 Interrupt Masks 2 Register (FLEXCAN1_IMASK2) 32 R/W 0000_0000h 26.8.9/1185
26.8.10/
209_0028 Interrupt Masks 1 Register (FLEXCAN1_IMASK1) 32 R/W 0000_0000h
1185
Table continues on the next page...
NOT_RDY
LPM_ACK
FRZ_ACK
R
SOFT_RST
WAK_MSK
WAK_SRC
WRN_EN
Reserved
SRX_DIS
SUPV
HALT
SLF_
MDIS FRZ RFEN IRMQ
WAK
Reset 0 1 0 1 1 0 0 1 1 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
LPRIO_EN
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
1 FIFO enabled
0 FIFO not enabled
28 Assertion of this bit puts the FLEXCAN module into Freeze Mode. The Arm should clear it after initializing
HALT the Message Buffers and Control Register. No reception or transmission is performed by FLEXCAN before
this bit is cleared. Freeze Mode can not be entered while FLEXCAN is in any of the low power modes.See
Freeze Mode for more information
1 FlexCAN is in Supervisor Mode. Affected registers allow only Supervisor access. Unrestricted access
behaves as though the access was done to an unimplemented register location
0 FlexCAN is in User Mode. Affected registers allow both Supervisor and Unrestricted accesses
22 This bit enables the Self Wake Up feature when FLEXCAN is in Stop Mode. If this bit had been asserted
SLF_WAK by the time FLEXCAN entered Stop Mode, then FLEXCAN will look for a recessive to dominant transition
on the bus during these modes. If a transition from recessive to dominant is detected during Stop Mode,
then FLEXCAN generates, if enabled to do so, a Wake Up interrupt to the Arm so that it can resume the
clocks globally and FlexCAN can request to resume the clocks. This bit can not be written while the
module is in Stop Mode.
1 TWRN_INT and RWRN_INT bits are set when the respective error counter transition from <96 to ≥ 96.
0 TWRN_INT and RWRN_INT bits are zero, independent of the values in the error counters.
20 This read-only bit indicates that FLEXCAN is either in Disable Mode or Stop Mode. Either of these low
LPM_ACK power modes can not be entered until all current transmission or reception processes have finished, so
the Arm can poll the LPM_ACK bit to know when FLEXCAN has actually entered low power mode. See
Module Disable Mode, and Stop Mode for more information
1 FLEXCAN uses the filtered FLEXCAN_RX input to detect recessive to dominant edges on the CAN
bus
0 FLEXCAN uses the unfiltered FLEXCAN_RX input to detect recessive to dominant edges on the CAN
bus.
18 This field is reserved.
- Reserved
1 Abort enabled
0 Abort disabled
11–10 This field is reserved.
- Reserved
9–8 This 2-bit field identifies the format of the elements of the Rx FIFO filter table, as shown below. Note that
IDAM all elements of the table are configured at the same time by this field (they are all the same format). See
Rx FIFO Structure. This bit can only be written in Freeze mode as it is blocked by hardware in other
modes.
This register is defined for specific FLEXCAN control features related to the CAN bus,
such as bit-rate, programmable sampling point within an Rx bit, Loop Back Mode, Listen
Only Mode, Bus Off recovery behavior and interrupt enabling (Bus-Off, Error, Warning).
It also determines the Division Factor for the clock prescaler.
Address: Base address + 4h offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
RWRN_MSK
TWRN_MSK
BOFF_MSK
BOFF_REC
Reserved
ERR_
LPB Reserved SMP TSYN LBUF LOM PROP_SEG
MSK
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RXMGMASK is used to mask the filter fields of all Rx MBs, excluding MBs 14-15,
which have individual mask registers.
This register can only be written in Freeze mode as it is blocked by hardware in other
modes.
Table 26-19. Rx Mailboxes Global Mask usage
SMB[RTR]1 CTRL2[RRS] CTRL2[EACEN] Mailbox filter fields
MB[RTR] MB[IDE] MB[ID] reserved
0 - 0 - - MG[28:0] MG[31:29]
Note2 Note3
0 - 1 MG[31] MG[30] MG[28:0] MG[29]
1 0 - - - - MG[31:0]
1 1 0 - - MG[28:0] MG[31:29]
1 1 1 MG[31] MG[30] MG[28:0] MG[29]
1. RTR bit of the Incoming Frame. It is saved into an auxiliary MB called Rx Serial Message Buffer (Rx SMB).
2. If CTRL2[EACEN] bit is negated the RTR bit of Mailbox is never compared with the RTR bit of the Incoming Frame (Rx
SMB[RTR]).
3. If CTRL2[EACEN] bit is negated the IDE bit of Mailbox is always compared with the IDE bit of the Incoming Frame (Rx
SMB[IDE]).
1 The corresponding bit in the filter is checked against the one received
0 the corresponding bit in the filter is "don't care"
successful message reception, the counter is set to a value between 119 and 127 to
resume to 'Error Active' state.
Address: Base address + 1Ch offset
Bit 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
R
W
Reserved RX_ERR_COUNTER TX_ERR_COUNTER
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SYNCH
R
RWRN_INT
TWRN_INT
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CRC_ERR
FRM_ERR
BIT1_ERR
BIT0_ERR
ACK_ERR
RX_WRN
TX_WRN
STF_ IDLE
R TX FLT_CONF RX
ERR
BOFF_INT
WAK_INT
ERR_INT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00 Error Active
01 Error Passive
1x Bus off
3 This bit indicates if FlexCAN is receiving a message. Refer to Table 26-20.
RX
1 FLEXCAN is transmitting a message
0 FLEXCAN is receiving a message
2 This bit is set when FLEXCAN enters 'Bus Off' state. If the corresponding mask bit in the Control Register
BOFF_INT (BOFF_MSK) is set, an interrupt is generated to the Arm. This bit is cleared by writing it to '1'. Writing '0'
has no effect.
1 Indicates setting of any Error Bit in the Error and Status Register
0 No such occurrence
0 When FLEXCAN is Stop Mode and a recessive to dominant transition is detected on the CAN bus and if
WAK_INT the WAK_MSK bit in the MCR Register is set, an interrupt is generated to the Arm. This bit is cleared by
writing it to '1'. When SLF_WAK is negated, this flag is masked. Arm must clear this flag before disabling
the bit. Otherwise it will be set when the SLF_WAK is set again. Writing '0' has no effect
1 Indicates a recessive to dominant transition received on the CAN bus when the FLEXCAN module is
in Stop Mode
0 No such occurrence
This register allows any number of a range of 32 Message Buffer Interrupts to be enabled
or disabled. It contains one interrupt mask bit per buffer, enabling the Arm to determine
which buffer generates an interrupt after a successful transmission or reception (i.e. when
the corresponding IFLAG2 bit is set).
Address: Base address + 24h offset
Bit 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
R
W
BUF63M_BUF32M
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This register allows to enable or disable any number of a range of 32 Message Buffer
Interrupts. It contains one interrupt mask bit per buffer, enabling the Arm to determine
which buffer generates an interrupt after a successful transmission or reception (i.e.,
when the corresponding IFLAG1 bit is set).
Address: Base address + 28h offset
Bit 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
R
W
BUF31M_BUF0M
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This register defines the flags for 32 Message Buffer interrupts. It contains one interrupt
flag bit per buffer. Each successful transmission or reception sets the corresponding
IFLAG2 bit. If the corresponding IMASK2 bit is set, an interrupt will be generated. The
interrupt flag must be cleared by writing it to '1'. Writing '0' has no effect.Before updating
MCR[MAXMB] field, Arm must treat the IFLAG2 bits which MB value is greater than
the MCR[MAXMB] to be updated, otherwise they will keep set and be inconsistent with
the amount of MBs available.
Address: Base address + 2Ch offset
Bit 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
R
W
BUF63I_BUF32I
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
in the Rx FIFO region (see Rx FIFO). Otherwise, these IFLAGS will mistakenly show
the related MBs now belonging to FIFO as having contents to be serviced. When the
RFEN is negated, the FIFO flags must be cleared. The same care must be taken when a
RFFN value is selected extending Rx FIFO filters beyond MB7 (see Control 2 Register
(FLEXCAN_CTRL2)). For example, when RFFN is 0x8, the MB0-23 range is occupied
by Rx FIFO filters and related IFLAGS must be cleared.
Before updating MCR[MAXMB] field, Arm must service the IFLAG1 which MB value
is greater than the MCR[MAXMB] to be updated, otherwise they will keep set and be
inconsistent with the amount of MBs available.
Address: Base address + 30h offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BUF31I_BUF8I
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
BUF7I
BUF6I
BUF5I
BUF31I_BUF8I BUF4I_BUF0I
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1. The number of the last remaining available mailboxes is defined by the MCR[MAXMB] field.
2. If Rx Individual Mask Registers are not enabled then all Rx FIFO filters are affected by the Rx FIFO Global Mask.
Each group of eight filters occupies a memory space equivalent to two Message Buffers
which means that the more filters are implemented the less Mailboxes will be available.
Considering that the Rx FIFO occupies the memory space originally reserved for MB0-5,
RFFN should be programmed with a value corresponding to a number of filters not
greater than the number of available memory words which can be calculated as follows:
(SETUP_MB - 6) x 4
SETUP_MB - 8 - (RFFN x 2)
If the Number of Rx FIFO Filters programmed through RFFN exceeds the SETUP_MB
value, the exceeding ones will not be functional.Unshaded regions in Table 26-22
indicate the valid combinations of MAXMB, RFEN and RFFN, shaded regions are not
functional.
Table 26-22. Valid Combinations of MAXMB, RFEN and RFFN
RFF 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
N
RFE 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
N
MAX
MB
0-6
7-8
9 - 10
11 -
12
13
-14
15 -
16
17
-18
19 -
20
21 -
22
R
WRMFRZ
EACEN
Reserved RFFN TASD MRP RRS
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
where:
fCANCLK is the Protocol Engine (PE) Clock in Hz; PE clock is derrived from CAN_CLK_ROOT in CCM. See
the Clock controller module.
fSYS is the peripheral clock in Hz;
MAXMB is the value in CTRL1[MAXMB] field;
RFEN is the value in CTRL1[RFEN] bit;
RFFN is the value in CTRL2[RFFN] field;
PSEG1 is the value in CTRL1[PSEG1] field;
PSEG2 is the value in CTRL1[PSEG2] field;
PROPSEG is the value in CTRL1[PROPSEG] field;
PRESDIV is the value in CTRL1[PRESDIV] field.
Please refer to Arbitration process and Protocol Timing for more details.
18 If this bit is set the matching process starts from the Mailboxes and if no match occurs the matching
MRP continues on the Rx FIFO. This bit can only be written in Freeze mode as it is blocked by hardware in
other modes.
1 Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within
the incoming frame. Mask bits do apply.
0 Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits.
- This field is reserved.
Table continues on the next page...
This register reflects various interrupt flags and some general status.
Address: Base address + 38h offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R LPTM
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R VPS IMB
Reserved
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 If ESR2[VPS] is asserted, there is at least one inactive Mailbox. LPTM content is the number of the
first one.
0 If ESR2[VPS] is asserted, the ESR2[LPTM] is not an inactive Mailbox.
- This field is reserved.
Reserved
R MBCRC
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R TXCRC
Reserved
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C - - - FGM[31:24]
FGM[23:16]
FGM[15:8]
FGM[7:0]
2
1. If MCR[IDAM] field is equivalent to the format B only the fourteen most significant bits of the Identifier of the incoming
frame are compared with the Rx FIFO filter.
2. If MCR[IDAM] field is equivalent to the format C only the eight most significant bits of the Identifier of the incoming frame
are compared with the Rx FIFO filter.
R IDHIT
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The Glitch Filter just takes effects when FLEXCAN enters the STOP mode.
Address: Base address + 9E0h offset
Bit 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
R 0 GFWR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
27.1 Overview
The General Power Control (GPC) block includes the sub-blocks listed here.
• CPU Power Gating Control (PGC)
• GPU/VPU accelerators power gating controller
Each sub-block has its own IP registers.
GPC determines wake-up IRQ for exiting WAIT/STOP mode (with or without CPU
power gating).
PGC ARM
IP interface
GPC_IP
27.2 Clocks
The table found here describes the clock sources for GPC.
Please see Clock Controller Module (CCM) for clock setting, configuration and gating
information.
Table 27-1. GPC Clocks
Clock name Clock Root Description
ipg_clk ipg_clk_root Peripheral clock
ipg_clk_s ipg_clk_root Peripheral access clock
pgc_clk ipg_clk_root PGC peripheral clock
sys_clk ipg_clk_root Module clock
27.3.1 Overview
The Power Gating Controller (PGC) is a power management component that controls the
power-down and power-up sequencing of individual subsystems.
The sequence timing is programmable using the PGC control registers. Figure 27-3
shows PGC as part of the SoC’s overall power management scheme.
SoC
Power Management and Clock-Control Subsystems
Acknowledge
27.3.1.1 Features
Key features of the PGC include:
• Provides the ability to switch off power to a target subsystem.
• Generates power-up and power-down control sequences.
• Provides programmable registers to adjust the timing of the power control signals.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 1
GPCIRQM
Reserved
- -
Reset 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
gpu_vpu_pup_req
gpu_vpu_pdn_req
R 0 0 0
Reserved
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
IMR1
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
IMR2
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
IMR3
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
IMR4
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R ISR1
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R ISR2
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R ISR3
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R ISR4
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE
The base address of each PGC module instantiation is specified
in the GPC module. Absolute address values will be calculated
by [GPC base address] + [PGC CPU/GPU/DISPLAY Offset].
PGC memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
20D_C260 PGC GPU PGC Control Register (PGC_GPU_CTRL) 32 R/W 0000_0000h 27.6.1/1211
Table continues on the next page...
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 PCR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 0
SW2ISO SW
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1
NOTE: The PGC clock is generated from the IPG_CLK_ROOT. for frequency configuration of the
IPG_CLK_ROOT. See Clock Controller Module (CCM).
Bit 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
R 0 0
ISO2SW ISO
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 PSR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 The target subsystem was not powered down for the previous power-down request.
1 The target subsystem was powered down for the previous power-down request.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 PCR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R 0 0
SW2ISO SW
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1
NOTE: SW2ISO must not be programmed to zero. The SW2ISO value should be chosen such that the
delay before negating isolation is greater than the LDO ramp-up time.
7–6 This read-only field is reserved and always has the value 0.
Reserved
SW After a power-up request (pup_req assertion), the PGC waits a number of 32k clocks equal to the value of
SW before asserting.
Bit 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
R 0 0
ISO2SW ISO
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 PSR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 The target subsystem was not powered down for the previous power-down request.
1 The target subsystem was powered down for the previous power-down request.
28.1 Overview
The GPIO general-purpose input/output peripheral provides dedicated general-purpose
pins that can be configured as either inputs or outputs.
When configured as an output, it is possible to write to an internal register to control the
state driven on the output pin. When configured as an input, it is possible to detect the
state of the input by reading the state of an internal register. In addition, the GPIO
peripheral can produce CORE interrupts.
The GPIO is one of the blocks controlling the IOMUX of the chip.
Block
GPIO IOMUX
GPIO.DR input_on
GPIO.GDIR
GPIO.PSR Dir
Data_out
GPIO.ICR1 GPIO.ICR2 Data_in
GPIO.EDGE_SEL PAD1
GPIO.IMR
GPIO.ISR
SW_MUX_CTL_PAD_*
MUX_MODE
SW_PAD_CTL_PAD_*
pad settings
IOMUX input_on
Dir
Data_out
Data_in
PAD2
The GPIO functionality is provided through eight registers, an edge-detect circuit, and
interrupt generation logic.
The eight registers are:
• Data register (GPIO_DR)
• GPIO direction register (GPIO_GDIR)
• Pad sample register (GPIO_PSR)
• Interrupt control registers (GPIO_ICR1, GPIO_ICR2)
GDIR
gdir
GPIO_DR gpio_dr
GPIO_PSR gpio_in
IP Bus Interface
ICR0
Interrupt
Control
GPIO_ICR1 Unit
GPIO_EDGE_SEL int_31_16
GPIO_ISR int_15_0
int_31_0
GPIO_IMR
28.1.2 Features
The GPIO includes the following features:
• General purpose input/output logic capabilities:
• Drives specific data to output using the data register (GPIO_DR)
• Controls the direction of the signal using the GPIO direction register
(GPIO_GDIR)
• Enables the core to sample the status of the corresponding inputs by reading the
pad sample register (GPIO_PSR).
• GPIO interrupt capabilities:
• Supports up to 32 interrupts
• Identifies interrupt edges
• Generates three active-high interrupts to the SoC interrupt controller
28.3 Clocks
The table found here describes the clock sources for GPIO.
Please see the clock controller Module for clock setting, configuration and gating
information.
PAD
DSE
Output
Driver
SRE
Driver PUS
SPEED Config
Logic
ODE
Resd
PU / PD / Keeper
PKE Logic
pull_en_b
input buffer enable (IBE)
PU / PD Keeper
IND
Input
Receiver esd clamp or
HYS trigger circuit
Vo
Vi
Vt- Vt+
Vt+
noisy input voltage
Vth
Vt-
time
OVDD
OVDD
Predriver
do
Vpad
Output buffer
OVSS
OVSS
measure
PKE = VDD
keeper_n
OVDD
DO
pad
OBE
keeper_p OVDD
OVDD
OVDD1 OVDD2
external
If internal pull-up resistor (Rpu) is
Rpu Rpu
used, output level will depend on
OVDD1
OVSS1
NOTE
While the GPIO direction is set to input (GPIO_GDIR = 0), a
read access to GPIO_DR does not return GPIO_DR data.
Instead, it returns the GPIO_PSR data, which is the
corresponding input signal value.
There are eight 32-bit GPIO registers. All registers are accessible from the IP interface.
Only 32-bit access is supported.
The GPIO memory map is shown in the following table.
GPIO memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
209_C000 GPIO data register (GPIO1_DR) 32 R/W 0000_0000h 28.5.1/1237
209_C004 GPIO direction register (GPIO1_GDIR) 32 R/W 0000_0000h 28.5.2/1238
209_C008 GPIO pad status register (GPIO1_PSR) 32 R 0000_0000h 28.5.3/1239
209_C00C GPIO interrupt configuration register1 (GPIO1_ICR1) 32 R/W 0000_0000h 28.5.4/1239
209_C010 GPIO interrupt configuration register2 (GPIO1_ICR2) 32 R/W 0000_0000h 28.5.5/1243
Table continues on the next page...
NOTE: The I/O multiplexer must be configured to GPIO mode for the GPIO_DR value to connect with the
signal. Reading the data register with the input path disabled always returns a zero value.
GPIO_GDIR functions as direction control when the IOMUXC is in GPIO mode. Each
bit specifies the direction of a one-bit signal. The mapping of each DIR bit to a
corresponding SoC signal is determined by the SoC's pin assignment and the IOMUX
table. For more details consult the IOMUXC chapter.
Address: Base address + 4h offset
Bit 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
R
W
GDIR
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: GPIO_GDIR affects only the direction of the I/O signal when the corresponding bit in the I/O MUX
is configured for GPIO.
GPIO_PSR is a read-only register. Each bit stores the value of the corresponding input
signal (as configured in the IOMUX). This register is clocked with the ipg_clk_s clock,
meaning that the input signal is sampled only when accessing this location. Two wait
states are required any time this register is accessed for synchronization.
Address: Base address + 8h offset
Bit 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
R PSR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The IOMUXC must be configured to GPIO mode for GPIO_PSR to reflect the state of the
corresponding signal.
GPIO_ICR1 contains 16 two-bit fields, where each field specifies the interrupt
configuration for a different input signal.
Address: Base address + Ch offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
ICR15 ICR14 ICR13 ICR12 ICR11 ICR10 ICR9 ICR8
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
ICR7 ICR6 ICR5 ICR4 ICR3 ICR2 ICR1 ICR0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
GPIO_ICR2 contains 16 two-bit fields, where each field specifies the interrupt
configuration for a different input signal.
Address: Base address + 10h offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
W
ICR31 ICR30 ICR29 ICR28 ICR27 ICR26 ICR25 ICR24
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
ICR23 ICR22 ICR21 ICR20 ICR19 ICR18 ICR17 ICR16
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The GPIO_ISR functions as an interrupt status indicator. Each bit indicates whether an
interrupt condition has been met for the corresponding input signal. When an interrupt
condition is met (as determined by the corresponding interrupt condition register field),
the corresponding bit in this register is set. Two wait states are required in read access for
synchronization. One wait state is required for reset.
Address: Base address + 18h offset
Bit 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
R ISR
W w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
29.1 Overview
The GPMI controller is a flexible interface to supporting up to four NAND flash chip
selects.
• ONFI 2.2, DDR Mode, Samsung / Toshiba Toggle NAND protocol compatible.
• Fully configurable address and command behavior, providing support for future
devices not yet specified.
The GPMI resides on the APBH. The GPMI also provides an interface to the BCH
module to allow direct parity processing.
Registers are clocked on the HCLK domain. The I/O and pin timing are clocked on a
dedicated GPMICLK domain. GPMICLK can be set to maximize I/O performance.
The following figure shows a block diagram of the GPMI controller.
AMBA
APBHDMA
AHB SLAVE AHB MASTER
GPMICLK
HCLK
SHARED DMA
DMA Request 3
DMA Request 2
DMA Request 0
DMA Request 1
APBH MASTER
APBH
GPMI / Memory /
GPIO Pin Mux
Pins
29.3 Clocks
The table found here describes the clock sources for GPMI.
Please see Clock Controller Module (CCM) for clock setting, configuration and gating
information.
Table 29-2. GPMI Clocks
Clock name Clock Root Description
bch_input_apb_clk usdhc3_clk_root BCH to APBH input clock
gpmi_bch_input_bch_cl usdhc4_clk_root BCH input clock
k
gpmi_bch_input_gpmi_i enfc_clk_root GPMI IO input clock
o_clk
gpmi_input_apb_clk usdhc3_clk_root GPMI to APBH clock
There are two options for controlling the four NAND chip selects via the DMA interface.
The first option is the one to one mapping, where the each DMA channel is tied to its
own NAND chip select. For example DMA channel 'n' accesses only NAND attached to
chip select 'n'. The second option is the decoupled mode where a DMA channel can
access any or all NAND chip selects connected to the GPMI. A DMA channel will
signify the NAND chip select it wants to access by writing its chip select value in the
GPMI_CTRL0[CS] field and setting the GPMI_CTRL1[DECOUPLE_CS] to 1. This
option is useful if software chooses to use only one DMA channel to access all the
attached NAND devices.
dev_clk
CE0_B
WE_B
1 cycle
DATA[07:00]
as
Output No.1 No.2 No.(n-1) No.n
output[7:0] output[7:0] output[7:0] output[7:0]
from
device
1 cycle
- tAS is configurable by programming HW_GPMI_TIMING0 Address_Setup: in this example, Address_Setup = 4, tAS is equal to 4 dev_clk cycles.
- tDS is configurable by programming HW_GPMI_TIMING0 Data_Setup; in this example, Data_Setup = 3, tDS is equal to 3 dev_clk cycles
- tDH is configuarble by programming HW_GPMI_TIMING0 Data_Hold: in this example, Data_Hold = 2, tDH is equal to 2 dev_clk cycles
- tAS/tDS/tDH will extend, if the output data is not ready in device fifo.
Figure 29-2. Asynchronous Mode Basic Write Timing Diagram (command write, address
write, or data write
tCK
dev_clk
CE0_B
- tAS is configurable by programming HW_GPMI_TIMING0 Address_Setup: in this example, Address_Setup = 4, tAS is equal to 4 dev_clk cycles.
- tDS is configurable by programming HW_GPMI_TIMING0 Data_Setup; in this example, Data_Setup = 3, tDS is equal to 3 dev_clk cycles
- tDH is configuarble by programming HW_GPMI_TIMING0 Data_Hold: in this example, Data_Hold = 2, tDH is equal to 2 dev_clk cycles
- tRD is the delay from RE_B rising edge to the read datas ampling edge. If SDR DLL is not enabled, tRD is 0. If SDR DLL enabled, the delay depends on SDR DLL delay.
- tAS/tDS/tDH will extend, if the output data is not ready in device fifo.
Figure 29-3. ONFI Asynchronous Mode Basic Read Timing Diagram (data read)
delay is required to sample to nand read data. (The 4ns provides adequate data setup time
for the GPMI.) In this case set GPMI_CTRL1[HALF_PERIOD] = 0;
GPMI_CTRL1[RDN_DELAY] = 0; GPMI_CTRL1[DLL_ENABLE] = 0.
When (tREA + 4ns) is greater than or equal to tRP, a delay of the feedback read strobe is
required to sample to nand read data. This delay is equal to the difference between these
two timings:
DELAY = tREA + 4ns - tRP.
Since the GPMI delay chain is limited to 12ns maximum, if DELAY > 12ns then increase
tRP by increasing the value of GPMI_TIMING0[DATA_SETUP] until DELAY is less
than or equal to 12ns.
The GPMI programming for this DELAY depends on the GPMICLK period. The GPMI
DLL will not function properly if the GPMICLK period is greater than 24ns: disable the
DLL if this is the case. If the GPMICLK period is greater than 12ns (and not greater than
24ns), set the GPMI_CTRL1[HALF_PERIOD]=1; This will cause the DLL reference
period (RP) to be one-half of the GPMICLK period. If the GPMICLK period is 12ns or
less then set the GPMI_CTRL1[HALF_PERIOD]=0; This will cause the DLL reference
period (RP) to be equal to the GPMICLK period. DELAY is a multiple (0 to 1.875) of
RP.
The GPMI_CTRL1[RDN_DELAY] is encoded as a 1-bit integer and 3-bit fraction delay
factor. DELAY is a multiple of the delay factor and the reference period. See table below
for details.
Table 29-3. RDN DELAY
HW_GPMI_CTRL1[RDN_DELAY] Delay Factor
0 0.000
1 0.125
2 0.250
3 0.375
4 0.500
5 0.625
6 0.750
7 0.875
8 1.000
9 1.125
10 1.250
11 1.375
12 1.500
13 1.625
tRP
tREA
RE_B
ReadData A B C
Feedback RE_B
(tREA + 4 ns) is less than tRP, no delay is required on rising edge of Feedback RDN to sample Read Data
tREA
tRP
RE_B
Read Data A B C
Delay
Feedback RE_B
Where (tREA + 4 ns) is greater than or equal to tRP, a delay of the Feedback RDN is required to sample to nand read data
For example, a NAND with tREAmax = 20 ns, tRPmin = 12 ns, and tRCmin = 25 ns
(read cycle time) may be programmed as follows:
• GPMICLK clock frequency: Consider 480/6 = 80 MHz which is 12.5 ns clock
period. This is too close to the minimum NAND spec if we program the data setup
and hold to 1 GPMICLK cycle. Consider 480/7=68.57 MHz which is 14.58 ns clock
period. With data setup and hold set to 1, we have a tRP of 14.58ns and a tRC of
29.16 ns (good margins).
• Since (tREA +4ns) is greater than tRP, required DELAY = tREA + 4ns - tRP = 20 +
4 - 14.58ns = 9.42 ns.
tCH
tCE
CE_B
CLE
tCAS
tCAH
ALE
tCK
CLK
W/R#
DQS
DQS
output
enable
CMD
DATA[07:00]
DATA[07:00]
tPRE tPOST
Output
Enable
Figure 29-5. ONFI Source Synchronous Mode Basic Command Write Timing Diagram
tCH
tCE
CE_B
CLE
tCAS
tCAH
ALE
tCK
CLK
W/R#
DQS
DQS
oen
ADD
DATA[07:00]
Figure 29-6. ONFI Source Synchronous Mode Basic Address Write Timing Diagram
tCH
tCE
CE_B
tCAS
CLE tCAH
1CMDADDPAUSE 1CMDADDPAUSE
tCAS
ALE tCAH
tCK
CLK
W/R#
DQS
DQS
output
enable
DATA[07:00]
Output tPRE tPOST
enable
Figure 29-7. ONFI Source Synchronous Mode Command + Address Write Timing
Diagram
tCH
tCE
CE_B
tDATAPAUSE
tCALS tCALH
CLE
tCK
CLK
W/R#
tDQSS tDQSS
tDQSS
DQS
DQS
output
enable
DATA[07:00]
DATA[07:00]
Output
enable
Figure 29-8. ONFI Source Synchronous Mode Data Write Timing Diagram
tCH
tCE
CE_B
tDATAPAUSE
tCALS tCALH
CLE
tPRE tPOST
ALE
tCK
CLK
tCALS
W/R# tCALS
Internal
DQS input 4 tCK
Valid
window tWRCK tCKWR
DQS
tDQSD
DQS
output
enable
DATA[07:00]
DATA[07:00]
Output
enable
Figure 29-9. ONFI Source Synchronous Mode Data Read Timing Diagram
dev_clk
CE_B
1 cycle 1 cycle
CLE
ALE
tDS
WE_B
tAS tDH
RE_B
DQS
0.51CK 0.51CK
DATA[07:00] as
Output to
command
device
Figure 29-10. Samsung Toggle Mode Basic Command Write Timing Diagram
dev_clk
CE_B
1 cycle 1 cycle
CLE
ALE
tDS
WE_B
tAS tDH
RE_B
DQS
Figure 29-11. Samsung Toggle Mode Basic Address Write Timing Diagram
Not lock cs
CE_B lock cs
1 cycle
1 cycle
address increment
CLE
ALE
DQS
Figure 29-12. Samsung Toggle Mode Basic Command + Address Timing Diagram
dev_clk
0
CE_B
0
CEL
0
ALE
WE_B 1
RE_B 1
DQS
1tCK tDATAPAUSE 0.5 tCK
0.5 tCK
DATA[07:00]
dev_clk
CE_B
tCE
CEL
ALE
WE_B 1 1tCK
1tCK tPOST 1tCK
tDQSRE
tDQSRE
tDQSRE tCHZ
DQS
DATA[07:00]
dev_clk
lock cs
CE_B
CLE
ALE
1 tCK
RE_B
1 tCK
DQS
0.5 tCK
0.5 tCK
Command
DATA[07:00] 0x80/81/85
address address address address address
dev_clk
lock cs
CE_B
Idle cycles
CLE
1 tCK
1 tCK
ALE
WE_B
tCE
RE_B tPRE
Idle cycles
1 tCK 1 tCK tPOST
DATA PAUSE
DQS
0.5 tCK 0.5 tCK
0.5 tCK
DATA[07:00] address
A B
dev_clk
idle cycles
CE_B
ALE
tDS
WE_B
tAS tDH
RE_B
tPOST
0.5 tCK 1 tCK
DQS
Command
DATA[07:00]
0x10/11
To program the BCH for NAND writes, remove the soft reset and clock gates from
BCH_CTRL[SFTRST] and BCH_CTRL[CLKGATE]. The bulk of BCH programming is
actually applied to the GPMI via PIO operations embedded in its DMA command
structures. This has a subtle implication when writing to the GPMI ECC registers: access
to the these registers must be written in progressive register order. Thus, to write to the
GPMI_ECCCOUNT register, write first (in order) to registers GPMI_CTRL0,
GPMI_COMPARE, and GPMI_ECCCTRL before writing to GPMI_ECCCOUNT.
These additional register writes need to be accounted for in the CMDWORDS field of the
respective DMA channel command register.
NOTE
Note that the GPMI_PAYLOAD and GPMI_AUXILIARY
pointers need to be word-aligned for proper ECC operation. If
those pointers are non-word-aligned, then the BCH engine will
not operate properly and could possibly corrupt system memory
in the adjoining memory regions.
The following registers provide control for programmable elements of the GPMI module.
NOTE
All ATA or UDMA features are not supported for the chip.
NOTE
GPMI does not support the Set feature command in Toggle
mode. The NANDF_DQS output is only enabled in program
operation for Toggle mode, but the Set feature command also
needs to use the NANDF_DQS signal to write data to Toggle
NAND flash. So the Set feature command in Toggle mode is
not supported.
The GPMI control register 0 specifies the GPMI transaction to perform for the current
command chain item.
Address: 11_2000h base + 0h offset + (4d × i), where i=0d to 3d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
COMMAND_MODE
WORD_LENGTH
DEV_IRQ_EN
INCREMENT
ADDRESS_
CLKGATE
LOCK_CS
SFTRST
UDMA
RUN CS ADDRESS
Reset 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
XFER_COUNT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00 Write mode.
01 Read Mode.
10 Read and Compare Mode (setting sense flop).
11 Wait for Ready.
23 This bit should only be changed when RUN==0.
WORD_LENGTH
Reserve = 0x0 Reserved.
8_BIT = 0x1 8-bit Data Bus mode.
0 Reserved.
1 8-bit Data Bus mode.
22–20 Selects which chip select is active for this command. For ATA WAIT_FOR_READY command, this must
CS be set to b01.
19–17 Specifies the three address lines for ATA mode. In NAND mode, use A0 for CLE and A1 for ALE.
ADDRESS
NAND_DATA = 0x0 In NAND mode, this address is used to read and write data bytes.
NAND_CLE = 0x1 In NAND mode, this address is used to write command bytes.
NAND_ALE = 0x2 In NAND mode, this address is used to write address bytes.
Bit 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
R
W
MASK REFERENCE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The GPMI ECC control register handles configuration of the integrated ECC accelerator.
Address: 11_2000h base + 20h offset + (4d × i), where i=0d to 3d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
HANDLE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R RSVD1
ENABLE_ECC
RSVD2
ECC_CMD BUFFER_MASK
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
RSVD2 COUNT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
ADDRESS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R RSVD0
ADDRESS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R
ADDRESS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R RSVD0
ADDRESS
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The GPMI control register 1 specifies additional control fields that are not used on a per-
transaction basis.
Address: 11_2000h base + 60h offset + (4d × i), where i=0d to 3d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RSVD1
R
GPMI_CLK_DIV2_EN
GANGED_RDYBUSY
SSYNC_CLK_STOP
WRITE_CLK_STOP
TIMEOUT_IRQ_EN
DEV_CLK_STOP
TOGGLE_MODE
DECOUPLE_CS
HALF_PERIOD
SSYNCMODE
DLL_ENABLE
UPDATE_CS
BCH_MODE
WRN_DLY_
SEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ABORT_WAIT_REQUEST
ATA_IRQRDY_POLARITY
R
DMA2ECC_MODE
CAMERA_MODE
TIMEOUT_IRQ
GPMI_MODE
DEV_RESET
BURST_EN
DEV_IRQ
ABORT_WAIT_
RDN_DELAY FOR_READY_
CHANNEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 External RDY_BUSY[1] and RDY_BUSY[0] pins are ready when low and busy when high.
1 External RDY_BUSY[1] and RDY_BUSY[0] pins are ready when high and busy when low.
1 When set to 1 and ATA UDMA is enabled the UDMA interface becomes a camera interface.
CAMERA_MODE
0 ATA mode is only supported on channel zero.
GPMI_MODE
If ATA mode is selected, then only channel three is available for NAND use.
Table continues on the next page...
0 NAND mode.
1 ATA mode.
Bit 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
R
ADDRESS_SETUP DATA_HOLD DATA_SETUP
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1
Bit 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
R RSVD1
DEVICE_BUSY_TIMEOUT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
Bit 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
R
W
DATA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R READY_BUSY RDY_TIMEOUT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INVALID_BUFFER_MASK
DEV7_ERROR
DEV6_ERROR
DEV5_ERROR
DEV4_ERROR
DEV3_ERROR
DEV2_ERROR
DEV1_ERROR
DEV0_ERROR
FIFO_EMPTY
FIFO_FULL
PRESENT
ATA_IRQ
R RSVD1
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
Bit 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BUSY
R UDMA_STATE PIN_STATE MAIN_STATE
RSVD1
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPMI2SYND_READY
SYND2GPMI_READY
GPMI2SYND_VALID
SYND2GPMI_VALID
UPDATE_WINDOW
R SYND2GPMI_BE RDN_TAP
VIEW_DELAYED_RDN
Reset 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0
Bit 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
R APB_WORD_CNTR DEV_WORD_CNTR
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R RSVD1
SLV_
REF_UPDATE_INT SLV_UPDATE_INT OVERRIDE_
VAL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
SLV_FORCE_UPD
SLV_OVERRIDE
GATE_UPDATE
REFCLK_ON
ENABLE
RESET
SLV_OVERRIDE_VAL SLV_DLY_TARGET
Reset 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R RSVD1
SLV_
REF_UPDATE_INT SLV_UPDATE_INT OVERRIDE_
VAL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SLV_FORCE_UPD
SLV_OVERRIDE
GATE_UPDATE
REFCLK_ON
ENABLE
RESET
SLV_OVERRIDE_VAL SLV_DLY_TARGET
Reset 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
REF_LOCK
R RSVD1 REF_SEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SLV_LOCK
R RSVD0 SLV_SEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
REF_LOCK
R RSVD1 REF_SEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SLV_LOCK
R RSVD0 SLV_SEL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30.1 Overview
This chapter describes the General Purpose Timer (GPT) module interface. It is also a
reference for software driver programming. The GPT has a 32-bit up-counter. The timer
counter value can be captured in a register using an event on an external pin. The capture
trigger can be programmed to be a rising or/and falling edge. The GPT can also generate
an event on the output compare pins and an interrupt when the timer reaches a
programmed value. The GPT has a 12-bit prescaler, which provides a programmable
clock frequency derived from multiple clock sources.
Prescaler FRR
output ROVIE
Clock input from Prescaler
clock selection 12-bit
block 1... 4096 Timer
Counter ROV
GPT interrupts
Timer
Input Reg 2
IF2IE 32-bit
OF1IE
IF2
sync IM2
GPT_CAPTURE2 Timer
Output Reg1 cmp OF1 OM1
32-bit GPT_COMPARE1
OF2IE
Processor Data Bus
Timer
Output Reg2
32-bit cmp OF2 OM2
OF3IE GPT_COMPARE2
Timer
Output Reg3
32-bit cmp OF3 OM3
GPT_COMPARE3
Clock off
Crystal Oscillator
(ipg_clk_24M) Prescaler 24M
Sync
External Clock
(GPT_CLK)
To Prescaler
Peripheral Clock
(ipg_clk)
Low Frequency Reference Clock
(ipg_clk_32k)
High Frequency Reference Clock
(ipg_clk_highfreq)
30.1.1 Features
• One 32-bit up-counter with clock source selection, including external clock.
• Two input capture channels with a programmable trigger edge.
• Three output compare channels with a programmable output mode. A "forced
compare" feature is also available.
• Can be programmed to be active in low power and debug modes.
• Interrupt generation at capture, compare, and rollover events.
• Restart or free-run modes for counter operations.
There are six signals (three input, three output) in the GPT module that can be connected
to the chip pads.
30.3 Clocks
The clock that is input to the prescaler can be selected from 4 clock sources. The
following table describes the clock sources for GPT. Please see Clock Controller Module
(CCM) for clock setting, configuration and gating information.
Table 30-2. GPT Clocks
Clock name Clock Root Description
ipg_clk ipg_clk_root Peripheral clock
ipg_clk_32k ckil_sync_clk_root Low-frequency reference clock (32 kHz)
ipg_clk_highfreq perclk_clk_root High-frequency reference clock
ipg_clk_s ipg_clk_root Peripheral access clock
The clock input source is configured using the clock source field (CLKSRC, in the
GPT_CR control register). The clock input to the prescaler can be disabled by
programming the CLKSRC bits (of the GPT_CR control register) to 000. The CLKSRC
field value should be changed only after disabling the GPT (by setting the EN bit in the
GPT_CR to 0).
The PRESCALER field selects the divide ratio of the input clock that drives the main
counter. The prescaler can divide the input clock by a value (from 1 to 4096) and can be
changed at any time. A change in the value of the PRESCALER field immediately affects
the output clock frequency.
Clk
Prescaled Clk
30.4.2 Operation
The General Purpose Timer (GPT) has a single counter (GPT_CNT) that is a 32-bit free-
running up-counter, which starts counting after it is enabled by software (EN=1). The
counter's clock source is the output of the prescaler labelled "Prescaler output" in Figure
30-1.
• If the GPT timer is disabled (EN=0), then the Main Counter and Prescaler Counter
freeze their current count values. The ENMOD bit determines the value of the GPT
counter when the EN bit is set and the Counter is enabled again.
• If the ENMOD bit is set (=1), then the Main Counter and Prescaler Counter
values are reset to 0, when GPT is enabled (EN=1).
• If ENMOD bit is programmed to 0, then the Main Counter and Prescaler Counter
restart counting from their frozen values, when GPT is enabled again (EN=1).
• If GPT is programmed to be disabled in a low power mode (STOP/WAIT), then the
Main Counter and Prescaler Counter freeze at their current count values when GPT
enters low power mode. When GPT exits a low power mode, the Main Counter and
Prescaler Counter start counting from their frozen values regardless of the ENMOD
bit value. Note that the GPT_CNT can be read at any time by the processor, and that
both Input Capture Channels use the same counter (GPT_CNT).
• A hardware reset resets all the GPT registers to their respective reset values. All
registers except the Output Compare Registers (OCR1, OCR2, OCR3) obtain a value
of 0x0. The Compare registers are reset to 0xFFFF_FFFF.
• The software reset (SWR bit in the GPT_CR control register) resets all of the register
bits except the EN, ENMOD, STOPEN, WAITEN, and DBGEN bits. The state of
these bits is not affected by a software reset. Note that a software reset can be given
while the GPT is disabled.
When a selected edge transition occurs on an Input Capture pin, the contents of the
GPT_CNT is captured on the corresponding capture register and the appropriate interrupt
status flag is set. An interrupt request can be generated when the transition is detected if
its corresponding enable bit is set (in the Interrupt Register). The capture can be
programmed to occur on the input pin's rising edge, falling edge, on both rising and
falling edges, or the capture can be disabled. The events are synchronized with the clock
that was selected to run the counter. Only those transitions that occur at least one clock
cycle (clock selected to run the counter) after the previous recorded transition will be
guaranteed to trigger a capture event. There can be up to one clock cycle of uncertainty in
the latching of the input transition. The Input Capture registers can be read at any time
without affecting their values.
Clk
ipp_ind_capin1
Sig
Clk
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0
Counter
Compare Value 4
Interrupt
30.4.2.3 Interrupts
There are 6 different interrupts that are generated by the GPT. If the selected clock for
running the counter is available, then all interrupts can be generated in Low Power and
Debug modes.
• Rollover Interrupt
The Rollover Interrupt is generated when the GPT counter reaches 0xffffffff, then
resets to 0x00000000 and continues counting. The Rollover Interrupt is enabled by
the ROVIE bit in the GPT_IR register; the associated status bit is the ROV bit in the
GPT_SR register.
• Input Capture Interrupt 1, 2
After a capture event occurs, the associated Input Capture Channel generates an
interrupt. The "capture event" interrupts are enabled by the IF2IE and IF1IE bits (in
the GPT_IR register); the associated status bits are IF2 and IF1 (in the GPT_SR
register). The capture of the counter value because of a capture event is not affected
by a pending capture interrupt. The Capture register is updated with a new counter
value when a capture event occurs, regardless of whether that Capture Channels'
interrupt has been serviced or not.
• Output Compare Interrupt 1, 2, 3
After a compare event occurs, the associated Output Compare Channel generates an
interrupt. The "compare event" interrupts are enabled by the OF3IE, OF2IE, and
OF1IE bits (in the GPT_IR register); the associated status bits are OF3, OF2, and
OF1 (in the GPT_SR register). A "forced compare" does not generate an interrupt.
A cumulative interrupt line is also present, which is asserted whenever any of the above
interrupts are posted. The cumulative interrupt line has no associated enables or status
bits.
The GPT has 10 user-accessible 32-bit registers, which are used to configure, operate,
and monitor the state of the GPT.
An IP bus write access to the GPT Control Register (GPT_CR) and the GPT Output
Compare Register1 (GPT_OCR1) results in one cycle of wait state, while other valid IP
bus accesses incur 0 wait states.
Irrespective of the Response Select signal value, a Write access to the GPT Status
Registers (Read-only registers GPT_ICR1, GPT_ICR2, GPT_CNT) will generate a bus
exception.
• If the Response Select signal is driven Low, then the Read/Write access to the
unimplemented address space of GPT (ips_addr is greater than or equal to $BASE +
$028) will generate a bus exception.
• If the Response Select is driven High, then the Read/Write access to the
unimplemented address space of GPT will not generate any error response (like a bus
exception).
GPT memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
209_8000 GPT Control Register (GPT_CR) 32 R/W 0000_0000h 30.6.1/1313
209_8004 GPT Prescaler Register (GPT_PR) 32 R/W 0000_0000h 30.6.2/1317
209_8008 GPT Status Register (GPT_SR) 32 R/W 0000_0000h 30.6.3/1318
209_800C GPT Interrupt Register (GPT_IR) 32 R/W 0000_0000h 30.6.4/1319
209_8010 GPT Output Compare Register 1 (GPT_OCR1) 32 R/W FFFF_FFFFh 30.6.5/1320
209_8014 GPT Output Compare Register 2 (GPT_OCR2) 32 R/W FFFF_FFFFh 30.6.6/1321
Table continues on the next page...
The GPT Control Register (GPT_CR) is used to program and configure GPT operations.
An IP Bus Write to the GPT Control Register occurs after one cycle of wait state, while
an IP Bus Read occurs after 0 wait states.
Address: 209_8000h base + 0h offset = 209_8000h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0 0 0
FO2
FO1
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
DOZEEN
STOPEN
WAITEN
ENMOD
DBGEN
EN_
SWR FRR CLKSRC EN
24M
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00 capture disabled
01 capture on rising edge only
10 capture on falling edge only
11 capture on both edges
17–16 See IM2
IM1
15 Software reset.
SWR
This is the software reset of the GPT module. It is a self-clearing bit.
• The SWR bit is set when the module is in reset state.
Table continues on the next page...
0 Restart mode
1 Free-Run mode
8–6 Clock Source select.
CLKSRC
The CLKSRC bits select which clock will go to the prescaler (and subsequently be used to run the GPT
counter).
• The CLKSRC bit field value should only be changed after disabling the GPT by clearing the EN bit in
this register (GPT_CR).
• A software reset does not affect the CLKSRC bit.
000 No clock
001 Peripheral Clock (ipg_clk)
010 High Frequency Reference Clock (ipg_clk_highfreq)
011 External Clock
100 Low Frequency Reference Clock (ipg_clk_32k)
101 Crystal oscillator divided by 8 as Reference Clock (ipg_clk_24M)
111 Crystal oscillator as Reference Clock (ipg_clk_24M)
others Reserved
5 GPT Stop Mode enable.
STOPEN
The STOPEN read/write control bit enables GPT operation during Stop mode.
• A hardware reset resets the STOPEN bit.
• A software reset does not affect the STOPEN bit.
• If GPT is programmed to be disabled in a low power mode (STOP/WAIT), then the Main Counter
and Prescaler Counter freeze at their current count values when the GPT enters low power mode.
• When GPT exits low power mode, the Main Counter and Prescaler Counter start counting from their
frozen values, regardless of the ENMOD bit value.
• Setting the SWR bit will clear the Main Counter and Prescaler Counter values, regardless of the
value of EN or ENMOD bits.
0 GPT is disabled.
1 GPT is enabled.
The GPT Prescaler Register (GPT_PR) contains bits that determine the divide value of
the clock that runs the counter.
Address: 209_8000h base + 4h offset = 209_8004h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
W
PRESCALER24M PRESCALER
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x0 Divide by 1
0x1 Divide by 2
... ...
0xF Divide by 16
PRESCALER Prescaler bits.
The clock selected by the CLKSRC field is divided by [PRESCALER + 1], and then used to run the
counter.
• A change in the value of the PRESCALER bits cause the Prescaler counter to reset and a new
count period to start immediately.
• See Figure 30-3 for the timing diagram.
0x000 Divide by 1
0x001 Divide by 2
... ...
0xFFF Divide by 4096
The GPT Status Register (GPT_SR) contains bits that indicate that a counter has rolled
over, and if any event has occurred on the Input Capture and Output Compare channels.
The bits are cleared by writing a 1 to them.
Address: 209_8000h base + 8h offset = 209_8008h
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The GPT Interrupt Register (GPT_IR) contains bits that control whether interrupts are
generated after rollover, input capture and output compare events.
Address: 209_8000h base + Ch offset = 209_800Ch
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0
ROVIE
OF3IE
OF2IE
OF1IE
IF2IE IF1IE
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 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
R
W
COMP
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The GPT Compare Register 2 (GPT_OCR2) holds the value that determines when a
compare event will be generated on Output Compare Channel 2.
Address: 209_8000h base + 14h offset = 209_8014h
Bit 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
R
W
COMP
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The GPT Compare Register 3 (GPT_OCR3) holds the value that determines when a
compare event will be generated on Output Compare Channel 3.
Address: 209_8000h base + 18h offset = 209_8018h
Bit 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
R
W
COMP
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The GPT Input Capture Register 1 (GPT_ICR1) is a read-only register that holds the
value that was in the counter during the last capture event on Input Capture Channel 1.
Address: 209_8000h base + 1Ch offset = 209_801Ch
Bit 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
R CAPT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The GPT Input capture Register 2 (GPT_ICR2) is a read-only register which holds the
value that was in the counter during the last capture event on input capture channel 2.
Address: 209_8000h base + 20h offset = 209_8020h
Bit 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
R CAPT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The GPT Counter Register (GPT_CNT) is the main counter's register. GPT_CNT is a
read-only register and can be read without affecting the counting process of the GPT.
Address: 209_8000h base + 24h offset = 209_8024h
Bit 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
R COUNT
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
31.1 Overview
The 2D Graphics Processing Unit (GPU2D) is a high-performance multi-pipe 2D
graphics core that accelerates the 2D graphics display on a variety of devices. The
GPU2D supports a wide-range of addressable screen sizes and resolutions.
The R2D GPU Hardware acceleration is brought to numerous 2D applications including
graphical user interfaces (GUI), menu displays, flash animation, and gaming.
GPU Core
AHB AXI
Host Interface
Memory Controller
2-D Pipeline
PE Pipe0
PE Pipe1
Pixel Pixel
Graphics Draw Engine Engine
Pipeline Engine Distribute PE Pipe2 Cache
G
Front Fnd P
PE Pipe 3 Fr
OPF
31.4.1.1 Line
The LINE operation draws a line. Coordinates for two points are given: start point and
end point. The end point is not drawn. Lines are rendered using the Bresenham algorithm.
The Bresenham algorithm has the advantage of using integer arithmetic and has no
accumulation of rounding errors.
In the case of line, only ROP2 and ROP4 are supported. It operates on pattern and
destination. The pattern should have a transparency mask in order to use ROP4.
Clipping is supported for lines on a per pixel basis.
P0(X0,Y0)
P1(X1,Y1)
Figure 31-2. Line
Clear is similar to Rectangle Fill except that it does not use a pattern. A 32-bit clear value
with 4-bit byte mask is used to fill the entire rectangle area.
Both Rectangle Fill and Clear support clipping, which is performed on a per primitive
basis.
31.4.1.3 BitBLT
Bit blit (BitBLT) transfers data from one area of a memory (source) to another area of the
memory (destination).
The source and destination can be from the same or different memory locations. Both
source and destination must be described by a rectangular area. The source and
destination rectangles can be of the same size (most bit blits are of this nature) or of
different sizes, in which case, the operation becomes a stretch or shrink blit.
BitBLT supports ROP2, ROP3, and ROP4 which includes source, destination and
pattern, and an optional transparency color. Clipping can be performed on a primitive
basis.
Destination
p0 (left, top)
The graphics engine supports the following source and destination formats for data bit
blits and filter blits. In addition to these source and destination RGB formats, their
swizzle formats (ARGB, RGBA, ABGR, BGRA) are also supported.
Table 31-1. BitBLT Formats
Formats Source Image Destination Image
A1R5G5B5 Yes Yes
A4R4G4B4 Yes Yes
X1R5G5B5 Yes Yes
The stretch blit (Stretch BLT) primitive performs a bit blt operation with stretch or
shrink. The modified Bresenham algorithm is used to generate corresponding coordinates
for fast stretching. The stretch factor is specified in a 15.0 fixed-point format. Stretch blit
is not allowed to overlap, therefore no part of source and destination can share any piece
of memory. Non-stretch blits can overlap. For stretch blit, clipping is performed on a per
pixel basis.
NOTE
The performance decreases for filter blit operations which
require two passes.
31.4.1.8 Rotation
• 90° / 180° / 270° / X-Flip / Y-Flip/ Mirror rotation is supported for all primitives.
31.4.1.10 Clipping
One clipping rectangle is supported for all bit blit primitives.
Clear 0 0
SRC 1 0
DST 0 1
SRC_OVER 1 1 - As''
DST_OVER 1 - Ad'' 1
SRC_IN Ad'' 0
DST_IN 0 As''
SRC_OUT 1 - Ad'' 0
DST_OUT 0 1 - As''
To control the blending modes, the following register fields are used:
• 1 bit for transparent/opaque conversion for source alpha
32.1 Overview
The GPU3D is a high-performance core that delivers hardware acceleration for 3D
graphics display.
Addressable screen sizes range from the smallest cell phones to HD 1080p displays. It
provides high performance, high quality graphics, low power consumption, and the
smallest silicon footprint.
GPU3D accelerates numerous 3D graphics applications, including graphical user
interfaces (GUI), menu displays, flash animation, and gaming. This module supports the
following graphics APIs:
• OpenGL ES 2.0
• OpenGL ES 1.1
• OpenVG 1.1
• DirectX 11 (9_3)
• OpenGL 2.1 and 3.0
• OpenCL 1.1 E
• EGL 1.4
• Graphic Pipeline Front End: Inserts high level primitives and commands into the
graphics pipeline.
• Ultra-threaded Unified Shader: SIMD processor that performs as both vertex shader
and fragment shader. When used as a vertex shader it performs geometry
transformations and lighting computations. When used as a fragment shader, it
applies texture data and computes color values for each pixel. GPU3D has four such
shaders.
• 3D Rendering Engine: Converts triangles and lines into pixels. Computes slopes of
color attributes and texture coordinates. Performs clipping.
• Texture Engine: Retrieves texture information from memory upon request by the
fragment shader. Performs interpolation and filtering, and transfers the computed
value to the fragment shader or the vertex shader. The texture unit can process 2
pixels or 2 vertices/cycle.
• Pixel Engine/Resolve: Pixel engine does alpha blending and visible surface
determination. Resolve does tiling and de-tiling as well as FSAA filtering. The pixel
engine can process 2 pixels/cycle.
GC GPU CORE
Host Interface
Memory Controller
3-D Pipeline
Texture
3D Rendering
Engine
Engine
Graphics Pixel
Pipeline Engine
Front Fnd Ultra-threaded Unifed Shader
up to 256 threads per shader
There are two main clocks for the processing control: shader clk for the shader part, and
core clk for the remaining part. The core clk and shader clk frequency are programmable
in CCM module (as the clk frequency for GPU3D_CORE_CLK_ROOT,
GPU3D_SHADER_CLK_ROOT).
The GPU3D provides architectural support for the following features:
Table 32-1. GPU3D Architectural Support
Feature GPU Support
Primary API OpenGL ES1.1, 2.0, and 3.0 OpenCL1.1
Additional API's OpenVG1.1
OpenGL
OpenCL
Other Graphics Support EGL1.4
Drivers OpenGLES1.1 and Halti
OpenVG1.1
EGL1.4
OpenGL2.1 and 3.0
OpenCL1.1 EP
Operating Systems Windows CE
Linux Embedded
32.3.1 Rasterization
Table 32-6. Rasterization features
Feature GPU Support
16 ARGB4444 4 4 4 4
4
16 XRGB4444 4 4 4
don't care
16 ARGB1555 1 5 5 5
16 XRGB1555 1 5 5 5
don't care
16 RGB565 0 5 6 5
32 ARGB8888 8 8 8 8
32 XRGB8888 8 8 8 8
don't care
32 ABGR8888 8 8 8 8
8
32 XBGR8888 don't care 8 8 8
32 RGB10_a2ui 2 10 10 10
16 D16 16 0
32 D2488 24 8
Fragment storage 16-bit color and z, 32-bit color and z for each fragment. Lossless compression,
no storage reduction.
Individual fragment alpha masking Yes
Two sided stencil support Yes
Fragment cache 32 cache lines for color 32 cache lines for Z 64 bytes per cache line
32 cache lines for Z
Multiple render target Yes
16 ARGB4444 4 4 4 4
16 ARGB1555 1 5 5 5
16 RGB565 0 5 6 5
32 ARGB8888 8 8 8
32 ABGR8888 8 8 8
32 RGB10_a2ui 10 10 10
33.1 Overview
EDID
Display Data Channel (DDC) ROM
CEC CEC
CEC Line
detect
HPD Line
High/Low
Audio, video, and auxiliary data is transmitted across the three TMDS data channels. A
TMDS clock running at 1x (24-bit true color mode), the video pixel rate is transmitted on
the TMDS clock channel and used by the receiver as a frequency reference for data
recovery on the three TMDS data channels. Video data can have a pixel size of 24bits .
Video at the default 24-bit color depth is carried at a TMDS clock rate equal to the pixel
clock rate. Higher color depths are carried using a correspondingly higher TMDS clock
rate. Video formats with TMDS rates below 25MHz (such as, 13.5MHz for 480i/NTSC)
can be transmitted using a pixel-repetition scheme. The video pixels can be encoded in
either RGB, YCBCR 4:4:4, or YCBCR 4:2:2 formats.
HDMI uses a packet structure to transmit audio and auxiliary data across the TMDS
channels. To attain the highest reliability required of audio and control data, this data is
protected with a BCH error correction code and is encoded using a special error reduction
code to produce the transmitted 10-bit word.
Basic audio functionality consists of a single IEC 60958 L-PCM audio stream (two audio
channels) at sample rates of 32 KHz, 44.1 KHz, or 48 KHz, which can accommodate any
normal stereo stream. Optionally, HDMI can carry audio at sample rates up to 192KHz
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 6, 05/2020
1348 NXP Semiconductors
Chapter 33 HDMI Transmitter (HDMI)
and with three to eight audio channels. HDMI can also carry an IEC 61937 compressed
(such as, surround sound) audio stream at bit rates up to 24.576 Mbps. For bit rates above
6.144 Mbps, compressed audio streams conforming to IEC 61937 are carried using HBR
Audio Stream Packets. Each packet carries four IEC 60958 frames, which corresponds to
(4x2x16 =) 128 contiguous bits of an IEC 61937 stream.
The source uses the DDC to read the sink's Enhanced Extended Display Identification
Data (E-EDID) to obtain the sink's configuration and/or capabilities.
The HDMI TX Controller schedules the three periods: Video Data Period, Data Island
period, and Control period. During the Video Data Period, the active pixels of an active
video line are transmitted. During the Data Island period, audio and auxiliary data are
transmitted using a series of packets. The Control period is used when no video, audio, or
auxiliary data needs to be transmitted. A Control Period is required between any two
periods that are not Control Periods.
An example of each period placement is shown in the figure below.
TMDS Periods in 720x480 Video Frame
Control Period
Control Period
Total Lines
Active Lines
525
Horizontal
Horizontal Blanking
Blanking 720 Active Pixels
858 Total Pixels
33.1.1.1 Interfaces
HDMI TX has the following interfaces:
• HDCP interface
• External ROM interface for key storage
• External RAM interface for revocation
• Random number generator interface
• Video input interface
• RGB 4:4:4
• YCbCr4:2:2
• YCbCr4:4:4
• Digital audio input interface
• AHB audio DMA
• System interface
• AMBA AHB
• Scan test interface
• HDMI TX PHY interface
• CEC interface
33.1.1.2 Features
HDMI TX includes the following features:
• Supported video formats:
• All CEA-861-E video formats up to 1080p at 60Hz and 720p/1080i at 120Hz
• Supported colorimetry:
• 24bit RGB 4:4:4
• 24bit YCbCr 4:4:4
• 16bit YCbCr 4:2:2
• xvYCC601
• xvYCC709
• Integrated color space converter:
• RGB(4:4:4) to/from YCbCr(4:4:4 or 4:2:2)
• Optional HDMI 1.4a supported video formats:
• HDMI 1.4a 3D video modes with up to 266MHz (TMDS clock)
• Optional HDMI 1.4a supported colorimetry:
• sYCC601
• Adobe RGB
• Adobe YCC601
• Optional HDMI 1.4a supported Infoframes:
• Audio InfoFrame packet extension to support LFE playback level information
• AVI infoFrame packet extension to support YCC Quantization range (Limited
Range, Full
• Range)
• AVI infoFrame packet extension to support Content type (Graphics, Photo, Cinema,
Game)
• Supported Audio formats:
• Up to four I2S interface for eight-channel Linear-PCM audio
• S/PDIF interface for linear and non-linear PCM formats:
• AC-3
• MPEG-1/-2 Audio
• DTS
• MPEG- 2/-4 AAC
• ATRAC
• WMA
• MAT
• Parallel audio interface for High-Bit Rate (HBR) Audio:
• Dolby® True-HD
• DTS®-HD Master Audio
• Generic Parallel Audio interface
• AHB DMA Audio interface
• Up to 192 KHz IEC60958 audio sampling rate
• Pixel clock from 13.5MHz up to 266 MHz
• Option to remove pixel repetition clock (prepclk) from HDMI TX interface for an
easy integration with third-party HDMI TX PHYs
• Flexible synchronous enable per clock domain to set functional power down modes
• Register access:
• AMBA AHB
• I2C DDC, EDID block read mode
• Advanced PHY testability
• Integrated CEC hardware engine
33.3 Clocks
The table found here describes the clock sources for HDMI.
Please see Clock Controller Module (CCM) for clock setting, configuration and gating
information.
Table 33-1. HDMI Clocks
Clock name Clock Root Description
iahbclk ahb_clk_root Bus clock
icecclk ckil_sync_clk_root CEC low-frequency clock (32kHZ)
ihclk ahb_clk_root Module clock
isfrclk video_27m_clk_root Internal SFR clock (video clock 27MHz)
HDMI TX controller
References
Optionally, for YCbCr 4:2:2 format, data mapping can be performed to conform to ITU.
601 and ITU.656 standards but without the support of embedded synchronizers.
The video pixel sampler registers base address is 0x0200.
For each video timing format, there is a specific timing parameters defined in the
CEA-861-E specification.
The following timing diagram is an example for the video mode format 1 (640x480p @
59.94/60 Hz): Data Enable = idataen, HSYNC = ihsync, VSYNC = ivsync.
Data
Enable
16 48 clocks
HSYNC
Data
Enable
HSYNC
VSYNC
For a complete list of timing parameters and diagrams, refer to the CEA-861-E
specification. The SDR video sample input format is illustrated in the figure below.
idataen
ipclk
Figure 33-5. Video Sample Timing Interface for RGB and YCbCr SDR Format
default_phase
fix_pp_to_last
cx_goto_p0
pp_en
bypass_selector pp_stuffing
output_selector
Input_data
Pixel
Packing
output_data
Pixel
Repeater 10, 12, 16
Packing Phase
FSM
16, 20, 24
YCC 422
remap
ycc422_size
ycc422_en
8-bit bypass
bypass en
g_y_data[15:0] g_y_data_csc[15:0]
r_cr_data[15:0] r_cr_data_csc[15:0]
b_cb_data[15:0] YCbCr YCbCr YCbCr YCbCr YCbCr YCbCr b_cb_data_csc[15:0]
de 4:2:2 4:4:4 4:4:4 4:4:4 4:4:4 4:2:2 de_csc
hsync Chroma Color Chroma
hsync_csc
Interpolation Space Decimation
vsync vsync_csc
pixelclk pixelclk_csc
The Color Space Converter (CSC) supports all the timings reported in the CEA-861-D
specification and the following pixel modes:
• RGB444 and YCbCr444: 24, 30, 36, and 48 bits
• YCbCr422: 16, 20, and 24 bits
The color space conversion matrix is ruled by the following equations listed below. The
color space conversion registers base address is 0x4100.
out1 = (X1 x in1 /4096 + X2 x in2 /4096 + X3 x in3 /4096 + X4) x 2scale
out2 = (Y1 x in1 /4096 + Y2 x in2 /4096 + Y3 x in3 /4096 + Y4) x 2scale
out3 = (Z1 x in1 /4096 + Z2 x in2 /4096 + Z3 x in3 /4096 + Z4) x 2scale
No lipsync support is available inside the HDMI TX. If necessary, this feature can be
performed at the system audio processor side. From the HDMI TX, no audio/video delay
or skew is added.
The audio sampler registers base address is 0x3100.
To support the deep color mode and/or 3D video modes, the TMDS clock is multiplied
by 4, 2, 1.5, or 1.25, depending on the mode. In this case, the CTS value must also follow
the same ratio.
This module provides a direct audio DMA interface, which is useful in systems where a
DSP handles audio processing. In these systems, sending the incoming audio samples
directly to the memory provides a cleaner architecture to the SoC, without the overhead
of converting several audio standards.
8
AHB Master
DMA
Engine
hclk tmdsclk
The audio DMA block combines an AHB master interface with a FIFO to perform direct
memory access to audio samples stored in a system memory.
The DMA engine is configurable through programmable software registers to perform
autonomous burst reading on a configured memory range.
Table 33-6. Data Arrangement in System Memory for L-PCM (24 bits)
Bit Description
28 B - IEC B bit
27 P - Parity bit
26 C - Channel Status bit
25 U - User Data bit
24 V - Validity Bit
[23:0] Audio Sample Data
Table 33-7. Data Arrangement in System Memory for L-PCM (16 bits) and NL-PCM (16 bits)
Bit Description
28 B - IEC B bit
27 P - Parity bit
26 C - Channel Status bit
Table 33-7. Data Arrangement in System Memory for L-PCM (16 bits) and NL-PCM (16 bits)
(continued)
25 U - User Data bit
24 V - Validity Bit
[23:8] Audio Sample Data
[7:0] 0x00
• A maximum theoretical length of a burst is 1024. The burst size must be declared on
the mburstlength_addr[10:0].
• Has INCR with an unspecified burst as the default operation burst mode
ohaddr[31:0] = initial_addr[31:0];
ohburst[2:0] = INCR;
mburstlength[10:0] = ((initial_addr[31:0] + AUDIO_FIFO_DEPTH) <=
final_addr[31:0]) ?
((AUDIO_FIFO_DEPTH < 1024) ? AUDIO_FIFO_DEPTH : 1024) : (final_addr[31:0] -
initial_addr[31:0]);
4. While DMA is reading samples from the AHB master and writing samples to the
Audio FIFO, a datafetch request from the internal frame composer block might
happen at the Audio FIFO interface, diminishing the number of samples in the FIFO.
5. When the number of samples in the Audio FIFO is lower than the configured
fifo_threshold[7:0], the DMA engine requests a new burst request to the AHB master
interface with:
ohburst[2:0] = INCR;
NOTE
In the last burst request, the DMA engine calculates the
mburstlength[10:0] such that the last requested read
position is the final_addr[31:0].
7. After completion of the DMA operation, the DMA engine issues the ointdone
interrupt signaling end of operation.
Variations of the DMA engine's behavior occur when fixed-beat, incremental bursts are
used by INCR4/INCR8/INCR16 burst selects. When this forcing mode is used, you must
correctly configure the FIFO's threshold such that the last of the consecutive INCRx
(with x = 4, 8, or 16) bursts correctly fill the FIFO at last burst received. Note there is a
re-alignment at the 1k boundary.
The following are exceptions to the described DMA behavior:
1. When a user requests end stop_dma_transaction, the DMA engine stops at the end of
the current burst operation and signals its completion with an ointdone interrupt.
2. When the AHB slave sends an error response, the DMA engine stops the current
operation and signals ointerror interrupt.
Rules for Configuration of Address Registers:
1. Configure the last 2 bits of initial_addr with 0.
For example
32’hxxx_xxx3 or
32’hxxx_xxx7 or
32’hxxx_xxxB or
32’hxxx_xxxF
the burst is not aligned, DMA uses AHB INCR transfers when required.
Due to the limit of audio DMA design, some registers configuration are updated by
SDMA (Smart Direct Memory Access). SDMA need to do these items below:
1. clear the audio DMA done request(actually it’s an interrupt); set offset 0x00120109
-- bit2.
2. configure next audio DMA start address(offset 0x00123604~0x00123607) and next
stop address(offset 0x00123608~0x0012360b); Start address and stop address are
provided by S/W and it’s variable.
3. Set offset 0x00123601 – bit0 “1” to start DMA;
Package 1 Package M
. . . . . . burst2 . . .
burst1 burst2 burstN burst1 burstN
The figure below depicts the transfer data structure for an unspecified burst length.
Package 1 Package M
burst1 . . . burst1
dy
rea DMA IDLE
er_
uff
ta_b
da Next Cycle
Next Cycle
1. When the operation request is written into the data_buffer_ready, the state switches
from IDLE to DMAREQ.
2. When enough transfer information is ready, the state changes to DMAXFER.
N FIFO_RP
FIFO_RP
FIFO_RP
FIFO_WP
FIFO_WP FIFO_WP
FIFO_WP
FIFO_WP
0
FIFO_RP FIFO_RP
Normal IF Write IF Read IF Read will Occupancy
condition Will FULL Will EMPTY threshold Below
EMPTY threshold
Have No data
data inside
inside
The HDMI 1.3a standard precisely describes the packet insertion timing and distribution
that must be followed to correctly compose an HDMI TMDS (transition minimized
differential signaling) stream. In this context, there are data island packets that-when
available (ready for insertion in output stream)-have higher priority over others. Two
packet descriptor queues are responsible for prioritizing packet insertion.
The higher priority packets are described in Table below. These packets are inserted in
the output stream as soon as data to compose them is available (see the HDMI 1.3a
standard).
Table 33-9. High Priority Data Island Packets
Packet Description
Audio Clock Regeneration (ACR) Indicates to sink device the N/CTS values that should be used in the ACR process
Audio Sample (AUDS) Transports L-PCM and IEC 61937 compressed audio
General Control (GCP) Indicates Color Depth, Pixel Packing phase, and AV mute information to sink device
The packets described in tables below can be considered as low priority packets-even
though they have precise timing insertion-because their insertion timing is large (for
example, one per frame or one per two frames without specific location for some of the
packet types and on user request transmit for others).
Table 33-10. Low Priority Data Island Packets
Packet Description
Audio Content Protection (ACP) Used to convey content-related information about the active audio stream
transmitted
Audio InfoFrame (AUDI) Indicates characteristics of the active audio stream by using IEC 60958 channel
status bits, IEC 61937 burst info, and/or stream data (if present).
Null (NULL) Ignored by sink devices.
International Standard Recording Code See HDMI 1.3a section 5.3.8.
(ISRC1/ISRC2)
Vendor Specific (VSD) InfoFrame According to CEA-861-E standard.
AVI infoFrame (AVI) Video information from source to sink.
Source Data Product Descriptor (SPD) Name and product type of the source device. MPEG (MPEG) Source InfoFrame
infoFrame packets (optional, implementation discouraged by CEA-861-E Section 6.7).
Describes several aspects of the compressed video stream that were used to
produce the uncompressed video.
The Frame Composer distributes and assembles the data island packets according to the
module register bank configuration. The block allows extended control periods to appear
with a certain programmed spacing. The Frame Composer uses two packet buffers that
allow a packet to be composed while another is being sent to the output HDMI stream.
Packet requests are inserted into the packet queues by a data island flexible scheduler.
The HDMI 1.3a specification requires that packet distribution and insertion timing
correctly compose an output HDMI TMDS stream. In this context, there are data island
packets that are sent on data availability, while others are sent once per frame or once per
two frames. and finally others that are sent on user request. Classification of the packets
according to this insertion timing is described in the table below.
Table 33-11. Packet Classification
Packet Classification
Audio Clock Regeneration (ACR) Sent on data availability.
Audio Sample (AUDS) Sent on data availability (precede ACR if present).
Audio Content Protection (ACP) On user request or automatic insertion.
Audio InfoFrame (AUDI) Once per two frames.
Null (NULL) On user request or automatic insertion to fill Data Island period.
General Control (GCP) Once per frame.
International Standard Recording Code (ISRC1/ On user request.
ISRC2)
Vendor Specific (VSD) InfoFrame On user request or automatic insertion.
AVI infoFrame (AVI) Once per frame.
Source Data Product Descriptor (SPD) infoFrame On user request or automatic insertion.
The Data Island Scheduler (DIS) handles packet distribution in the Frame Composer. The
DIS is a round- robin (RDRB) state machine that is able to schedule packet insertion on
an input video frame or line basis. The DIS is fully configurable and can schedule any
packet type to be inserted at a given input video frame rate or input video line rate.
While determining packet distribution on an input video frame or line basis, the DIS
schedules the packets to be inserted in the output HDMI stream by inserting the packet
descriptor in the corresponding packet priority queue, according to packet priority
classification.
After the packet descriptor has been inserted in the packet priority queues, the Data
Island Packer (DIP) is responsible for assembling and sequencing the packets for output
HDMI stream insertion.
Dedicated ECC generators and checksum byte-wide sum hardware generate the BCH
ECC parity codes and infoFrames checksums for all the data islands packets.
The content of GCP, ISRC1/2, VSD, AVI, SPD, and MPEG packets are configured
through the registers bank starting at address 0x1000.
Legend:
It is an optional feature in the HDMI 1.3a Specification. It uses only one bidirectional
line for transmission and reception.
All transactions on the CEC line consist of an initiator and one or more followers. The
initiator is responsible for sending the message structure and the data. The follower is the
recipient of any data and is responsible for setting any acknowledgement bits.
ocecout
CEC
icecin
Engine
Configuration
Register
Bank
• Follower Mode
• In this mode, the CEC controller receives messages and feeds back the initiator with
appropriate signals. The CEC controller always works in the follower mode
whenever it is not transmitting any data.
For correct CEC controller interface operation, initial reset is required in order to set
internal registers to a known state. After this reset, the interface is in an IDLE state,
waiting for a read or write request coming from the register configuration.
A specific CEC API is provided that implements all necessary low-level register
configuration to send and receive CEC messages. For more information, see the CEC
API documentation.
The CEC engine registers base address is 0x7D00. For more information about these
registers, see HDMI Memory Map/Register Definition.
For more information about CEC, see Consumer Electronics Control (CEC) Application
Note.
All registers are addressable on 32-bit boundaries; each unused bit or address location is
reserved for future use and read back as 0.
.
HDMI memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
12_0000 Design Identification Register (HDMI_DESIGN_ID) 8 R 00h 33.5.1/1395
12_0001 Revision Identification Register (HDMI_REVISION_ID) 8 R 00h 33.5.2/1396
12_0002 Product Identification Register 0 (HDMI_PRODUCT_ID0) 8 R 00h 33.5.3/1396
12_0003 Product Identification Register 1 (HDMI_PRODUCT_ID1) 8 R 00h 33.5.4/1397
12_0004 Configuration Identification Register 0 (HDMI_CONFIG0_ID) 8 R 00h 33.5.5/1397
12_0005 Configuration Identification Register 1 (HDMI_CONFIG1_ID) 8 R 00h 33.5.6/1398
12_0006 Configuration Identification Register 2 (HDMI_CONFIG2_ID) 8 R 00h 33.5.7/1399
12_0007 Configuration Identification Register 3 (HDMI_CONFIG3_ID) 8 R 00h 33.5.8/1400
Frame Composer Interrupt Status Register 0
12_0100 8 w1c 00h 33.5.9/1400
(HDMI_IH_FC_STAT0)
Table continues on the next page...
Bit 7 6 5 4 3 2 1 0
Read DESIGN_ID
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read REVISION_ID
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read PRODUCT_ID0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read PRODUCT_ID1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Read phytype
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read confgpaud
Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
LowPriority_ HighPriority
Read
Reserved overflow _overflow
Write w1c w1c
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Aud_fifo_
Aud_fifo_ Aud_fifo_
Read underflow_
Reserved underflow overflow
thr
Write w1c w1c w1c
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Bit 3 2 1 0
Bit 7 6 5 4
Read
Reserved
Write
Reset 0 0 0 0
Bit 3 2 1 0
Bit 7 6 5 4 3 2 1 0
ERROR_ ERROR_
Read WAKEUP ARB_LOST NACK EOM DONE
Reserved FOLLOW INITIATOR
Write w1c w1c w1c w1c w1c w1c w1c
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Bit 3 2 1 0
Bit 7 6 5 4
Read
Reserved
Write
Reset 0 0 0 0
Bit 3 2 1 0
Bit 7 6 5 4
ahbdmaaud_
Read ahbdmaaud_interror
Reserved intlostownership
Write w1c w1c
Reset 0 0 0 0
Bit 3 2 1 0
ahbdmaaud_
Read ahbdmaaud_intretrysplit ahbdmaaud_intdone ahbdmaaud_intbufffull
intbuffempty
Write w1c w1c w1c w1c
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
AUDI ACP HBR DST OBA AUDS ACR NULL
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
GMD ISCR1 ISCR2 VSD SPD MPEG AVI GCP
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read LowPriority_ HighPriority
Reserved
Write overflow _overflow
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Aud_fifo_
Aud_fifo_ Aud_fifo_
Reserved underflow_
Write underflow overflow
thr
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read RX_ RX_ RX_ RX_ TX_PHY_
Reserved HDP
Write SENSE3 SENSE2 SENSE1 SENSE0 LOCK
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Read
Reserved
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read Reserved I2Cmasterdone I2CMASTER_ERROR
Write
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read ERROR_ ERROR_
Reserved WAKEUP ARB_LOST NACK EOM DONE
Write FOLLOW INITIATOR
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Read fifofullrepet fifoemptyrepet fifofullpp fifoemptypp
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read fifofullremap fifoemptyremap fifofullbyp fifoemptybyp
Write
Reset 0 0 0 0
Bit 7 6 5 4
Read Reserved
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read Reserved i2cmphydone i2cmphyerror
Write
Reset 0 0 0 0
Bit 7 6 5 4
Read ahbdmaaud_
Reserved ahbdmaaud_interror
Write intlostownership
Reset 0 0 0 0
Bit 3 2 1 0
Read ahbdmaaud_
Write ahbdmaaud_intretrysplit ahbdmaaud_intdone ahbdmaaud_intbufffull
intbuffempty
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read mute_
mute_all_
Reserved wakeup_
Write interrupt
interrupt
Reset 0 0 0 0 0 0 1 1
Bit 7 6 5 4 3 2 1 0
Read internal_de_
Reserved video_mapping
Write generator
Reset 0 0 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
Read BCBDATA_ RCRDATA_ GYDATA_
Reserved
Write STUFFING STUFFING STUFFING
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read gydata
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
gydata
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read rcrdata
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
rcrdata
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read bcbdata
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
bcbdata
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read packing_phase
Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read color_depth[3:0] desired_pr_factor[3:0]
Write
Reset 0 0 0 0 0 0 0 0
0000 24 bits per pixel video (8 bit per component). 8-bit packing mode.
0100 24 bits per pixel video (8 bit per component). 8-bit packing mode.
0101 30 bits per pixel video (10 bit per component). 10-bit packing mode.
0110 36 bits per pixel video (12 bit per component). 12-bit packing mode.
0111 48 bits per pixel video (16 bit per component). 16-bit packing mode.
desired_pr_ Desired pixel repetition factor configuration. The configured value sets H13T PHY PLL to multiply pixel
factor[3:0] clock by the factor in order to obtain the desired repetition clock. For the CEA modes some are already
defined with pixel repetition in the input video. So for CEA modes this shall be always 0. Shall only be
used if the user wants to do pixel repetition using H13TCTRL core.
other Reserved. Not used.
Bit 7 6 5 4
Read Reserved idefault_phase ifix_pp_to_last
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read icx_goto_p0_st ycc422_stuffing pp_stuffing pr_stuffing
Write
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved ycc422_size[1:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read BYPASS_
Reserved bypass_en pp_en pr_en ycc422_en output_selector[1:0]
Write SELECT
Reset 0 1 0 0 0 1 1 0
Bit 7 6 5 4
Write
Reset 0 0 0 0
Bit 3 2 1 0
Write
Reset 0 0 0 0
All this interrupts are forwarded to the Interrupt Handler sticky bit registers and after
ORed to a single main interrupt line to micro controller. Assertion of this interrupt
implies that data related with the corresponding packet has been sent through the HDMI
interface.
• Address Offset: 0x0806
• Size: 8 bits
• Value after Reset: 0x00
• Access: Read
Address: 12_0000h base + 806h offset = 12_0806h
Bit 7 6 5 4
Write
Reset 0 0 0 0
Bit 3 2 1 0
Write
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read VPMASK7 VPMASK6 VPMASK5 VPMASK4 VPMASK3 VPMASK2 VPMASK1 VPMASK0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read VPPOL7 VPPOL6 VPPOL5 VPPOL4 VPPOL3 VPPOL2 VPPOL1 VPPOL0
Write
Reset 1 1 1 1 1 1 1 1
Bit 7 6 5 4
Read Reserved vsync_in_polarity hsync_in_polarity de_in_polarity
Write
Reset 0 1 1 1
Bit 3 2 1 0
Read DVI_mode Reserved r_v_blank_in_osc in_I_P
Write
Reset 0 0 0 0
1 Active high
0 Input video mode:
in_I_P
1 Interlaced
0 Progressive
Bit 7 6 5 4 3 2 1 0
Read H_in_activ[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
Reserved H_in_activ[12:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read H_in_blank[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved H_in_blank[12:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
V_in_activ[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved V_in_activ[12:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read V_in_blank[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read H_in_delay[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved H_in_delay[12:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
H_in_width[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved H_in_width[9:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read V_in_delay[7..0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved V_in_width[5..0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read infreq[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read infreq[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved infreq[19:16]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
ctrlperiodduration
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read exctrlperiodduration
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
exctrlperiodspacing
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read ch0_preamble_filter
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
Reserved ch1_preamble_filter
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved ch2_preamble_filter
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved YQ1_YQ0_YCC CN1_CN0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read default_ clear_
Reserved set_avmute
Write phase avmute
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_
FC_
AVICONF0_ FC_AVICONF0_RGB_
Write AVICONF0_ ACTIVE_ FC_AVICONF0_SCAN FC_AVICONF0_BAR
YCC
MISC
FORMAT
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_AVICONF1_
FC_AVICONF0_COLOR FC_AVICONF1_ACTIVE_AR
Write PICTURE_AR
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_
AVICONF2_ FC_AVICONF2_EXT_COLOR - FC_AVICONF2_SCALE
Write
IT
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_AVIVID
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_AVISBB0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_AVISBB1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_AVIELB0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_AVIELB1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_AVISRB0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_AVISRB1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved CC[2:0] CT[3:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved SS[1:0] Reserved SF[2:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CA[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved LFEPBL[1:0] DM_INH LSV[3:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved VSDSIZE
Write
Reset 0 0 0 1 1 0 1 1
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
-
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read vendor_name
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read product_name
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read product_descriptor
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read aud_
aud_packet_sampfit[3:0] Reserved packet_
Write
layout
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read packet_sampprs[3:0]
Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved onhighattended[4:0]
Write
Reset 0 0 0 0 1 1 1 1
Bit 7 6 5 4 3 2 1 0
Read Reserved onlowattended[4:0]
Write
Reset 0 0 0 0 0 0 1 1
Bit 7 6 5 4 3 2 1 0
Read acptype[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Audio_contentpacket
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved isrc_status[2:0] isrc_valid isrc_cont
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read isrc1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read isrc2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved spd_auto vsd_auto iscr2_auto iscr1_auto acp_auto
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved AUTO_FRAME_INTERPOLATION
Write
Reset 0 0 0 0 0 0 0 0
• Size: 8 bits
• Value after Reset: 0x00
• Access: Read/Write
Address: 12_0000h base + 10B5h offset = 12_10B5h
Bit 7 6 5 4 3 2 1 0
Read AUTO_FRAME_PACKETS AUTO_LINE_SPACING
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
Reserved
Write null_tx spd_tx vsd_tx iscr2_tx isr1_tx acp_tx
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved avi_auto gcp_auto audi_auto acr_auto
Write
Reset 0 0 0 0 1 1 1 1
Bit 7 6 5 4 3 2 1 0
Read Reserved ACRframeinterpolation
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read ACRpacketsinframe ACRpacketlinespacing
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved AUDIframeinterpolation
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read AUDIpacketsinframe AUDIpacketlinespacing
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved GCPframeinterpolation
Write
Reset 0 0 0 0 0 0 0 0
• Size: 8 bits
• Value after Reset: 0x00
• Access: Read/Write
Address: 12_0000h base + 10BDh offset = 12_10BDh
Bit 7 6 5 4 3 2 1 0
Read GCPpacketsinframe GCPpacketlinespacing
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved AVIframeinterpolation
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read AVIpacketsinframe AVIpacketlinespacing
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Read AUDI ACP HBR Reserved AUDS ACR NULL
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read AUDI ACP HBR Reserved AUDS ACR NULL
Write
Reset 0 0 1 0 0 1 0 1
Bit 7 6 5 4 3 2 1 0
Read AUDI ACP HBR Reserved AUDS ACR NULL
Write
Reset 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
Read GMD ISCR1 ISCR2 VSD SPD Reserved AVI GCP
Write
Reset 0 0 0 0 0 0 0 0
All this interrupts are forwarded to the Interrupt Handler sticky bit registers and after
ORed to a single main interrupt line to micro controller. Assertion of this interrupt
implies that data related with the corresponding packet has been sent through the HDMI
interface.
• Address Offset: 0x10D5
• Size: 8 bits
• Value after Reset: 0x00
• Access: Read/Write
Address: 12_0000h base + 10D5h offset = 12_10D5h
Bit 7 6 5 4 3 2 1 0
Read GMD ISCR1 ISCR2 VSD SPD Reserved AVI GCP
Write
Reset 0 0 0 0 0 0 0 0
• Size: 8 bits
• Value after Reset: 0x00
• Access: Read/Write
Address: 12_0000h base + 10D6h offset = 12_10D6h
Bit 7 6 5 4 3 2 1 0
Read GMD ISCR1 ISCR2 VSD SPD Reserved AVI GCP
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read GMD ISCR1 ISCR2 VSD SPD Reserved AVI GCP
Write
Reset 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
Read LowPriority_ HighPriority
Reserved
Write overflow _overflow
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read LowPriority_ HighPriority
Reserved
Write overflow _overflow
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read LowPriority_ HighPriority
Reserved
Write overflow _overflow
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read LowPriority_ HighPriority
Reserved
Write overflow _overflow
Reset 0 0 0 0 0 0 1 1
Bit 7 6 5 4 3 2 1 0
Read incoming_pr_factor[3:0] output_pr_factor[3:0]
Write
Reset 0 0 0 1 0 0 0 0
Bit 7 6 5 4
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read igmdcurrent_gamut_seq_num[3:0]
Write
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read gmdenablet
Reserved
Write x
Reset 0 0 0 0 0 0 0 0
• Size: 8 bits
• Value after Reset: 0x00
• Access: Write
Address: 12_0000h base + 1102h offset = 12_1102h
Bit 7 6 5 4
Read
Reserved
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read
Reserved
Write gmdupdatepacket
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read gmdpacketsinframe[3:0] gmdpacketlinespacing[3:0]
Write
Reset 0 0 0 1 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved gmdgbd_profile gmdaffected_gamut_seq_num
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB3
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB4
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB5
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB6
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB8
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB9
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB10
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB11
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB12
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB13
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB14
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB15
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB16
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB17
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB18
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB18
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB20
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB21
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB22
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB23
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB24
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB25
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB26
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_GMD_PB27
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved forceaudio Reserved forcevideo
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD1CH0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD2CH0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD1CH1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD2CH1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD1CH2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD2CH2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH3
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD1CH3
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD2CH3
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH4
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD1CH4
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD2CH4
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH5
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD1CH5
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD2CH5
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH6
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD1CH6
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD2CH6
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD0CH7
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGAUD1CH7
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
FC_DBGAUD2CH7
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGTMDS0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGTMDS1
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read FC_DBGTMDS2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Read PDZ ENTMDS sparectrl gen2_pddq
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read gen2_txpwron gen2_enhpdrxsense seldataenpol seldipif
Write
Reset 0 1 1 0
Bit 7 6 5 4 3 2 1 0
Read Reserved testclr testen Reserved testclk
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read testdin[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read testdout[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Write
Reset 0 0 0 0
Bit 3 2 1 0
• Size: 8 bits
• Value after Reset: 0x00
• Access: Read
Address: 12_0000h base + 3005h offset = 12_3005h
Bit 7 6 5 4
Write
Reset 0 0 0 0
Bit 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Read RX_ RX_ RX_ RX_ TX_PHY_
Reserved HPD
Write SENSE3 SENSE2 SENSE1 SENSE0 LOCK
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read RX_ RX_ RX_ RX_ TX_PHY_
Reserved HPD
Write SENSE3 SENSE2 SENSE1 SENSE0 LOCK
Reset 1 1 1 1 0 0 1 1
Bit 7 6 5 4 3 2 1 0
Read Reserved -
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read address
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read datao[15:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
datao[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read datai[15:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
datai[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
Reserved Reserved
Write write read
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read done_
Reserved done_pol done_mask done_status
Write interrupt
Reset 0 0 0 0 1 0 0 0
Bit 7 6 5 4
Read nack_pol nack_mask nack_interrupt nack_status
Write
Reset 1 0 0 0
Bit 3 2 1 0
Read arbitration_pol arbitration_mask arbitration_interrupt arbitration_status
Write
Reset 1 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved fast_mode
Write
Reset 0 0 0 0 1 0 1 1
Bit 7 6 5 4 3 2 1 0
Read Reserved i2c_softrst
Write
Reset 0 0 0 0 0 0 0 1
33.5.234 PHY I2C Slow Speed SCL High Level Control Register 1
(HDMI_PHY_I2CM_SS_SCL_HCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_ss_scl_hcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.235 PHY I2C Slow Speed SCL High Level Control Register 0
(HDMI_PHY_I2CM_SS_SCL_HCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read
i2cmp_ss_scl_hcnt[7:0]
Write
Reset 0 1 1 0 1 1 0 0
33.5.236 PHY I2C Slow Speed SCL Low Level Control Register 1
(HDMI_PHY_I2CM_SS_SCL_LCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_ss_scl_lcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.237 PHY I2C Slow Speed SCL Low Level Control Register 0
(HDMI_PHY_I2CM_SS_SCL_LCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read
i2cmp_ss_scl_lcnt[7:0]
Write
Reset 0 1 1 1 1 1 1 1
33.5.238 PHY I2C Fast Speed SCL High Level Control Register 1
(HDMI_PHY_I2CM_FS_SCL_HCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_fs_scl_hcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.239 PHY I2C Fast Speed SCL High Level Control Register 0
(HDMI_PHY_I2CM_FS_SCL_HCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read
i2cmp_fs_scl_hcnt[7:0]
Write
Reset 0 0 0 1 0 0 0 1
33.5.240 PHY I2C Fast Speed SCL Low Level Control Register 1
(HDMI_PHY_I2CM_FS_SCL_LCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_fs_scl_lcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.241 PHY I2C Fast Speed SCL Low Level Control Register 0
(HDMI_PHY_I2CM_FS_SCL_LCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read
i2cmp_fs_scl_lcnt[7:0]
Write
Reset 0 0 1 0 0 1 0 0
Bit 7 6 5 4 3 2 1 0
Read AudN[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read AudN[15:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved AudN[19:16]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read audCTS[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read audCTS[15:8]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved audCTS[19:16]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read enable_
sw_fifo_rst Reserved hbr incr_type[1:0] burst_mode
Write hlock
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read data_buffer_
Reserved
Write ready
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read stop_dma_
Reserved
Write transaction
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read fifo_threshold[7]
Write
Reset 0 0 0 1 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read initial_addr[7]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read initial_addr[15]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read initial_addr[23]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read initial_addr[31]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read final_addr[7]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read final_addr[15]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read final_addr[23]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read final_addr[31]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read burst_start[7]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read burst_start[15]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read burst_start[23]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read burst_start[31]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read MBURSTLENGTH7
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Read
Reserved
Write
Reset 0 0 0 0
Bit 3 2 1 0
Bit 7 6 5 4
Write
Reset 0 0 0 0
Bit 3 2 1 0
Bit 7 6 5 4
Write
Reset 0 0 0 0
Bit 3 2 1 0
Bit 7 6 5 4
Read done_mask retrysplit_mask lostownership_mask error_mask
Write
Reset 0 0 0 1
Bit 3 2 1 0
Read Reserved fifo_thrempty_mask fifo_full_mask fifo_empty_mask
Write
Reset 0 0 0 1
Bit 7 6 5 4
Read done_polarity retrysplit_polarity lostownership_polarity error_polarity
Write
Reset 0 0 0 1
Bit 3 2 1 0
Read fifo_thrfifoempty_
Reserved fifo_full_polarity fifo_empty_polarity
Write polarity
Reset 0 0 0 1
Bit 7 6 5 4 3 2 1 0
Read CH_IN_EN7 CH_IN_EN6 CH_IN_EN5 CH_IN_EN4 CH_IN_EN3 CH_IN_EN2 CH_IN_EN1 CH_IN_EN0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
int_buff_
Read int_buff_full
Reserved empty
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read int_buff_
Reserved int_buff_full
Write empty
Reset 0 0 0 1 0 0 0 1
Bit 7 6 5 4 3 2 1 0
Read int_buff_
Reserved int_buff_full
Write empty
Reset 0 0 0 1 0 0 0 1
Bit 7 6 5 4 3 2 1 0
Read cecclk_ cscclk_ audclk_ prepclk_ tmdsclk_ pixelclk_
Reserved Reserved
Write disable disable disable disable disable disable
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4
Read Reserved cecswrst_req Reserved
Write
Reset 1 1 1 1
Bit 3 2 1 0
Read Reserved prepswrst_req tmdsswrst_req pixelswrst_req
Write
Reset 1 1 1 1
Bit 7 6 5 4 3 2 1 0
Read Feed_
Reserved
Write through_off
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved phyrstz
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Read
Reserved heacphyrst
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved INTMODE Reserved DECMODE
Write
Reset 0 0 0 0 0 0 0 0
G A1 A2 A3 A4
R = 2 csc scale - 12 x B1 B2 B3 + 2 csc scale x B4
B C1 C2 C3 C4
Y A1 A2 A3 A4
Cb = 2 cscscale - 12 x B1 B2 B3 + 2 cscscale x B4
Cr C1 C2 C3 C4
Bit 7 6 5 4 3 2 1 0
Read csc_colorde_pth[3:0] Reserved -
Write
Reset 0 0 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A1_MSB
Write
Reset 0 0 1 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A1_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A2_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A2_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A3_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A3_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A4_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_A4_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B1_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B1_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B2_MSB
Write
Reset 0 0 1 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B2_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B3_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B3_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B4_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_B4_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_C1_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_C1_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_C2_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_C2_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_C3_MSB
Write
Reset 0 0 1 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEF_C3_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEFC4_MSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CSC_COEFC4_LSB
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved STANDBY BC_NACK FRAME_TYP SEND
Write
Reset 0 0 0 0 0 0 1 0
Bit 7 6 5 4 3 2 1 0
ERROR_ ERROR_
Read WAKEUP ARB_LOST NACK EOM DONE
Reserved FOLL INIT
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read ERROR_ ARB_
WAKEUP_ ERROR_ NACK_ DONE_
Reserved FOLL_ LOST_ EOM_MASK
Write MASK INIT_MASK MASK MASK
MASK MASK
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read WAKEUP_ ERROR_ ERROR_ ARB_
Reserved NACK_POL EOM_POL DONE_POL
Write POL FOLL_POL INIT_POL LOST_POL
Reset 0 1 1 1 1 1 1 1
Bit 7 6 5 4
Bit 3 2 1 0
Write
Reset 0 0 0 0
Bit 7 6 5 4
Read CEC_ADDR_L7 CEC_ADDR_L6 CEC_ADDR_L5 CEC_ADDR_L4
Write
Reset 0 0 0 0
Bit 3 2 1 0
Read CEC_ADDR_L3 CEC_ADDR_L2 CEC_ADDR_L1 CEC_ADDR_L0
Write
Reset 0 0 0 0
Bit 7 6 5 4
Read CEC_ADDR_H7 CEC_ADDR_H6 CEC_ADDR_H5 CEC_ADDR_H4
Write
Reset 1 0 0 0
Bit 3 2 1 0
Read CEC_ADDR_H3 CCEC_ADDR_H2 CEC_ADDR_H1 CEC_ADDR_H0
Write
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved CEC_TX_CNT
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read - CEC_RX_CNT
Write -
Reset 0 0 0 0 0 0 0 0
0 No data received
1 1-byte data is received.
16 16-byte data is received.
Bit 7 6 5 4 3 2 1 0
Read CEC_TX_DATA
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read CEC_RX_DATA
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read LOCKED_
Reserved
Write BUFFER
Reset 0 0 0 0 0 0 0 0
This formula means that the wake-up status (on CEC_STAT[6] register) is only '1' if the
opcode[7:0] received is equal to one of the defined values and the corresponding enable
bit of that defined value is set to '1'.
Address: 12_0000h base + 7D31h offset = 12_7D31h
Bit 7 6 5 4
Read OPCODE0x86en OPCODE0x82en OPCODE0x70en OPCODE0x44en
Write
Reset 1 1 1 1
Bit 3 2 1 0
Read OPCODE0x42en OPCODE0x41en OPCODE0x0Den OPCODE0x04en
Write
Reset 1 1 1 1
Bit 7 6 5 4 3 2 1 0
Read Reserved slaveaddr[6:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read address[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read datao[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read datai[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read
Reserved Reserved
Write wr rd_ext rd
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read done_
Reserved done_pol done_mask done_status
Write interrupt
Reset 0 0 0 0 1 0 0 0
Bit 7 6 5 4
Read nack_pol nack_mask nack_interrupt nack_status
Write
Reset 1 0 0 0
Bit 3 2 1 0
Read arbitration_pol arbitration_mask arbitration_interrupt arbitration_status
Write
Reset 1 0 0 0
Bit 7 6 5 4 3 2 1 0
Read fast_std_
Reserved Reserved
Write mode
Reset 0 0 0 0 1 0 1 1
Bit 7 6 5 4 3 2 1 0
Read Reserved SEGADDR
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved i2c_softrst
Write
Reset 0 0 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
Read I2CM_SEGPTR
Write
Reset 0 0 0 0 0 0 0 0
33.5.331 I2CM_SS_SCL_HCNT_1_ADDR
(HDMI_I2CM_SS_SCL_HCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_ss_scl_hcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.332 I2CM_SS_SCL_HCNT_0_ADDR
(HDMI_I2CM_SS_SCL_HCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_ss_scl_hcnt[7:0]
Write
Reset 0 1 1 0 1 1 0 0
33.5.333 I2CM_SS_SCL_LCNT_1_ADDR
(HDMI_I2CM_SS_SCL_LCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_ss_scl_lcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.334 I2CM_SS_SCL_LCNT_0_ADDR
(HDMI_I2CM_SS_SCL_LCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_ss_scl_lcnt[7:0]
Write
Reset 0 1 1 1 1 1 1 1
33.5.335 I2CM_FS_SCL_HCNT_1_ADDR
(HDMI_I2CM_FS_SCL_HCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_fs_scl_hcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.336 I2CM_FS_SCL_HCNT_0_ADDR
(HDMI_I2CM_FS_SCL_HCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_fs_scl_hcnt[7:0]
Write
Reset 0 0 0 1 0 0 0 1
33.5.337 I2CM_FS_SCL_LCNT_1_ADDR
(HDMI_I2CM_FS_SCL_LCNT_1_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_fs_scl_lcnt[15:8]
Write
Reset 0 0 0 0 0 0 0 0
33.5.338 I2CM_FS_SCL_LCNT_0_ADDR
(HDMI_I2CM_FS_SCL_LCNT_0_ADDR)
Bit 7 6 5 4 3 2 1 0
Read i2cmp_fs_scl_lcnt[7:0]
Write
Reset 0 0 1 0 0 1 0 0
Bit 7 6 5 4 3 2 1 0
Read en_base_
base_pointer_base_addr[6:0]
Write pointer_addr
Reset 0 0 0 0 0 0 0 0
34.1 Overview
34.1.2 Applications
The HDMI_PHY is targeted to digital video/audio transmission for high resolution
display applications, supporting major display formats up to 1080 i/p in DTV
applications and QXGA in graphic display applications, with true-color or deep-color
resolutions. The HDMI_PHY supports 3D video formats. At maximum pixel rate, the
HDMI channel bit rate is 3.4 Gbps, providing a maximum throughput of 9.2 Gbps.
The HDMI_PHY is an ideal solution for implementing the physical layer of a high-
reliability digital video/audio interface based on HDMI technology, with reduced line
count and minimum cable-wire and EMI shielding requirements. The HDMI_PHY
delivers the bandwidth needed in every time mode that demands high resolution panels,
while keeping clock sources at a low frequency.
The figure below shows a typical application for HDMI_PHY.
34.1.4 Features
The HDMI_PHY provides the following features:
• Support for up to 720p at 100 Hz and 720i at 200 Hz or 1080p at 60 Hz and 1080i/
720i at 120 Hz HDTV display resolutions and up to QXGA graphic display
resolutions
• Support for 3D video formats
• Link controller flexible interface with 30- or 60-bit SDR data access
• Up to 9.2 Gbps aggregate bandwidth
• Driver with pre-emphasis and edge rate control for extra-long cable support
• Programmable source terminations
• HPD input analog comparator
• Rx sensing
• 13.5-266 MHz input reference clock
ASIC SOC
The HDMI_PHY macro interfaces with the HDMI Tx link controller, which provides
control signals and video data to be transmitted through the TMDS lanes. Analog I/O's
interface with the external world.
34.1.5.2.1 Interfaces
The HDMI interface on the HDMI_PHY block is defined by the TMDS differential lanes
and the HPD/DDCCEC connections. HDMI video data is provided through three
differential TMDS pairs for data and one TMDS differential pair for clock. HPD/
DDC_CEC enables detection of the HDMI sink. These signals interface the external
world and connect to the HDMI connector.
On the system interface, the HDMI_PHY connects to the HDMI Tx link controller. This
block provides an input reference clock to the PHY (pixel clock). Based on the defined
video mode, a pixel repetition clock and a TMDS word clock are output to the controller.
The controller then generates video data on this TMDS word clock and outputs both data
and clock to the HDMI_PHY. Data is then serialized and sent to the HDMI interface.
In addition, the system side includes one standard I2C interface for configuration and
testability of the PHY. Other signals correspond to control logic and are either input to
the PHY or provided by the PHY to the controller block for observability.
Decoupling
VP Filter
VP
VP VP FILT
C_decoupling R_filter
C filter
GD GD
Figure 34-3. I/O Pads: Decoupling Capacitance Between VP and GD, Filter Between VP
and VP_FILT
HDMI 3D Tx PHY
SCANMODE VPH
SCANEN VP
SCANCLK VP_FILT0 Power Supply
Scan Signals Signals
SCANIN[4:0] VP_FILT1
SCANOUT[4:0] VP_FILT2
SCANRST GD
TX_READY HDMI_TX_DATA[2:0]_P
Transmitter DATA0[19:0] HDMI_TX_DATA[2:0]_N
TMDS Interface
Datapath Signals DATA1[19:0] HDMI_TX_CLK_P
DATA2[19:0] HDMI_TX_CLK_N
HDMI_TX_HPD WIDE_XFACE
Hot Plug Detect
SNKDET PDDQ Control Signals
Signals
HDMI_TX_DDC_CEC TX_PWRON
ENHPDRXSENSE
Rx Detection
RXSENSE
Signals
RESREF_S External
RESREF_F Component
tmdsclksrc
HDMI_TX_DATA2_P
DATA0[19:0] 10 Serializer Data
DRV
DATA1[19:0] PHY <-> Link sclk 1 HDMI_TX_DATA2_N
DATA2[19:0] Interface
TMDSCLKIN
tmdsclksrc
TMDSCLKSRC HDMI_TX_DATA1_P
10 Data
PREPCLK Main PHY Serializer DRV
PHY_RESET sclk 1 HDMI_TX_DATA1_N
PDDQ
WIDE_XFACE
tmdsclksrc
TX_PWRON HDMI_TX_DATA0_P
FSM 10 Data
TX_READY Serializer DRV
ENHPDRXSENSE sclk 1 HDMI_TX_DATA0_N
tmdsclk HDMI_TX_CLK_P
PCLK DRV
PLL / MPLL
HDMI_TX_CLK_N
HDMI_TX_DDC_SCL
HDMI_TX_DDC_SDA I2C IREF
SDA_PULL_DN_N RESREF_S
(TEST / CONF)
I2C_SLAV_ADDR[6:0] RESREF_F
HDMI_TX_DDC_CEC
The PHY includes two PLLs that synthesize the high-speed serial bit clock (required by
the transmitter) from a reference pixel clock with a frequency of 13.5-266 MHz, for a
transmitter capable of transmitting up to 9.2 Gbps using three lanes.
The HDMI_PHY drives audio and video across three TMDS data channels. Each serial
TMDS link has a data rate range of 0.25-3.4 Gbps. The HDMI_PHY also drives the
TMDS clock at 1/10th of the serial data rate with a frequency range of 25-266 MHz.
Within the HDMI_PHY, additional support blocks exist: the Bandgap block (for blocks
biasing), the Resistor Calibration block, the ADC, and the analog test bus.
The HDMI_PHY accepts an input pixel clock (PCLK) with a frequency range of
13.5-266 MHz and accepts three channels of parallel data (TXDATA0[19:0],
TXDATA1[19:0], TXDATA2[19:0]) that is synchronous with the TMDSCLKIN input
clock. The TMDSCLKIN clock has a frequency range of 12.5-266MHz.
The TMDSCLKSRC clock output should be used by the HDMI transmitter controller as
the source for TMDSCLKIN. The relation between TMDSCLKSRC and TMDSCLKIN
should be constant between resets.
The HDMI_PHY's status and configuration is accessed through its I2C interface. In Scan
mode of operation, SCANCLK is bypassed to all PHY output clocks.
PLL/MPLL Operation
The PLL/MPLL can be configured in Coherent mode or Non-Coherent mode (default). In
Coherent mode, the TMDS clock is the MPLL feedback clock, which is coherent with the
MPLL's high-speed output clock, because both clocks are shaped by the MPLL response.
In Non-Coherent mode, the TMDS clock is the MPLL reference clock, which is not
coherent with the MPLL's high-speed output clock.
Driver Operation
The driver differential source termination, edge rate, pre-emphasis, and voltage level can
be configured for maximum performance.
For each separate video mode in which the HDMI_PHY is set to transmit, due to
different operating frequency, color depth and pixel repetition that characterizes each
one, you might need to configure the PHY block for correct operation and optimized
performance. It is recommended that PHY configuration through the I2C interface be
done while the PHY is in Power-down mode. Configuration involves programming the
PLL/MPLL internal blocks as well as the analog drivers' source termination value and
edge rate control, for example. This programming is done through the I2C interface. For
more information about the I2C interface, see I2C Interface Signals, for information about
the PLL/MPLL configurations that must be made for each video mode of operation, see
PLL/MPLL Generic Configuration Settings , and for information about the driver
configurations, see Control Registers and Appendix A: Driver Voltage Level
Configuration.
HORSYNC
Vertical blanking
V
S
Y
N
C
Control Period
Video Data Period
Data Island Period
Video Data Period is used for the transmission of active pixel data. Transition Minimized
(TMDS) data coding (8B10B) is used for 8-bit data transfers. In Deep-color modes, pixel
data words are first packed in 8-bit multiple data groups. These groups are then
fragmented into 8-bit length words for TMDS encoding.
Data Island Period is used for audio or other auxiliary data information transmission.
Data is transferred in packet format using a similar Transition Minimized coding, in this
case a TMDS Error Reduction Coding (TERC4). This is a 4B10B code.
Finally, Control Period is used when non-active video/audio or other auxiliary
information needs to be transmitted. Only control information is transmitted in this mode.
In Control Periods, data is transferred using a Transition Maximized (also TMDS) data
coding, in a form of 2B10B code. This property is very useful to enable proper word
alignment on the sink (receiver) side. A Control Period is always entered between any
other two periods that are not Control Periods.
toggling until TX_READY is deasserted. This sequence is required to enable the Power
Sequence FSM to continue its execution and move from TX_READY to DISABLE_TX,
later to PWR_DN_PLL, and finally to PWR_DN that corresponds to the power-down
state.
reset/undetined states
PWR_DN
set ck_ref_enb_mux = 00
TX PWRON &&
bypass_ppII
TX PWRON && set pwr cnt =
! bypass ppII 'HDMI PLL PU TIME
PLL_PWR_ON PLL_DRV_ANA
set ck ref enb mux = 10 set ck ref enb mux = 10
set pII drv ana = 0
set pII pwr on = 1 set mpII pwr on = 1
pwr_cnt==0 set pwr_cnt = pwr_cnt==0 set pwr_cnt =
'HDMI PLL RST TIME 'HDMI MPLL RST TIME
PLL_RESET MPLL_RESET
set ck ref enb mux = 10 set ck ref enb mux = 10
set pII rst = 0 set mpII rst = 0
RES_CAL
set rcal_enb=1
set ck ref enb mux = 10
pwr_cnt==0
Resistor Calibration
State Machine
rcal_adc_done==1
PWR_DN_PLL
TX CLK ALIGN set ck ref enb mux = 10
set tx_ck_align_enb = 1
set_ck_ref_enb_mux = 10 set pII rst = 1
set mpll rst = 1
Clock Alignment set pwr_cnt =
State Machine pwr cnt==0 'HDMI HDMIPD TIME
The following signals can be overridden through the control registers: bypass_ppll,
pll_pwr_on, pll_rst, pll_gear_shift, pll_drv_ana, mpll_rst, mpll_gear_shift,
cko_word_enb, mpll_drv_ana, ser_ckl_enb, rcal_enb, tx_clk_align_enb, ser_clk_enb, and
ck_ref_enb.
The rcal_adc_done and tx_ck_align_done signals can be observed through the control
registers or through the digital test bus (dtb[1:0], controlled through control registers).
The TX_PWRON and TX_READY signals belong to the HDMI 3D Tx PHY macro
interface.
The power sequence can also be started through control registers, using the tx_pwron0,
tx_pwron1, tx_pwron2, and ck_pwron signals.
TX_READY can also be overridden through control registers.
The clock source that clocks the Power Sequence FSM is controlled by the refclk_enb
signal. This signal is asserted when TX_PWRON is asserted or when the state machine is
in a state other than PWR_DN. This signal can be overridden through the control
registers.
NOTE
Due to a potential different state on some analog nodes, it is
recommended that the power-up sequence be run twice (after
the first TX_READY assertion, the PHY can be powered down,
then powered up again).
The clock alignment procedure can be done differently for each of the power-up
sequence runs. For the first run, the clock alignment can be set to be performed channel-
by-channel (tx_ck_align_mode = 1'b1, register 0x1C); for the second power-up, the clock
alignment can be set to be performed for all channels at the same time
(tx_ck_align_mode = 1'b0, register 0x1C) to ensure inter-pair skew close to 0 UI.
34.3.2.3.1 PLL/MPLL
During power-up, the PLL block and (optionally) MPLL block receive the pwron, rst,
gear_shift, and drv_ana signals, as shown in the figure below. The minimum and
maximum timing for these signals is listed in the table below. The power sequence then
initiates the resistor calibration and clock alignment steps.
Pll ck_ref_mpII
MPLL ck_ref_p/m
(prescaler)
pll_pwron mpll_pwron
pll_rst mpll_rst
pll_gear_shift mpll_gear_shift
mpll_drv_anapII_drv_ana
pll_pwron
Phese TMDSCLKSRC
Prequency acquisition acquisition
and lock
pll_rst
HDMI PLL PU TIME
pll_gear_shift
HDMI_PLL_RST_TIME
pll_drv_ana HDMI_PLL_SHIFT_TIME
mpll_pwron
Prequency Phese
acquisition acquisition
and lock
mpll_rst
HDMI PLL DRV ANA TIME
mpll_gear_shift
HDMI_MPLL_RST_TIME
mpll_drv_ana
HDMI MPLL SHIFT TIME
cko_word_enb HDMI_MPLL_DRV_ANA_TIME
The following signals can be overridden through the control registers: pll_pwron, pll_rst,
pll_gear_shift, pll_drv_ana, mpll_pwron, mpll_rst, mpll_gear_shift, mpll_drv_ana, and
cko_word_enb.
ck_ref, ck_ref_p/m, and ck_ref_mpll are internal signals, while PCLK and
TMDSCLKSRC belong to the HDMI 3D Tx PHY macro interface.
The table below provides the PLL/MPLL power-up times.
To accurately set the specified termination, the resistor calibration measures the actual
resistance of the external resistor. The resistance is measured using successive
approximations of a 7-bit termination value by enabling each bit (one-hot) from MSB to
LSB.
Users select the termination value by setting the d_tx_term[2:0] control register bits. The
HDMI 3D Tx PHY includes differential source termination on the drivers.
1:4
resistance ratio
Rext = 1.6kΩ
0
1
sup comp rt r
Comparator
The figure below shows the FSM for the resistor and ADC calibration.
Reset / undefined
states
rcal_trigger RCAL_IDLE
rcal_enb set initialize=1
if (rcal_enb) then bit_cnt=6
else bit_cnt=0
adc_trigger
adc_enb rcal_trigger or adc_trigger if (rcal_trigger) then sup_comp_mode=1
else sup_comp_mode=0
COMP_PU
ck_ref_g
set sup_comp_rt_pwron=1
ck_ref_s
39ck_ref cycles (3 stages of 13 clocks)
decrement bit_cnt
if bit cnt==0 and sup_comp_mode=0
set pll_gear_shift=0
Figure 34-10. Finite State Machine for the Resistor and ADC Calibration
The rcal_enb signal is asserted by the Power Sequence FSM, but this signal can be
overridden through the control registers.
The rescal_rep, sup_comp_mode, sup_comp_rt_r, sup_comp_rt_result, tx_rescal,
sup_comp_rt_pwron, and adc_enb signals can be overridden through the control
registers.
The rcal_adc_done signal can be observed through the control registers or through the
digital test bus (dtb[1:0], controlled through control registers).
The clock alignment enable input, tx_ck_align_enb, is generated by the power sequence,
but this input can also be overridden through the control registers.
Because it is assumed that channel 1 (the middle channel) has the median delays among
the three channels, the state machine will compare TMDSCLKIN and tx_ser_clk[1] only
when the register bit, tx_ck_align_mode, is low (default). In this case,
tx_ser_clk_kill[2:0] is asserted simultaneously. When tx_ck_align_mode is high, each
channel is aligned individually. Channel 2 is aligned first, followed by channel 0 and
lastly channel 1. The tx_ck_align_mode signal is controlled through the control registers.
The internal clock kill signals, tx_ser_clk_kill2, tx_ser_clk_kill1, and tx_ser_clk_kill0,
are generated by the Clock Alignment state machine, but these signals can be overridden
through the control registers.
NOTE
The recommended settings for the PLL/MPLL mode of
operation and driver configurations provided in this section are
presented as the default value that should be considered and
initially configured. Unless stated otherwise, these
recommended settings apply to all operating frequencies.
PLL/MPLL Mode of Operation
Configuration summary: Configure PLL/MPLL mode of operation as Single or Two-PLL
in Coherent or Non-Coherent mode. For more information about these modes of
operation, see Power-Up Requirements.
Driver Pre-Emphasis
Configuration summary: Enables trailer drivers to enable pre-emphasis operation. Pre-
emphasis is achieved by reducing the drive level of a non-transition bit with respect to a
transition bit. The following table summarizes the total output current configured with
pre-emphasis (I is current of unit current source).
The amount of pre-emphasis is programmed through the tx_traon and tx_trbon signals in
the control register, address 0x09 as follows.
PDDQ
TX PWRON
PHY RESET
The power-up sequence starts by advancing one finite state machine (FSM) through the
Phase-Locked Loop (PLL) and Multiplexed Phase-Locked Loop (MPLL) power-up
states. Afterwards, resistor calibration is performed and clock alignment is enabled.
When clock alignment is completed, the TX_READY signal is set to 1'b1 to indicate that
the PHY is ready to transmit the TMDS clock and that data transmission and normal
operation can start.
In Power-down mode, TMDS clock and data lines are disabled.
Power-Up Configuration
Before powering up the HDMI_ PHY, configure the PHY for proper operation and
performance. The following PHY characteristics can be configured:
• PLL/MPLL mode of operation: Configure PLL/MPLL mode of operation as Single
or Two-PLL in Coherent or Non-Coherent mode.
• PLL/MPLL clock dividers and analog configuration: Configure for each video mode.
• Driver edge rate control: Slew rate of clock and data output drivers
• Driver differential source termination: Differential source termination of clock and
data output drivers
• Driver voltage level: Voltage reference level for clock and data channels
• Driver pre-emphasis: Enable and control pre-emphasis operation
For more information about this configuration and the associated control registers and
signals, see Power-Up Configuration.
NOTE
HDMI_PHY registers are accessed through the I2C Master
Interface of the HDMI Controller. See HDMI Transmitter
(HDMI) for more information.
HDMI_PHY memory map
Absolute
Width Section/
address Register name Access Reset value
(in bits) page
(hex)
0 Power Control (HDMI_PHY_PWRCTRL) 16 R/W 0000h 34.7.1/1638
1 Serializer Divider Control (HDMI_PHY_SERDIVCTRL) 16 R/W 0000h 34.7.2/1640
2 Serializer Clock Control (HDMI_PHY_SERCKCTRL) 16 R/W 0000h 34.7.3/1640
3 Serializer Clock Kill Control (HDMI_PHY_SERCKKILLCTRL) 16 R/W 0000h 34.7.4/1641
Transmitter and Resistance Calibration Control
4 16 R/W 0000h 34.7.5/1642
(HDMI_PHY_TXRESCTRL)
5 Clock Calibration Control (HDMI_PHY_CKCALCTRL) 16 R/W 0000h 34.7.6/1643
Color Depth, Pixel Repetition, Clock Divider for PLL and
6 16 R/W 0400h 34.7.7/1644
MPLL, and Edge Rate Control (HDMI_PHY_CPCE_CTRL)
Tx and Clock Measure Control
7 16 R/W 0000h 34.7.8/1646
(HDMI_PHY_TXCLKMEASCTRL)
8 Tx Measure Control (HDMI_PHY_TXMEASCTRL) 16 R/W 0000h 34.7.9/1647
Clock Symbol and Transmitter Control 34.7.10/
9 16 R/W 0000h
(HDMI_PHY_CKSYMTXCTRL) 1649
Comparator Sequence Control 34.7.11/
A 16 R/W 0000h
(HDMI_PHY_CMPSEQCTRL) 1650
34.7.12/
B Comparator Power Control (HDMI_PHY_CMPPWRCTRL) 16 R/W 0000h
1651
34.7.13/
C Comparator Mode Control (HDMI_PHY_CMPMODECTRL) 16 R/W 0000h
1651
34.7.14/
D Measure Control (HDMI_PHY_MEASCTRL) 16 R/W 0000h
1652
34.7.15/
E Voltage Level Control (HDMI_PHY_VLEVCTRL) 16 R/W 0000h
1653
34.7.16/
F Digital-to-Analog Control (HDMI_PHY_D2ACTRL) 16 R/W 0000h
1654
34.7.17/
10 Current Control (HDMI_PHY_CURRCTRL) 16 R/W 08ABh
1655
34.7.18/
11 Drive Analog Control (HDMI_PHY_DRVANACTRL) 16 R/W 0003h
1655
34.7.19/
12 PLL Measure Control (HDMI_PHY_PLLMEASCTRL) 16 R/W 0000h
1656
PLL Phase and Bypass Control 34.7.20/
13 16 R/W 0000h
(HDMI_PHY_PLLPHBYCTRL) 1658
Table continues on the next page...
Bit 15 14 13 12 11 10 9 8
Read Override Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved tx_pwron tx_pwron0 tx_pwron1 tx_pwron2 ck_pwron
Write
Reset 0 0 0 0 0 0 0 0
0 Power off the transmitter driver for the first channel, if the Override bit is 0.
1 Power on the transmitter driver for the first channel, if the Override bit is 0.
2 Transmitter Power-On 1
tx_pwron1
This bit powers on or powers off the transmitter driver for channel 1.
0 Power off the transmitter driver for the second channel, if the Override bit is 0.
1 Power on the transmitter driver for the second channel, if the Override bit is 0.
1 Transmitter Power-On 2
tx_pwron2
This bit powers on or powers off the transmitter driver for channel 2.
0 Power off the transmitter driver for the third channel, if the Override bit is 0.
1 Power on the transmitter driver for the third channel, if the Override bit is 0.
0 Clock Power-On
ck_pwron
This bit powers on or powers off the clock driver.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Disable the low-speed clock in the first serializer, if the Override bit is 0.
1 Enable the low-speed clock in the first serializer, if the Override bit is 0.
1 Transmitter Serializer Divider Enable 1
tx_ser_div_en1
This bit enables or disables the low-speed clock in serializer 1.
0 Disable the low-speed clock in the second serializer, if the Override bit is 0.
1 Enable the low-speed clock in the second serializer, if the Override bit is 0.
0 Transmitter Serializer Divider Enable 2
tx_ser_div_en2
This bit enables or disables the low-speed clock in serializer 2.
0 Disable the low-speed clock in the third serializer, if the Override bit is 0.
1 Enable the low-speed clock in the third serializer, if the Override bit is 0.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Disable the high-speed clock in the first serializer, if the Override bit is 0.
1 Enable the high-speed clock in the first serializer, if the Override bit is 0.
1 Transmitter Serializer Clock Enable 1
tx_ser_clk_en1
This bit enables or disables the high-speed clock in serializer 1.
0 Disable the high-speed clock in the second serializer, if the Override bit is 0.
1 Enable the high-speed clock in the second serializer, if the Override bit is 0.
0 Transmitter Serializer Clock Enable 2
tx_ser_clk_en2
This bit enables or disables the high-speed clock in serializer two.
0 Disable the high-speed clock in the third serializer, if the Override bit is 0.
1 Enable the high-speed clock in the third serializer, if the Override bit is 0.
Bit 15 14 13 12 11 10 9 8
Read Override Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read tx_ser_clk_ tx_ser_clk_ tx_ser_clk_
Reserved
Write kill0 kill1 kill2
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read Override Reserved tx_rescal[6:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read tx_
rescal_rep[6:0]
Write rescal[6:0]
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read Override Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved ck_rescal[6:0]
Write
Reset 0 0 0 0 0 0 0 0
34.7.7 Color Depth, Pixel Repetition, Clock Divider for PLL and
MPLL, and Edge Rate Control (HDMI_PHY_CPCE_CTRL)
Register name: -
Access type: Read/write
Address: 0x06
Value at reset: 0x0400
Address: 0h base + 6h offset = 6h
Bit 15 14 13 12 11 10 9 8
Read mpll_n_
Reserved prep_div[1:0] tx_edgerate[1:0] ck_edgerate[1:0]
Write cntrl[1:0]
Reset 0 0 0 0 0 1 0 0
Bit 7 6 5 4 3 2 1 0
Read mpll_n_
pll_n_cntrl[1:0] pixel_rep[2:0] clr_dpth[1:0]
Write cntrl[1:0]
Reset 0 0 0 0 0 0 0 0
00 Divide by 1 (8 bit).
01 Divide by 1.25 (10 bits).
10 Divide by 1.5 (12 bits).
11 Divide by 2 (16 bits).
12–11 Transmitter Edge Rate
tx_edgerate[1:0]
Table continues on the next page...
0 Pixel_rep[2] Divide by 1.
1 Pixel_rep[2]Divide by 2.
00 Pixel_rep[1:0]Divide by 4.
01 Pixel_rep[1:0]Divide by 2.
1x Pixel_rep[1:0]Divide by 1.
clr_dpth[1:0] Color Depth
This bus controls the factor by which to divide the reference clock (PCLK) by the output TMDS rate
(ck_ref_mpll_p/m).
00 Divide by 4.
01 Divide by 5.
Table continues on the next page...
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read tx_meas_iv2[7:0] ck_meas_iv[7:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read tx_meas_iv0[7:0] tx_meas_iv1[7:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read Override Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read Reserved tx_symon tx_traon tx_trbon ck_symon
Write
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read
sup_
Overri
Reserved comp
de
_rt_r
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read sup_
Overri comp
Reserved
de _rt_
Write pwron
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read Override Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read sup_comp_
Reserved
Write mode
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read sup_atb_ sup_dac_
Reserved sup_por_meas_iv[1:0]
Write on_rext on_atb
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read Reserved sup_tx_lvl[4:0] sup_ck_lvl[4:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read Override Reserved sup_dac_n[7:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read sup_dac_n[7:0] sup_dac_th_n[2:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read Reserved mpll_prop_cntrl[2:0] mpll_int_cntrl[2:0] pll_prop_cntrl[2:0] pll_int_cntrl[2:0]
Write
Reset 0 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1
Bit 15 14 13 12 11 10 9 8
Read Override Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read mpll_drv_
Reserved pll_drv_ana
Write ana
Reset 0 0 0 0 0 0 1 1
NOTE
With the exception of pll_atb_sense_sel and pll_meas_iv[9],
two or more of the previous register bits must not be set to 1
simultaneously; doing so can lead to a hardware problem.
The table below describes the pll_meas_iv[10:0] bit settings.
Table 34-18. pll_meas_iv[10:0]
Effective Bit Pll_meas_iv[10:0] Value Description
Pll_meas_iv[0] 00000000001 Not used.
Pll_meas_iv[1] 00000000010 Not used in pll_top. Connected to fast_tech pins of PLL and MPLL in
hdmi_topa.
Pll_meas_iv[2] 00000000100 Connects VP supply voltage to the atb_sense line.
Pll_meas_iv[3] 00000001000 Connects vp_cp to the atb_sense line.
Pll_meas_iv[4] 00000010000 Connects internal supply voltage of the VCO (ivco) to the atb_sense line.
Pll_meas_iv[5] 00000100000 Connects vp_cko voltage to the atb_sense line.
Pll_meas_iv[6] 00001000000 Connects node vpsf to the atb_sense line.
Pll_meas_iv[7] 00010000000 Connects vref to atb_sense line.
Pll_meas_iv[8] 00100000000 Connects vcntrl to atb_sense line.
Pll_meas_iv[9] 01000000000 Enables the phase mixer and pll_cko_pm_p/m.
Pll_meas_iv[10] 10000000000 Measures the voltage corresponding to the output phase of the clr_dpth
divider (fb_clk) with respect to refclk.
Bit 15 14 13 12 11 10 9 8
Read pll_atb_
Reserved pll_meas_iv[10:0]
Write sense_sel
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read pll_meas_iv[10:0] pll_meas_gd
Write
Reset 0 0 0 0 0 0 0 0
0 Disable the ability to measure internal DC signals on the atb_sense line in the PLL.
1 Enable the ability to measure internal DC signals on the atb_sense line in the PLL.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
pll_ph_sel_ck
Read
bypass_ppll
Reserved pll_ph_sel[9:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read Override Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read pll_gear_ mpll_gear_
Reserved pll_pwr_on pll_rst mpll_pwr_on mpll_rst
Write shift shift
Reset 0 0 0 0 0 0 0 0
0 Power off PLL and draw minimal current, if the Override bit is 0.
1 Power on PLL and enable it to operate normally, if the Override bit is 0.
4 PLL Reset
pll_rst
This bit is used to place the MPLL in Reset mode.
Table continues on the next page...
0 Power on MPLL and set all output clocks to DC levels, if the Override bit is 0.
1 Power off MPLL and enable it to operate normally, if the Override bit is 0.
2 MPLL Reset
mpll_rst
This bit is used to place the MPLL in Reset mode.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read pll_gmp_ mpll_gmp_
Reserved
Write cntrl[1:0] cntrl[1:0]
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Read
mpll_atb_
Reserved mpll_meas_iv[11:0]
sense_sel
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
mpll_meas_gd
Read
mpll_meas_iv[11:0]
Write
Reset 0 0 0 0 0 0 0 0
0 Disable the ability to measure internal DC signals on the atb_sense line in the PLL.
1 Enable the ability to measure internal DC signals on the atb_sense line in the PLL.
34.7.24 MPLL and PLL Phase, Scope Clock Select, and MUX
Clock Control (HDMI_PHY_MSM_CTRL)
Register name: -
Access type: Read/write
Address: 0x17
Value at reset: 0x0000
The table below describes the cko_sel[1:0] bit settings. (The cko_sel[1:0] default value is
00.)
Table 34-20. cko_sel[1:0]
cko_sel[1:0] TMDS Clock Mode PLL and MPLL Output TMDS Clock on TMDS Channel
Mode
00 Non-Coherent Normal ck_ref_mpll_p/m (Pre-PLL out)
01 Off (PLL and MPLL are both off) Normal Off (No output TMDS clock)
10 Test (PHY in test mode) Normal PCLK (Input reference clock to HDMI 3D Tx
PHY)
11 Coherent Normal fb_clk (MPLL feedback clock)
00 Off (PLL and MPLL are both off) Bypass Off (No output TMDS clock)
01 Off (PLL and MPLL are both off) Bypass Off (No output TMDS clock)
10 Non-Coherent Bypass PCLK (Input reference clock to HDMI 3D Tx
PHY)
11 Coherent Bypass fb_clk (MPLL feedback clock)
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read mpll_
scope
ph_
Reserved mpll_ph_sel[9:0] cko_sel[1:0] _ck_
sel_
sel
Write ck
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
For information about the cko_sel[1:0] bit settings and corresponding PLL/MPLL
modes, see the cko_sel[1:0] table.
0 Scope Clock Select
scope_ck_sel
Selects the clock to connect to the scope clock signal: the differential pll_cko_p/m or the differential
mpll_cko_p/m.
0 Connect the mpll_cko_pm_p/m to the clock scope (this clock has a range of 23.125-45.25 MHz)
where the mpll_meas_iv[9] bit must be high.
1 Connect the pll_cko_pm_p/m to the clock scope (this clock has a range of 23.125-45.25 MHz) where
the pll_meas_iv[9] bit must be high.
Address: 0x18
Value at reset: N/A
Address: 0h base + 18h offset = 18h
Bit 15 14 13 12 11 10 9 8
Read adc_val[9:0]
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
sup_comp_rt_result
tx_scope_out0
tx_scope_out1
tx_scope_out2
ck_scope_out
Read adc_val[9:0]
Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read Reserved d_tx_term[2:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
Bit 15 14 13 12 11 10 9 8
Read
Override Reserved pg_skip_bit2
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
cko_word_enb
Read
ck_ref_enb
refclk_enb
tx_ck_align_
pg_skip_bit1 pg_skip_bit0 rcal_enb tx_ready
enb
Write
Reset 0 0 0 0 0 0 0 0
0 Disable the pattern generator skip bit feature for the third transmitting channel, if the Override bit is 0.
1 Enable the pattern generator skip bit feature for the third transmitting channel, if the Override bit is 0.
7 Pattern Generator Skip Bit 1
pg_skip_bit1
This bit enables or disables pattern generator skip bit feature for channel 1.
0 Disable the pattern generator skip bit feature for the second transmitting channel, if the Override bit is
0.
1 Enable the pattern generator skip bit feature for the second transmitting channel, if the Override bit is
0.
6 Pattern Generator Skip Bit 0
pg_skip_bit0
This bit enables or disables pattern generator skip bit feature for channel 0.
0 Disable the pattern generator skip bit feature for the first transmitting channel, if the Override bit is 0.
1 Enable the pattern generator skip bit feature for the first transmitting channel, if the Override bit is 0.
5 Clock Reference Enable
ck_ref_enb
This bit powers up the clock alignment and the resistance calibration modules.
0 Powers down the clock alignment and the resistance calibration modules, if the Override bit is 0.
1 Powers up the clock alignment and the resistance calibration modules, if the Override bit is 0.
4 Resistance Calibration Enable
rcal_enb
This bit enables or disables the resistance clock alignment process.
0 PHY transmit driver is not ready to transmit data, if the Override bit is 0.
1 PHY transmit driver is ready to transmit data, if the Override bit is 0.
1 Output Clock Word Enable
cko_word_enb
This bit enables the output word clock.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
pg_insert_err2
pg_insert_err1
pg_insert_err0
Read
Reserved pg_pat[9:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Do not insert error inside generated pattern for the third transmit channel.
1 Insert error inside generated pattern for the third transmit channel.
11 Pattern Generator Insert Error One
pg_insert_err1
This bit enables or disables error insertion inside the generated pattern for channel 1.
0 Do not insert error inside generated pattern for the second transmit channel.
1 Insert error inside generated pattern for the second transmit channel.
10 Pattern Generator Insert Error Zero
pg_insert_err0
This bit enables or disables error insertion inside the generated pattern for channel 0.
Table continues on the next page...
Bit 15 14 13 12 11 10 9 8
Read pg_
Reserved pg_mode2[2:0]
Write mode1[2:0]
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read tx_ck_align_
pg_mode1[2:0] pg_mode0[2:0] adc_enb soft_reset
Write mode
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ck_scope_enb
scope_enb2
scope_enb1
scope_enb0
Read
Reserved scope_sample_cnt[9:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
• 0x57: Reserved
• 0x58: Reserved
• 0x59: Reserved
I2C
• 0x5A: dtb[1] = start_cond and dtb[0] = cregs_write (Not stored in the control
register.)
• 0x5B: dtb[1] = sda_pull_dn_n and dtb[0] = cregs_ack (Not stored in the control
register.)
• 0x5C: dtb[1] = cregs_read and dtb[0] = cregs_rd_data[0] (Not stored in the control
register.)
• 0x5D: Reserved
• 0x5E: Reserved
• 0x5F: Reserved
• 0x60: Reserved
• 0x61: Reserved
• 0x62: Reserved
• 0x63: Reserved
Rx Sense
• 0x64: dtb[1] = rx_sense of clock driver and dtb[0] = rx_sense of CH2's driver
• 0x65: dtb[1] = rx_sense of CH1's driver and dtb[0] = rx_sense of CH0's driver
• 0x66: -
Address: 0h base + 1Eh offset = 1Eh
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read cko_
invert invert invert
word_ skip_ skip_ skip_
Reserved dtb_select[6:0] _ _ _
div_ bit2 bit1 bit0
data2 data1 data0
Write enb
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Address: 0x1F
Value at reset: 0x0000
Address: 0h base + 1Fh offset = 1Fh
Bit 15 14 13 12 11 10 9 8
Read Reserved
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read rcal_adc_ tx_ck_align_ ck_scope_ scope_ scope_ scope_
Reserved
Write done done done done2 done1 done0
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read scope_ones_cnt0[15:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read scope_ones_cnt1[15:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read scope_ones_cnt2[15:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read ck_scope_ones_cnt[15:0]
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
The following table defines the pre-emphasis factor (PREEMPH) to be used in the
information that follows.
SYMON TRAON TRBON PREEMPH
0 0 0 -
1 0 0 0.00
1 0 1 0.08
1 1 0 0.17
1 1 1 0.25
The following equations can be used to calculate-for a certain signal voltage swing
(VSWING) and PHY configuration (PREEMPH, RTERM)-the signal's high and low
voltage levels (VHI, VLO).
VHI = VLO + VSWING
TXLVL = CKLVL = [ 0.772 - ( VPHRXTERM - VLO ) ] / 0.01405
For a certain termination value and pre-emphasis configuration (factor), users input only
the VSWING value. With this data, users can obtain the respective VHI and VLO DC
levels and the TXLVL and CKLVL configuration to apply to the PHY.
Lower TXLVL/CKLVL values result in higher signal amplitudes, while higher TXLVL/
CKLVL values result in lower signal amplitudes.
Values for VSWING, VHI, and VLO must be within HDMI 1.4a specification limits. The
table below provides driver voltage level settings for some example scenarios.
Table 34-21. Example Driver Voltage Level Settings
RTERM SYMON TRAON TRBON VHI (V) VLO (V) VSWING TXLVL TXLVL CKLVL CKLVL
(V) (BIN) (BIN)
100 1'b1 1'b0 1'b0 3.200 2.800 0.400 19 10011 19 10011
100 1'b1 1'b0 1'b0 3.175 2.675 0.500 10 01010 10 01010
100 1'b1 1'b0 1'b1 3.107 2.607 0.500 6 00110 6 00110
133 1'b1 1'b0 1'b0 3.225 2.825 0.400 21 10101 21 10101
133 1'b1 1'b0 1'b0 3.206 2.706 0.500 13 01101 13 01101
133 1'b1 1'b0 1'b1 3.143 2.643 0.500 8 01000 8 01000
34.9 Appendix B
This appendix describes the PLL/MPLL configurations that must be made for each video
mode of operation.
NOTE
Single-PLL Coherent and Non-Coherent modes can be set for
only video formats with no pixel repetition and color depth
equal to 8 bits.
The 3D video format is indicated using the VIC in the AVI InfoFrame (indicating one of
the 2D formats defined in the CEA-861-D standard) in conjunction with the 3D_Structure
field in the HDMI vendor-specific InfoFrame.
For Side-by-Side (Half) and Top-and-Bottom 3D structures, pixel clock frequency is
equal to the original VIC pixel clock frequency.
For the L+depth+GFX+GFX-depth 3D structure, pixel clock frequency is equal to 4x the
original VIC pixel clock frequency.
For other 3D structures, pixel clock frequency is equal to 2x the original VIC pixel clock
frequency.
The following table summarizes the original 2D VIC pixel clock frequencies required to
support the 3D structures.
Table 34-24. 2D VIC Pixel Clock Frequencies Required to Support 3D Structures
3D Structure 2D Pixel Clock Frequency
0000 (Frame Packing) 2x 2D pixel clock frequency
0001 (Field alternative) 2x 2D pixel clock frequency
0010 (Line alternative) 2x 2D pixel clock frequency
0011 (Side-by-Side (Full)) 2x 2D pixel clock frequency
0100 (L + depth) 2x 2D pixel clock frequency
0101 (L + depth + GPX + GFX-depth) 4x 2D pixel clock frequency
0110 (Top-and-Bottom) 2D pixel clock frequency
1000 (Side-by-Side (Half)) 2D pixel clock frequency
For VICs where PCLK = 148.5 MHz, no color depth is supported for 3D video format,
because the pixel clock frequency would be greater than 340 MHz.
Table 34-25 provides examples of primary 3D video format timings, and Table 34-26
provides examples of other 3D video format timings. Secondary 3D video format timings
can be found in the HDMI specification.
Table 34-25. Primary 3D Video Format Timings
VIC Video Vertical Refresh 2D Pixel Clock 3D Structure 3D Pixel Clock
Rate (Hz) (MHz) (MHz)
4 1,280x720p 59.94/60 74.25 0000 (Frame Packing) 148.50
4 1,280x720p 59.94/60 74.25 0110 (Top-and-Bottom) 74.25
4 1,280x720p 59.94/60 74.25 1000 (Side-by-Side (Half)) 74.25
19 1,280x720p 50 74.25 0000 (Frame Packing) 148.50
19 1,280x720p 50 74.25 0110 (Top-and-Bottom) 74.25
19 1,280x720p 50 74.25 1000 (Side-by-Side (Half)) 74.25
60 1,280x720p 23.97/24 58.40 0000 (Frame Packing) 118.8
62 1,280x720p 29.97/30 74.25 0000 (Frame Packing) 148.50
5 1,920x1,080i 59.94/60 74.25 0000 (Frame Packing) 148.50
5 1,920x1,080i 59.94/60 74.25 1000 (Side-by-Side (Half)) 74.25
20 1,920x1,080i 50 74.25 0000 (Frame Packing) 148.50
20 1,920x1,080i 50 74.25 1000 (Side-by-Side (Half)) 74.25
32 1,920x1,080p 23.98/24 74.25 0000 (Frame Packing) 148.50
32 1,920x1,080p 23.98/24 74.25 0110 (Top-and-Bottom) 74.25
32 1,920x1,080p 23.98/24 74.25 1000 (Side-by-Side (Half)) 74.25
34 1,920x1,080p 29.98/30 74.25 0000 (Frame Packing) 148.50
34 1,920x1,080p 29.98/30 74.25 0110 (Top-and-Bottom) 74.25
16 1,920x1,080p 59.94/60 148.50 0110 (Top-and-Bottom) 148.50
31 1,920x1,080p 50 148.50 0110 (Top-and-Bottom) 148.50
35.1 Overview
This chapter describes block-level operation and programming of I2C. The chapter is
intended for a block-driver software developer. To understand how the block is integrated
at the SoC level, a system software developer should see discussions of the block in the
appropriate SoC-level chapter(s).
References: This document assumes an understanding of the following document:
• The I2C Bus Specification, Version 2.1, by Philips Semiconductor
The Inter IC (I2C) provides functionality of a standard I2C slave and master. The I2C is
designed to be compatible with the standard NXP I2C bus protocol.
NOTE
Three independent I2C channels are available.
I2C is a two-wire, bidirectional serial bus that provides a simple, efficient method of data
exchange, minimizing the interconnection between devices. This bus is suitable for
applications requiring occasional communications over a short distance between many
devices. The flexible I2C standard allows additional devices to be connected to the bus
for expansion and system development. See the connection diagram in the figure below.
+Vdd
Pull-up
Rp resistors Rp
I2Cn_SDA (Serial Data line)
Device 1 Device 2
The I2C interface speed is dependent on the I2C bus loading and timing characteristics.
For pin requirement details, see The I2C Bus Specification. The I2C system is a true
multimaster bus including arbitration and collision detection that prevents data corruption
if multiple devices attempt to control the bus simultaneously. This feature supports
complex applications with multiprocessor control and can be used for rapid testing and
alignment of end products through external connections to an assembly-line computer.
The figure below shows the block diagram of I2C.
Peripheral Bus
Interrupt Request Address Data
I2C Frequency I2C Control I2C Status I2C Data I2C Address
Divider Register Register Register I/O Register Register
(I2C_IFDR) (I2C_I2CR) (I2C_I2SR) (I2C_I2DR) (I2C_IADR)
In / Out
Clock Data
Control Shift
Start, Stop, Register
and
Arbitration
Control
Input Address
Sync Compare
I2Cn_SCL I2Cn_SDA
35.1.1 Features
The I2C has the following key features:
• Compatibility with I2C bus standard
• Multimaster operation
• Software programmability for one of 64 different serial clock frequencies
• Software-selectable acknowledge bit
• Interrupt-driven, byte-by-byte data transfer
• Arbitration-lost interrupt with automatic mode switching from master to slave
35.3 Clocks
There are two input clocks for I2C.
The following table describes the clock sources for I2C. Please see Clock Controller
Module (CCM) for clock setting, configuration and gating information.
Table 35-2. I2C Clocks
Clock name Clock Root Description
ipg_clk_patref perclk_clk_root Module clock
ipg_clk_s ipg_clk_root Peripheral access clock
• Peripheral clock: This clock is used for peripheral bus register read/writes.
• Module clock: This is the functional clock of the I2C. The serial bit clock frequency
is derived from the module clock. The module clock and peripheral clocks are
synchronous with each other. The minimum frequency of the module clock should be
12.8 MHz for Fast mode to achieve 400-kbps operation.
NOTE
The I2C is designed to be compatible with the PhilipsTM I2C
bus protocol. For information on system configuration,
protocol, and restrictions, see the I2C Bus Specification, version
2.1, by Philips Semiconductors. The I2C supports Standard and
Fast modes only.
SCL1
SCL2
SCL
35.4.4 Handshaking
The clock synchronization mechanism can be used as a handshake in data transfers. Slave
devices can hold SCL low after completing one byte transfer (9 bits). In such a case, the
clock mechanism halts the bus clock and forces the master clock into a Wait state until
the slave releases SCL.
35.4.8 Reset
The I2C can be reset in the following ways:
• Global reset: A hard asynchronous reset of the whole I2C
• Software reset: An internal reset for the whole I2C (except for I2C_IADR and
I2C_IFDR registers) initiated by deasserting the I2C_I2CR[IEN] bit
35.4.9 Interrupts
There is only one interrupt from the block, which is enabled by setting the
I2C_I2CR[IIEN] bit.
The interrupt is generated in any one of the following conditions:
• One byte transfer is completed (the interrupt is set at the falling edge of the ninth
clock).
• An address is received that matches its own specific address in Slave Receive mode.
• Arbitration is lost.
35.5 Initialization
NOTE
Ensure the input select pins for IOMUXC are configured
correctly for I2C.
EXIT ENTER
ENABLE
IBB=0
IFDR IBB=0
I2SR=0
IEN=IIEN=1
START
MSTA=1
IBB=1 MTX=1
IBB=1
TIMEOUT
SEND
DATA
I2C Interrupt Handler
TIMEOUT I2DR
sr = I2SR (status)
IBB=1
ERROR cr = I2CR (control)
HANDLER Clear I2SR
If IAL=1 Then Arbitration Lost!
MSTA=0
MTX=0 If RXAK=0 Then TX Success
IIF=1
IBB=0 OR
TIMEOUT
IAL=1
INTERRUPT
=0
RXAK=1
AK
DISABLE
RX
ICF=1
I2CR=0
TX
COMPLETE
STOP
MSTA=0
MTX=0
No More Data
Clear
IIF
Y Master N
Mode
TX RX Y Arbitration
TX / RX
Lost
N
Last
N Y N Y
RXAK = 0 Byte to be IAAS = 1 IAAS = 1
Read Address Data
Y N Cycle Y N Cycle
N
Read Data
Write Data TX Next
Byte from I2C_I2DR
to I2C_I2DR
and Store
Return
NOTE
For a Repeated Start only, the Stop-generation stage does not
occur in Master mode. A loop repeats itself without stopping
for the next start.
For Master Receive mode, I2C is programmed as Master
Transmit during Address mode and after slave address transfer;
the MTX bit should be cleared and a dummy read on the
I2C_I2DR register should be performed so I2C can read the
next receive data.
N
A1 IIF = 1?
Clear IIF
Y Master N
Mode?
TX RX Y Arbitration
TX/RX?
Lost?
N
Last Byte
Transmitted? Y
Clear IAL
N
Last
N Y
RXAK = 0? Byte to be Y
N IAAS =1
Read? IAAS =1
? ? Data
Y N
Address Cycle
Y N
Cycle
End of Y 2nd Last
Y ADDR Cycle (Read)Y SRW =1 RX
Byte to be TX/RX?
(Master RX) Read? ?
? N N(WRITE) TX
N
Y ACK from
Write Next Generate Set TX
Set TXAK =1 Mode Receiver
Byte to I2DR STOP Signal
?
N
Read Data
Dummy Read Generate Set RX Switch to
from I2DR
From I2DR STOP Signal Mode RX Mode
And Store
A1
NOTE
The timeout value depends on the bus frequency at which I2C
is operating. The minimum timeout for polling the IIF bit at a
maximum I2C bus frequency of 400 kHz is Tmin = 25 μs
(=2.5 x 10 μs). This value can be calculated for any bus
frequency. The formula is Tmin = 10/FSCL, where FSCL is the
frequency of the I2C clock (SCL).
Reset
Program IFDR
Enable I2C
(IEN = 1, IIEN = 1)
Program IADR
N
IBB=0?
C Y A
Data Transmission
Interrupt Asserted
Figure 35-7. Detailed flowchart of a typical I2C Master Transmit mode, part 1
Clear IIF
Y N
MSTA = 1?
N Clear IAL
RXAK = 0?
WriteNext
Byte to I2DR
D B C B
Figure 35-8. Detailed flowchart of a typical I2C Master Transmit mode, part 2
Figure 35-7 and Figure 35-8 show the Master Transmit mode operation with interrupt
subroutine. If an interrupt is generated and the MSTA bit is 0, then bus arbitration is lost
and IAL is set. Software can clear the IAL bit and reprogram I2C. If the MSTA bit is 1,
then it is a transfer-generated interrupt. In this case, software can check the RXAK bit for
a data receive acknowledgement by the slave and, accordingly, decide to do one of the
following:
• Generate a STOP
• Generate a REPEATED START by writing to the I2C_I2CR register
• Perform the next data transfer by writing to the I2C_I2DR register
NOTE
The IBB bit is asserted by a Start condition on the bus, and it is
deasserted by a Stop condition on the bus. Therefore, if
arbitration is lost due to an unexpected Stop condition during
transfer, then IBB is cleared. If arbitration is lost due to a data
mismatch, then it is not cleared. Software should always clear
the IEN bit and then set it if arbitration is lost.
Read 0 0
ADR
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The I2C_IADR holds the address to which the I2C responds when addressed as a slave. The
slave address is not the address sent on the bus during the address transfer. The register is not
reset by a software reset.
0 This read-only field is reserved and always has the value 0.
Reserved
NOTE
The above calculation assumes that the default CCM register
settings, routing, and division factors are used. If different
routing, PFD values, and/or division factors are used, the user
must adjust the parameters accordingly to calculate the correct
clock frequency.
The following table describes the divider and register values for the register field "IC."
Table 35-3. I2C_IFDR Register Field Values
IC Divider IC Divider IC Divider IC Divider
0x00 30 0x10 288 0x20 22 0x30 160
0x01 32 0x11 320 0x21 24 0x31 192
0x02 36 0x12 384 0x22 26 0x32 224
0x03 42 0x13 480 0x23 28 0x33 256
0x04 48 0x14 576 0x24 32 0x34 320
0x05 52 0x15 640 0x25 36 0x35 384
0x06 60 0x16 768 0x26 40 0x36 448
0x07 72 0x17 960 0x27 44 0x37 512
0x08 80 0x18 1152 0x28 48 0x38 640
0x09 88 0x19 1280 0x29 56 0x39 768
0x0A 104 0x1A 1536 0x2A 64 0x3A 896
0x0B 128 0x1B 1920 0x2B 72 0x3B 1024
0x0C 144 0x1C 2304 0x2C 80 0x3C 1280
0x0D 160 0x1D 2560 0x2D 96 0x3D 1536
0x0E 192 0x1E 3072 0x2E 112 0x3E 1792
0x0F 240 0x1F 3840 0x2F 128 0x3F 2048
Read 0 IC
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The IC value should not be changed during the data transfer, however, it can be changed before
a Repeat Start or Start programming sequence in I2C. The I2C protocol supports bit rates of up to
400 kbps. The IC bits need to be programmed in accordance with this constraint.
The I2C_I2CR is used to enable the I2C and the I2C interrupt. It also contains bits that
govern operation as a slave or a master.
Address: Base address + 8h offset
Bit 15 14 13 12 11 10 9 8
Read 0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Read 0 0
IEN IIEN MSTA MTX TXAK
Write RSTA
Reset 0 0 0 0 0 0 0 0
0 I2C interrupts are disabled, but the status flag I2C_I2SR[IIF] continues to be set when an Interrupt
condition occurs.
1 I2C interrupts are enabled. An I2C interrupt occurs if I2C_I2SR[IIF] is also set.
5 Master/Slave mode select bit. If the master loses arbitration, MSTA is cleared without generating a Stop
MSTA signal.
NOTE: The module clock should be on for writing to the MSTA bit.
NOTE: The MSTA bit is cleared by software to generate a Stop condition; it can also be cleared by
hardware when the I2C loses the bus arbitration.
Table continues on the next page...
NOTE: Writing TXAK applies only when the I2C bus is a receiver.
0 An acknowledge signal is sent to the bus at the ninth clock bit after receiving one byte of data.
1 No acknowledge signal response is sent (that is, the acknowledge bit = 1).
2 Repeat start. Always reads as 0. Attempting a repeat start without bus mastership causes loss of
RSTA arbitration.
0 No repeat start
1 Generates a Repeated Start condition
Reserved This read-only field is reserved and always has the value 0.
The I2C_I2SR contains bits that indicate transaction direction and status.
Address: Base address + Ch offset
Bit 15 14 13 12 11 10 9 8
Read 0
Write
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
0 Not addressed
1 Addressed as a slave. Set when its own address (I2C_IADR) matches the calling address.
5 I2C bus busy bit. Indicates the status of the bus.
IBB
NOTE: When I2C is enabled (I2C_I2CR[IEN] = 1), it continuously polls the bus data (SDA) and clock
(SCL) signals to determine a Start or Stop condition.
For the above two cases, the bit is set at the falling edge of the ninth I2Cn_SCL clock during the ACK
cycle.
• A Start cycle is attempted when the bus is busy.
• A Repeated Start cycle is requested in Slave mode.
• A Stop condition is detected when the master did not request it.
0 No arbitration lost.
1 Arbitration is lost.
3 This read-only field is reserved and always has the value 0.
Reserved
2 Slave read/write. When the I2C is addressed as a slave, IAAS is set, and the slave read/write bit (SRW)
SRW indicates the value of the R/W command bit of the calling address sent from the master. SRW is valid only
when a complete transfer has occurred, no other transfers have been initiated, and the I2C is a slave and
has an address match.
0 An "acknowledge" signal was received after the completion of an 8-bit data transmission on the bus.
1 A "No acknowledge" signal was detected at the ninth clock.
In Master Receive mode, reading the data register allows a read to occur and initiates the
next byte to be received. In Slave mode, the same function is available after it is
addressed.
Address: Base address + 10h offset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Read 0 DATA
Write
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The core-written value in I2C_I2DR cannot be read back by the core. Only data written by the I2C
bus side can be read.
36.1 Overview
The IOMUX Controller (IOMUXC), together with the IOMUX, enables the IC to share
one pad to several functional blocks. This sharing is done by multiplexing the pad's input
and output signals.
Every module requires a specific pad setting (such as pull up or keeper), and for each
pad, there are up to 8 muxing options (called ALT modes). The pad settings parameters
are controlled by the IOMUXC.
The IOMUX consists only of combinatorial logic combined from several basic IOMUX
cells. Each basic IOMUX cell handles only one pad signal's muxing.
Figure 36-1 illustrates the IOMUX/IOMUXC connectivity in the system.
PAD Settings
PAD Settings
Registers
MUX Control
Registers
IOMUXC
. .
IOMUX IO Pad
Cells
. Cells
.
. .
IPMUX
HW
signal
moduleY
CFG
AIPS Reg
moduleX IOMUX IORING
36.1.1 Features
The IOMUXC features are:
• 32-bit software mux control registers (IOMUXC_SW_MUX_CTL_PAD_<PAD
NAME> or IOMUXC_SW_MUX_CTL_GRP_<GROUP NAME>) to configure 1 of
8 alternate (ALT) MUX_MODE feilds of each pad or a predefined group of pads and
to enable the forcing of an input path of the pad(s) (SION bit).
• 32-bit software pad control registers
(IOMUXC_SW_PAD_CTL_PAD_<PAD_NAME> or
IOMUXC_SW_PAD_CTL_GRP_<GROUP NAME>) to configure specific pad
settings of each pad, or a predefined group of pads.
• 32-bit general purpose registers - several (GPR0 to GPRn) 32-bit registers according
to SoC requirements for any usage.
• 32-bit input select control registers to control the input path to a module when more
than one pad drives this module input.
Each SW MUX/PAD CTL IOMUXC register handles only one pad or one pad's group.
Only the minimum number of registers required by software are implemented by
hardware. For example, if only ALT0 and ALT1 modes are used on Pad x then only one
bit register will be generated as the MUX_MODE control field in the software mux
control register of Pad x.
The software mux control registers may allow the forcing of pads to become input (input
path enabled) regardless of the functional direction driven. This may be useful for
loopback and GPIO data capture.
36.2 Clocks
The table found here describes the clock sources for IOMUXC.
Please see Clock Controller Module (CCM) for clock setting, configuration and gating
information.
Table 36-1. IOMUXC Clocks
Clock name Clock Root Description
ipt_clk_io enfc_clk_root IO clock
ipg_clk_s ipg_clk_root Peripheral access clock
The IOMUX consists of a number (about the number of pads in the SoC) of basic
iomux_cell units. If only one functional mode is required for a specific pad, there is no
need for IOMUX and the signals can be connected directly from the module to the I/O.
The IOMUX cell is required whenever two or more functional modes are required for a
specific pad or when one functional mode and the one test mode are required.
The basic iomux_cell design, which allows two levels of HW signal control (in ALT6
and ALT7 modes - ALT7 gets highest priority) is shown in Figure 36-2.
IOMUXC_SW_MUX_CTRL_<PAD>[MUX_MODE]
SW_PAD_CTL
ALT0
ALT1
: PAD0
ALTn
ALT0
ALT1
<SOURCE>_SELECT_INPUT :
ALTn
Peripheral1 DATA_IN IOMUXC_SW_MUX_CTRL_<PAD>[MUX_MODE]
SW_PAD_CTL
ALT0
ALT1
:
PAD1
ALTn
ALT0
ALT1
:
ALTn
36.3.3 Daisy chain - multi pads driving same module input pin
In some cases, more than one pad may drive a single module input pin. Such cases
require the addition of one more level of IOMUXing; all of these input signals are
muxed, and a dedicated software controlled register controls the mux in order to select
the required input path.
A module port involved in "daisy chain" requires two software configuration commands,
one for selecting the mode for this pad (programable via the
IOMUXC_SW_MUX_CTL_<PAD> registers) and one for defining it as the input path
(via the daisy chain registers).
This means that a module port involved in "daisy chain" requires two software
configuration commands, one for selecting the mode for this pad (programable via the
IOMUXC_SW_MUX_CTL_<PAD> registers) and one for defining it as the input path
(via the daisy chain registers). The daisy chain is illustrated in the figure below.
IOMUX IORING
IOMUX Cells
To module D
To module F
A
To module X
ALT x select
To module G
To module X
Module X B
To module H
ALT x select
Daisy Chain
To module X
select
To module M
C
To module N
ALT x select