7. DDR physical interface control (DDRPHYC)

Portions Copyright (c) Synopsys, Inc. All rights reserved. Used with permission.

7.1 DDRPHYC features

7.2 DDRPHYC block diagram

The DDRPHYC block diagram is shown in Figure 12.

The DDRPHYC is composed of:

Figure 12. DDRPHYC block diagram

Block diagram of DDRPHYC showing internal components like DDRPHY, PUBL, and various PHY lanes (Byte lane 0-3, Command lane) with their respective MS DLL, ITM, and I/O blocks, along with external connections like DDRCTRL, JTAG, and APB.

The diagram illustrates the DDRPHYC block structure. On the left, external interfaces include DDRCTRL (connected via DFI 2.1), a JTAG chain (connected to the PUBL block), and an APB (PUBL control register). The central PUBL block contains registers and interfaces to the DDRPHYC internal logic. The DDRPHYC block contains the DDRPHY, which is divided into five PHY lanes: Byte lane 0 PHY, Byte lane 1 PHY, Command lane PHY, Byte lane 2 PHY, and Byte lane 3 PHY. Each Byte lane PHY includes an MS DLL, an ITM, and an I/O block, with external pins for DQ[], DQS/, DQS#, and DQM. The Command lane PHY includes an MDLL, an ITM, and an I/O block, with external pins for Ck/Ckb and Cmd/Add. The diagram is labeled MSv46541V2 in the bottom right corner.

Block diagram of DDRPHYC showing internal components like DDRPHY, PUBL, and various PHY lanes (Byte lane 0-3, Command lane) with their respective MS DLL, ITM, and I/O blocks, along with external connections like DDRCTRL, JTAG, and APB.

7.3 DDRPHYC SDRAM interface

The DDRPHYC SDRAM interfaces are listed in Table 22.

Table 22. DDRPHYC I/O list

Pin nameDDR3/3LLPDDR2/3Description
DDR_DQ31 to DDR_DQ24YesYesByte lane 3 DQ
DDR_DQS3PYesYesByte lane 3 DQS
DDR_DQS3NYesYesByte lane 3 DQS#
DDR_DQM3YesYesByte lane 3 DQM
DDR_DQ23 to DDR_DQ16YesYesByte lane 2 DQ
DDR_DQS2PYesYesByte lane 2 DQS
DDR_DQS2NYesYesByte lane 2 DQS#
DDR_DQM2YesYesByte lane 2 DQM

Table 22. DDRPHYC I/O list (continued)

Pin nameDDR3/3LLPDDR2/3Description
DDR_DQ15 to DDR_DQ8YesYesByte lane 1 DQ
DDR_DQS1PYesYesByte lane 1 DQS
DDR_DQS1NYesYesByte lane 1 DQS#
DDR_DQM1YesYesByte lane 1 DQM
DDR_DQ7 to DDR_DQ0YesYesByte lane 0 DQ
DDR_DQS0PYesYesByte lane 0 DQS
DDR_DQS0NYesYesByte lane 0 DQS#
DDR_DQM0YesYesByte lane 0 DQM
DDR_A15 to DDR_A0YesYes(1)Row/column address / CA[] pins for LPDDR2/3
DDR_BA2 to DDR_BA0YesnoBank address
DDR_CKEYesYesCKE
DDR_CLKPYesYesCK
DDR_CLKNYesYesCK#
DDR_RASNYesnoRAS#
DDR_CASNYesnoCAS#
DDR_WENYesnoWE#
DDR_CSNYesYesCS#
DDR_ODTYesnoODT
DDR_RESETNYesnoRESET#
DDR_VREF1 to DDR_VREF3YesYes(2)Connected to Vref= VDDQ/2
DDR_ZQYesYesConnected to external R =240 Ω ±1%
DDR_DTO0TestTestReserved for DLL test purposes
DDR_DTO1TestTestReserved for DLL test purposes
DDR_ATOTestTestReserved for DLL test purposes
  1. 1. For LPDDR2/3: DDR_A[9:0] are used as CA[9:0] and DDR_A[15:10] are not used.
  2. 2. DDR_VREF1: command lane reference, DDR_VREF2: byte lane 3 and 1 common reference, DDR_VREF3: byte lane 2 and 0 common reference.

7.4 DDRPHY (DDR multiPHY IP core)

7.4.1 DDRPHY overview

The DDRPHY diagram is shown in Figure 13. It is implemented with a structured layout into 4-byte lanes and one address/command lane with:

Figure 13. DDRPHY block diagram

Block diagram of DDRPHY showing Byte lane 0, 1, 2, 3 segments and a Command lane segment. Each segment contains blocks like MSDLL, ITMD, ITMS, SSTL I/O, and their associated signals (DQ, DQS, CK, CA).

The diagram illustrates the DDRPHY block structure, organized into five segments:

MSv46542V2

Block diagram of DDRPHY showing Byte lane 0, 1, 2, 3 segments and a Command lane segment. Each segment contains blocks like MSDLL, ITMD, ITMS, SSTL I/O, and their associated signals (DQ, DQS, CK, CA).

7.4.2 Delay locked loop (DLL)

The DLLs are shown in Figure 14

The Master DLL (MDLL) uses the input (clk_in) to generate four clock outputs, each delayed in quarter clock cycle (\(90^\circ\)) increments. These four clock phases (clk_0, clk_90, clk_180, clk_270) are generated with very high accuracy and low jitter across a wide range of frequencies.

The Mast-Slave DLL (MSDLL) is composed of a MDLL and a slave delay pair.

The slave delay pair uses a timing reference from MDLL to provide a highly accurate 90° delay to the DQS/DQS# inputs and generate dqs_90 and dqs_b_90 respectively.

DLL key features:

Figure 14. MDLL block diagram

MDLL block diagram showing a Delay line block receiving clk_in and outputting clk_0, clk_90, clk_180, and clk270. The diagram is labeled MSv46553V1.
graph LR
    subgraph MDLL
        direction LR
        clk_in --> Delay_line[Delay line]
        Delay_line --> outputs["clk_0
clk_90
clk_180
clk270"] end

MSv46553V1

MDLL block diagram showing a Delay line block receiving clk_in and outputting clk_0, clk_90, clk_180, and clk270. The diagram is labeled MSv46553V1.

Figure 15. MSDLL block diagram

MSDLL block diagram showing a Delay line block receiving clk_in and outputting clk_0, clk_90, clk_180, and clk270. Below the Delay line is a slave delay block receiving dqs and outputting dqs_90. Below the slave delay block is another slave delay block receiving dqs_b and outputting dqs_b_90. The diagram is labeled MSv47333V1.
graph TD
    subgraph MSDLL
        direction TB
        clk_in --> Delay_line[Delay line]
        Delay_line --> outputs["clk_0
clk_90
clk_180
clk270"] Delay_line --> slave_delay_1[slave delay] slave_delay_1 --> dqs_90[dqs_90] slave_delay_1 --> slave_delay_2[slave delay] slave_delay_2 --> dqs_b_90[dqs_b_90] end

MSv47333V1

MSDLL block diagram showing a Delay line block receiving clk_in and outputting clk_0, clk_90, clk_180, and clk270. Below the Delay line is a slave delay block receiving dqs and outputting dqs_90. Below the slave delay block is another slave delay block receiving dqs_b and outputting dqs_b_90. The diagram is labeled MSv47333V1.

The DLL settings are controlled by a control bus dllctrl[51:0] described in Table 23: MSDLL control bits.

Table 23. MSDLL control bits

Control busSignal nameMSDLL PUBL registerMDLL PUBL registerDefaultDescription
dllctrl[51]lltmDXnDLLCR[19]N/A0b0Locked loopback test mode select:
0: normal, 1: Loopback
dllctrl[50]test_hizb_aDXnDLLCR[18]ACDLLCR[18]0b0Analog test output tri-state control 0:
hiZ, 1: analog low Z
dllctrl[49:46]sl_phase_trm[3:0]DXnDLLCR[17:14]N/A0b0000Slave phase lock trim (4 bits
encoded 18 deg step from 36 to
144deg)
dllctrl[45:44]sl_bypass_start_up[1:0]DXnDLLCR[13:12]N/A0b00Slave auto-startup bypass
dllctrl[43:38]fb_trm[5:0]DXnDLLCR[11:6]ACDLLCR[11:6]0b000000Master feedback delay adjust.
fb_trm[5:3]: feed forward delay,
fb_trm[2:0]: feedback delay
dllctrl[37:32]sl_fb_trm[5:0]DXnDLLCR[5:0]N/A0b000000Slave feedback delay adjust
(fb_trm[5:3]: ffd, fb_trm[2:0]: fbk)
dllctrl[29]lock_det_enDLLGCR[29]N/A0b0Lock detector enable
dllctrl[28:27]fdtrm_sl[1:0]DLLGCR[28:27]DLLGCR[28:27]0b00Slave bypass fixed delay trim
(-10%, 0, +10%, +20%)
dllctrl[26:24]sl_bias_trm[6:4]DLLGCR[26:24]DLLGCR[26:24]0b011Slave bias generator control voltage
trim: VC
dllctrl[23]bps200DLLGCR[23]DLLGCR[23]0b0Bypass frequency select
(0: 0-100MHz, 1:0-200MHz)
dllctrl[22:20]sl_bias_trm[2:0]DLLGCR[22:20]DLLGCR[22:20]0b111Slave bias generator frequency trim:
Fmax
dllctrl[18:16]bias_trm[6:4]DLLGCR[18:16]DLLGCR[18:16]0b011Master bias generator control
voltage trim: VC
{dllctrl[19],dllctrl[15]}fdtrm[1:0]DLLGCR[19],DLLGCR[15]DLLGCR[19],DLLGCR[15]0b00Master bypass fixed delay trim
(-10%, 0, +10%, +20%)
dllctrl[14:12]bias_trm[2:0]DLLGCR[14:12]DLLGCR[14:12]0b111Master bias generator frequency
trim: Fmax
dllctrl[11]test_ctrl_switchDLLGCR[11]N/A0b0Test control: Switch for analog and
digital. 0: master, 1: slave
dllctrl[10:9]test_ctrl_a[1:0]DLLGCR[10:9]DLLGCR[10:9]0b00Test control: selects the analog
signal at ana test
dllctrl[8:6]test_ctrl_d[2:0]DLLGCR[8:6]DLLGCR[8:6]0b000Test control: selects the digital
signal at dig test
dllctrl[5]test_ctrl_enDLLGCR[5]DLLGCR[5]0b0Test control enable for analog and
digital test
dllctrl[4:2]ipump_trm[2:0]DLLGCR[4:2]DLLGCR[4:2]0b000Charge pump current trim
(0: max current)

7.4.3 Interface timing modules (ITMs)

The ITMs are used to generate signals with precise timing:

There are three types of ITM:

The ITMs are shown in Figure 16.

Figure 16. ITMs block diagram

Block diagram showing three ITM blocks: ITMC_D2 for CLK/CLK# and Commands, ITMS for DQS/DQS#, and ITMD for DQ. Each block shows inputs from PUBL and MSDLL, and outputs to SSTL I/O.

The diagram illustrates three ITM blocks within a dashed boundary:

Block diagram showing three ITM blocks: ITMC_D2 for CLK/CLK# and Commands, ITMS for DQS/DQS#, and ITMD for DQ. Each block shows inputs from PUBL and MSDLL, and outputs to SSTL I/O.

The ITMC-D2 does the SDR to DDR signaling conversion for LPDDR2/3 (tmsel =1).

The ITMC_D2 connections to set timings according to SDRAM type are shown in Figure 17 and Figure 18.

Figure 17. ITMC_D2 for LPDDR2/3

Block diagram of ITMC_D2 for LPDDR2/3 showing MDLL, three ITMC_D2 blocks, and I/O interfaces for CK, CK_b, and CMD/ADD.

The diagram illustrates the ITMC_D2 configuration for LPDDR2/3. At the top, an MDLL block receives DLL_CTRL[51:0] and clk_in inputs and outputs four clock signals: clk_0, clk_90, clk_180, and clk_270. These clocks are distributed to three ITMC_D2 blocks below. The first ITMC_D2 block (for CK) has tmSel = 0 and dout[1:0] = '01' inputs. The second ITMC_D2 block (for CK_b) has tmSel = 0 and dout[1:0] = '10' inputs. The third ITMC_D2 block (for CMD/ADD) has tmSel = 1 and dout[1:0] inputs, with a note in pink text: to CA[19:10]/CA[9:0]. Each ITMC_D2 block is connected to an I/O block on the right, labeled CK, CK_b, and CMD/ADD respectively. Dashed lines indicate bidirectional data flow between the ITMC_D2 blocks and their corresponding I/O blocks. The diagram is labeled MSv46556V1 in the bottom right corner.

Block diagram of ITMC_D2 for LPDDR2/3 showing MDLL, three ITMC_D2 blocks, and I/O interfaces for CK, CK_b, and CMD/ADD.

Figure 18. ITMC_D2 for DDR3/3L

Block diagram of ITMC_D2 for DDR3/3L showing MDLL, three ITMC_D2 blocks, and I/O connections for CK, CK_b, and CMD/ADD.

The diagram illustrates the ITMC_D2 configuration for DDR3/3L. At the top, an MDLL block receives DLL_CTRL[51:0] and clk_in inputs. It outputs four clock signals: clk_0, clk_90, clk_180, and clk_270. These clocks are fed into three ITMC_D2 blocks. The first ITMC_D2 block (for CK) has tmisel = 0 and \(dout[1:0] = '01'\) inputs. The second ITMC_D2 block (for CK_b) has tmisel = 0 and \(dout[1:0] = '10'\) inputs. The third ITMC_D2 block (for CMD/ADD) has tmisel = 0 and dout[1:0] inputs, with a note 'to same value'. Each ITMC_D2 block is connected to an I/O block labeled CK, CK_b, and CMD/ADD respectively. A dashed line indicates a feedback path from each I/O block back to its corresponding ITMC_D2 block. The reference ID 'MSv46555V2' is located in the bottom right corner of the diagram area.

Block diagram of ITMC_D2 for DDR3/3L showing MDLL, three ITMC_D2 blocks, and I/O connections for CK, CK_b, and CMD/ADD.

The ITMS are used for DQ strobes (DQS/DQS#) with:

ITMS connections and timings are shown in Figure 19.

ITMD are used for data lanes (DQ[] and DQM) with:

ITMD connections and timings are shown in Figure 19.

Figure 19. ITMS and ITMD for DQ/DQS lanes Figure 19. ITMS and ITMD for DQ/DQS lanes block diagram showing MSDLL receiving DLL_CTRL[51:0] and clk_in, connected to ITMS and ITMD blocks with various signals (dqsb_90, dqs_90, clk_0, clk_90, clk_180, clk_270). ITMS connected to DQS and DQS_b I/Os with phase_sel, dqs_trm, drift, and internal delay blocks. ITMD connected to DQ/DQM I/Os with dout, dq_trm, din, Fifo, and Delay blocks.

Out path:
ITMD: D0 on 0deg / D1 on 180deg
ITMS: D0 on 90deg / D1 on 270deg
In path:
ITMD: D0 sampled on DQS_90/ D1 sampled on DQSb_90

MSv46557V1

Figure 19. ITMS and ITMD for DQ/DQS lanes block diagram showing MSDLL receiving DLL_CTRL[51:0] and clk_in, connected to ITMS and ITMD blocks with various signals (dqsb_90, dqs_90, clk_0, clk_90, clk_180, clk_270). ITMS connected to DQS and DQS_b I/Os with phase_sel, dqs_trm, drift, and internal delay blocks. ITMD connected to DQ/DQM I/Os with dout, dq_trm, din, Fifo, and Delay blocks.

7.4.4 SSTL IO's

SSTL IO key features:

ZQ calibration cell:

The ZQ calibration cell provides independent calibration capability for the pull-up and pull-down ODT termination and for output impedances of the SSTL I/Os.

There are four sense blocks that provide independent sense capability for each impedance element:

These four elements are calibrated in series using the calibration select input ZCAL[1:0].

The calibration sequence is:

  1. 1. Output impedance pull-down.
  2. 2. Output impedance pull-up.
  3. 3. On-Die termination (ODT) pull-down.
  4. 4. ODT pull-up.

7.5 PUBL

The PUBL is intended to ease the control of the PHY features. It supports the PHY initialization, DQS gate training and programmable configuration control.

PUBL supports:

  1. 1. DDRPHY and SDRAM initialization sequences for all types of memories: DDR3/3L, LPDDR2 and LPDDR3.
  2. 2. A built-in DQS gate training (DQSTRN) to assist in programming the read DQS gate timing.
  3. 3. A DRAM Command Unit (DCU) to assist in programming the DRAM for timing calibration purposes.

The PUBL supports a DFI 2.1 interface with the DDRCTRL.

The PUBL includes configuration registers accessible via an APB interface. It also provides a JTAG interface access for test purposes.

A simplified block diagram of PUBL is shown in Figure 20.

Figure 20. PUBL block diagram

Figure 20: PUBL block diagram. The diagram shows the internal structure of the PUBL block. On the left, external interfaces APB and JTAG are connected to a bus. This bus is connected to the Configuration Registers. Below the bus, three functional blocks: Initialization, Data Training, and DCU, feed into a Command scheduler. The Command scheduler is connected to a DFI 2.1 block. The DFI 2.1 block has bidirectional connections to the Command scheduler and external interfaces labeled 'To PHY' and 'To DDR_CTRL'. The entire PUBL block is enclosed in a rounded rectangle. The reference ID MSv46569V2 is located in the bottom right corner.
graph LR
    APB[APB] <--> Bus
    JTAG[JTAG] <--> Bus
    Bus --> CR[Configuration Registers]
    Init[Initialization] --> CS[Command scheduler]
    DT[Data Training] --> CS
    DCU[DCU] --> CS
    CS <--> DFI[DFI 2.1]
    DFI <--> PHY[To PHY]
    DFI --> CTRL[To DDR_CTRL]
  

MSv46569V2

Figure 20: PUBL block diagram. The diagram shows the internal structure of the PUBL block. On the left, external interfaces APB and JTAG are connected to a bus. This bus is connected to the Configuration Registers. Below the bus, three functional blocks: Initialization, Data Training, and DCU, feed into a Command scheduler. The Command scheduler is connected to a DFI 2.1 block. The DFI 2.1 block has bidirectional connections to the Command scheduler and external interfaces labeled 'To PHY' and 'To DDR_CTRL'. The entire PUBL block is enclosed in a rounded rectangle. The reference ID MSv46569V2 is located in the bottom right corner.

The following is a brief overview of the different design blocks and functionality of the PUBL:

7.5.1 PHY and SDRAM initialization

Figure 21. shows a high-level diagram of the PHY initialization sequence.

Figure 21. DDRPHY initialization sequence

Flowchart of DDRPHY initialization sequence. It starts with 'Un-initialized PHY' (grey oval). A solid line leads to 'DLL soft reset' (rectangle), then 'DLL lock' (rectangle), then a dashed box 'ITM soft reset', and finally to 'Initialized PHY' (grey oval). This first phase is labeled 'PHY initialization'. A parallel path from 'Un-initialized PHY' leads to 'Impedance Calibration' (rectangle), which also feeds into 'Initialized PHY'. From 'Initialized PHY', a solid line leads to 'SDRAM initialization' (rectangle), followed by a dashed box 'DQS gate training', then a dashed box 'RV training', then a dashed box 'Data eye training'. This second phase is labeled 'Triggered only after PHY initialized'. The final state is 'PHY ready' (grey oval).
graph TD
    Uninit([Un-initialized PHY]) --> DLLReset[DLL soft reset]
    DLLReset --> DLLLock[DLL lock]
    DLLLock --> ITMReset[ITM soft reset]
    ITMReset --> Init([Initialized PHY])
    Uninit --> Impedance[Impedance Calibration]
    Impedance --> Init
    Init --> SDRAMInit[SDRAM initialization]
    SDRAMInit --> DQS[DQS gate training]
    DQS --> RV[RV training]
    RV --> DE[Data eye training]
    DE --> Ready([PHY ready])
  

MSv46568V1

Flowchart of DDRPHY initialization sequence. It starts with 'Un-initialized PHY' (grey oval). A solid line leads to 'DLL soft reset' (rectangle), then 'DLL lock' (rectangle), then a dashed box 'ITM soft reset', and finally to 'Initialized PHY' (grey oval). This first phase is labeled 'PHY initialization'. A parallel path from 'Un-initialized PHY' leads to 'Impedance Calibration' (rectangle), which also feeds into 'Initialized PHY'. From 'Initialized PHY', a solid line leads to 'SDRAM initialization' (rectangle), followed by a dashed box 'DQS gate training', then a dashed box 'RV training', then a dashed box 'Data eye training'. This second phase is labeled 'Triggered only after PHY initialized'. The final state is 'PHY ready' (grey oval).

The initialization sequence has two phases. The first phase (shown in solid lines in Figure 21) happens automatically at reset and is used as follows:

  1. 1. Before and during configuration reset, the PHY is un-initialized and remains in this state until the reset is de-asserted.
  2. 2. At reset de-assertion, the PHY moves into the DLL initialization phase. This phase may be bypassed at any time by writing a '1' to bit LOCKBYP of the DDR PHY initialization register (DDRPHYC_PIR).
  3. 3. In parallel to DLL initialization, the impedance calibration phase also starts at reset de-assertion. This phase can also be bypassed by writing a '1' to the ZCALBYP bit of DDR PHY initialization register (DDRPHYC_PIR).
  4. 4. If the PHY initialization sequence was triggered by the user, a soft reset may optionally be selected to be issued to the ITMs. Initialization that is automatically triggered on reset does not issue a soft reset to the ITMs because the components have been already reset by the main reset.
  5. 5. Once the DLL initialization and impedance calibration phases are done and after the ITMs are reset, the PHY is initialized.

If these phases were bypassed, it is up to the user to perform them in software or trigger them at a later time before the PHY can be used.

The second phase of initialization starts after the PHY is initialized. Each step of this phase is triggered by the user (APB interface) or by DDR_CTRL:

  1. 1. The user or memory controller performs SDRAM initialization sequence (see “SDRAM Initialization”). The DRAM mode registers and necessary timing parameters must first be programmed into the PUBL before triggering SDRAM initialization.
  2. 2. After the SDRAM is initialized, the user or memory controller performs, or triggers the PUBL to perform, DQS gate training (see “Built-in DQS Gate Training” in Section 7.5.6: DQS gate training (DQSTRN)). The SDRAM must be initialized before triggering DQS gate training.
  3. 3. The user or memory controller performs, or triggers the PUBL to perform, read data valid training. PHY Initialization may be either Reset_triggered or PIR-triggered
  4. 4. The user or memory controller performs, or triggers the PUBL to perform, read data eye training.
    Note: the current version of the PUBL does not have the read eye training designed in.
  5. 5. The PHY is now ready for SDRAM read/write accesses.

The PUBL has a built-in SDRAM initialization routine that may be triggered by software or DDR_CTRL by writing to the PHY initialization register (DDRPHYC_PIR).

The initialization routine built into the PUBL is generic and does not require any knowledge of the type or configuration of external SDRAMs to be properly executed. The routine is designed with the relevant JEDEC specifications for the fastest and slowest SDRAMs supported by the PUBL to result in a universal initialization sequence. This generic sequence is applicable to DDR3 and LPDDR2 and DDR SDRAMs.

It is recommended to use the built-in PUBL routine to initialize the SDRAM. However, there may be cases such as during system debug when the built-in PUBL DRAM initialization is not triggered and DRAM initialization is performed by software or by the controller.

In these cases the system must first wait for the PHY to initialize, i.e. DLL locked and impedance calibration done, then it must write a '1' to the INIT bit of DDRPHYC_PIR with bit CTLDINIT of DDRPHYC_PIR set to '1' (for controller initialization) or '0' (for software or PUBL initialization) to inform the PUBL that DRAM initialization is done later, by software, the controller or by re-triggering on the PUBL.

The software or controller then executes the initialization sequence by sending relevant commands to the DRAM, respecting the various timing requirements of the initialization sequence.

The necessary configurations of the SDRAM must first be programmed into the PUBL before triggering SDRAM initialization.

SDRAM initialization must be triggered only after the PHY has been initialized.

All SDRAM initialization timing parameters described below are programmable in controller clock cycles in PTR1 and PTR2 registers.

The following sections describe the built in SDRAM initialization routines for different types of SDRAMs.

7.5.2 DDR3 initialization sequence

The initialization steps for DDR3 SDRAMs are as follows:

  1. 1. Optionally maintain RESET# low for a minimum of either 200 us (power-up initialization) or 100ns (power-on initialization).
    The PUBL drives RESET# low from the beginning of reset assertion and therefore this step may be skipped if enough time may already have expired to satisfy the RESET# low time.
  2. 2. After RESET# is de-asserted, wait a minimum of 500 us with CKE low.
  3. 3. Apply NOP and drive CKE high.
  4. 4. Wait a minimum of tXPR
    Caution: PUBL registers, SDRAM mode registers, and equivalent register fields inside the memory controller must be uniformly programmed. Mismatches between the register fields can cause transaction failures. Verify all register fields are consistently programmed before starting any SDRAM transaction.
  5. 5. Issue a load mode register 2 (MR2) command.
  6. 6. Issue a load mode register 3 (MR3) command.
  7. 7. Issue a load mode register (MR1) command (to set parameters and enable DLL).
  8. 8. Issue a load mode register (MR0) command to set parameters and reset DLL.
  9. 9. Issue ZQ calibration command.
  10. 10. Wait 512 SDRAM clock cycles for the DLL to lock (tDLLK) and ZQ calibration (tZQinit) to finish.
    This wait time is relative to Step 8, i.e. relative to when the DLL reset command was issued onto the SDRAM command bus.

7.5.3 LPDDR2 initialization sequence

The initialization steps for LPDDR2 SDRAMs are as follows:

  1. 1. Wait a minimum of 100 ns (tINIT1) with CKE driven low.
  2. 2. Apply NOP and set CKE high.
  3. 3. Wait a minimum of 200 us (tINIT3).
  4. 4. Issue a RESET command.
  5. 5. Wait a minimum of 1 us + 10 us (tINIT4 + tINIT5).
  6. 6. Issue a ZQ calibration command.
  7. 7. Wait a minimum of 1 us (tZQINIT).
  8. 8. Issue a Write mode register to MR1.
  9. 9. Issue a Write mode register to MR2
  10. 10. Issue a Write mode register to MR3

7.5.4 Initialization trigger and bypass

All initialization steps shown in Figure 21 can be triggered using the PHY initialization register (DDRPHYC_PIR).

Writing a '1' to bit INIT of DDRPHYC_PIR register bit starts initialization, with the routines to be run selected by the DDRPHYC_PIR register bits. If multiple routines are selected, they are run in the order shown in Figure 21.

The completion of the routines is indicated in the PHY General Status Register (DDRPHYC_PGSR) with the corresponding done status bits.

The DDRPHYC_PGSR.IDONE bit indicates the overall completion of the initialization

sequence.

A status register bit is cleared (reset to '0') when the corresponding routine is re-triggered.

The de-assertion of reset automatically triggers the PUBL to perform DLL initialization with DLL locking and impedance calibration. Once the DLL has locked and impedance calibration has completed, the SDRAM initialization and DQS gating may be triggered or performed by software or memory controller.

Since the PUBL allows the selection of individual routines to be run when initialization is triggered using DDRPHYC_PIR register, the routines that automatically trigger on reset de-assertion have individual bypass capability.

This means that DLL locking and/or impedance calibration may be bypassed any time by writing a '1' to the corresponding bypass register bit in the DDRPHYC_PIR register. Once a routine is bypassed, it is internally registered as completed and the corresponding done status register bit is set in the PGSR register.

It is up to the user to re-trigger or perform the bypassed routines at a later time, before the PHY can be used.

Bit INITBYP of DDRPHYC_PIR register provides the option to bypass the whole initialization sequence

7.5.5 DATA training

After the DDRPHY and the external SDRAM have been successfully initialized, DDRPHY may be trained for optimum operating timing margins.

This includes:

7.5.6 DQS gate training (DQSTRN)

Built-in DQS gate training:

Note: The built-in DQSTRN is mandatory and applicable only to DDR3/3L and may be using the MPR register.

The PUBL has a built-in DQS gate training routine that may be triggered by software or memory controller using the DDRPHYC_PIR register. Figure 22 shows the detailed flow of the DQS gate training algorithm implemented in the PUB. This is followed by a description of the main phases of the training.

Figure 22. Built-in DQS gate training flow

Flowchart of the Built-in DQS gate training flow. The process starts at 'Training Is Idle' (A) and proceeds through various steps including Rank/Byte Enable Check, Precharge All Banks, Activate Row, Write Data, Write Config Reg, and Read Data. It branches into 'End of Training' or continues to 'Collect Read Data' (F) for evaluation and configuration updates.
graph TD
    A([A]) --> Idle([Training Is Idle])
    Idle --> dt_start{dt_start}
    dt_start -- No --> A
    dt_start -- Yes --> EnableCheck[Rank/Byte Enable Check]
    EnableCheck --> Enabled{Enabled}
    Enabled -- No --> NextRankByte[Next Rank/Byte]
    NextRankByte --> EnableCheck
    Enabled -- Yes --> Precharge[Precharge All Banks]
    Precharge --> DTEnd{DT End}
    DTEnd -- Yes --> EndTraining[End of Training]
    DTEnd -- No --> MPRDT{MPR DT}
    MPRDT -- Yes --> EnableMPR[Enable MPR]
    MPRDT -- No --> ActivateRow[Activate Row]
    EnableMPR --> WriteData[Write Data]
    ActivateRow --> WriteData
    WriteData --> WriteConfigReg[Write Config Reg]
    WriteConfigReg --> ReadData[Read Data]
    ReadData --> F([F])
    F --> CollectReadData[Collect Read Data]
    CollectReadData --> DTEnd2{DT End}
    DTEnd2 -- Yes --> MPRDT2{MPR DT}
    DTEnd2 -- No --> RankEnd{Rank End}
    RankEnd -- Yes --> NextRank[Next Rank]
    RankEnd -- No --> EvaluateResults[Evaluate Results]
    MPRDT2 -- Yes --> DisableMPR[Disable MPR]
    MPRDT2 -- No --> C([C])
    EvaluateResults --> FPPPF{FPPPF or last}
    FPPPF -- Yes --> SelectWriteMiddleCfg[Select & Write Middle Cfg]
    FPPPF -- No --> NextCfg[Next Cfg]
    SelectWriteMiddleCfg --> ResetCfg0[Reset Cfg = 0]
    ResetCfg0 --> LastByte{Last Byte}
    LastByte -- Yes --> EndRank[End of Rank]
    LastByte -- No --> NextByte[Next Byte]
    EndRank --> GoToDummyRead[Go to Dummy Read]
    GoToDummyRead --> E([E])
    NextByte --> D([D])
    NextCfg --> D
    

MSv46562V1

Flowchart of the Built-in DQS gate training flow. The process starts at 'Training Is Idle' (A) and proceeds through various steps including Rank/Byte Enable Check, Precharge All Banks, Activate Row, Write Data, Write Config Reg, and Read Data. It branches into 'End of Training' or continues to 'Collect Read Data' (F) for evaluation and configuration updates.

DQS gate training phases are as follows:

  1. 1. Data Train Idle: before and during reset, the data training state machine is in the idle state and remains in this state until the reset is de-asserted. The next configuration register values to be used for DQS gating are also reset to zero. These are the values that are written to DQS Gating System Latency (R0DGSL) and DQS Gating Phase Select (R0DGPS) fields of the DDRPHYC_DXnDQSTR register before each iteration of DQS gate training. Once reset is de-asserted, the FSM continues to remain in the idle state until data training is triggered. The FSM also remains in the idle state if data training is triggered with no ranks or bytes enabled. Otherwise the FSM goes to check if the next rank or byte is enabled.
  2. 2. Rank/byte enable check: this phase checks if the next rank/byte to be trained is enabled, otherwise it skips the rank/byte and goes to the next rank/byte. Bytes are
  1. enabled/disabled using bit DXEN in DDRPHYC_DXnGCR register, and ranks are enabled/disabled using field RANKEN in DDRPHYC_DXnGCR register.
  2. 3. Precharge all banks: all banks are precharged before the beginning of training for each rank and at the end of the whole training. If the precharge is at the end of the training, the FSM goes to idle state, indicating the end of training. Otherwise it goes to prepare the DRAM for accesses, i.e. enable the MPR register if data training using MPR is selected, or activate the DRAM row to be used for write/read accesses.
  3. 4. Enable MPR: issues a load mode register command to the DRAM to enable the MPR register. This is only applicable for DDR3 DRAMs and only if the MPR bit is set in the DTAR register.
  4. 5. Activate: issues an activate command to the DRAM to open the bank row prior to writing data for training. The DRAM address used for training is user programmable in the DTAR register.
  5. 6. Write data: issues an 8-beat write to the DRAM to load data for training. The DRAM address and DRAM data used for training is user programmable in the DTAR, DTDTR0, DTDTR1 registers.
  6. 7. Write configuration register: once the data has been written to the DRAM (or MPR register has been enabled), the FSM writes the next configuration setting for the byte to the respective DQS gating register fields (DDRPHYC_R0DGSL and DDRPHYC_R0DGPS).
  7. 8. Read/collect data: this phase is executed either as a dummy read at the end of rank training or end of whole training (to reset the drift status registers in the PHY ITMs to the correct values), or it is executed as a normal read to evaluate if the DQS gate configuration is valid. After a dummy read, the FSM goes on to train the next rank or if it is the end of the whole training it goes to issue the last precharge or disable the MPR. After a read has been issued to the DRAM the FSM waits for all read data to come back. There is a time-out in case the read data does not come back. For a non-dummy read, the FSM goes on to evaluate the read data for pass/fail status.
  8. 9. Evaluate result: the read data is compared to the expected data and pass/fail status is generated and saved. If the status is such that a fail-pass-fail region (FPPPPF) has been found or if this is the last possible configuration (i.e. no passing region for this byte) the midpoint of the passing region is selected and written to (DDRPHYC_DXnDQSTR region. This signifies the end of training for the byte on the selected rank. If this is the last byte of the rank, the FSM goes on to train the next rank, otherwise it goes to the next byte of the rank. There is always a dummy read performed at the end of training all bytes of the rank.

Software DQS gate training

The DQS gate training may also be executed in software using DDRCTRL and/or the PUB DCU. Figure 23 shows the DQS gate training software algorithm. This is followed by a description of the main phases of the training.

Figure 23. Software DQS gate training flow

Figure 23. Software DQS gate training flow
graph TD
    Start([Disable Drift Compensation]) --> Rank0[Rank = 0]
    Rank0 --> WriteSDRAM[Write Data to SDRAM]
    WriteSDRAM --> Byte0[Byte = 0]
    Byte0 --> DisableUnsel[Disable Unselected Bytes]
    DisableUnsel --> RnDGSL0[RnDGSL = 0]
    RnDGSL0 --> RnDGPS0[RnDGPS = 0]
    RnDGPS0 --> WriteCfg[Write cfg to DXnDQSTR]
    WriteCfg --> ReadSDRAM[Read Data from SDRAM & Compare]
    ReadSDRAM --> LogPass[Log Pass/Fail & Soft Reset ITMs]
    LogPass --> FPPPPF{FPPPPF}
    FPPPPF -- Yes --> WriteMiddle[Write Middle cfg to DXnDQSTR]
    WriteMiddle --> LastByte{Last Byte}
    LastByte -- Yes --> ConnA1((A))
    LastByte -- No --> NextByte[Next Byte]
    NextByte --> ConnB1((B))
    FPPPPF -- No --> LastCfg{Last cfg}
    LastCfg -- Yes --> LogError[Log Error]
    LastCfg -- No --> RnDGPS3{RnDGPS < 3}
    RnDGPS3 -- Yes --> IncRnDGPS[Increment RnDGPS]
    RnDGPS3 -- No --> IncRnDGSL[Increment RnDGSL]
    IncRnDGSL --> ConnC1((C))
    IncRnDGPS --> ConnD1((D))
    LogError --> ConnE1((E))
    ConnA2((A)) --> LastRank{Last Rank}
    LastRank -- No --> NextRank[Next Rank]
    NextRank --> WriteSDRAM
    LastRank -- Yes --> DummyRead[Dummy Read Data from SDRAM]
    DummyRead --> EnableDrift[Enable Drift Compensation]
    EnableDrift --> EndTraining([End of Training])
    ConnB2((B)) --> DisableUnsel
    ConnC2((C)) --> RnDGPS0
    ConnD2((D)) --> WriteCfg
    ConnE2((E)) --> LastByte

MSv46563V1

Figure 23. Software DQS gate training flow

The software DQS gate training phases are as follows:

  1. 1. Disable drift compensation by writing '0' to bit DFTCMP in DDRPHYC_DXnGCR register.
  2. 2. Start with rank 0, (DDRPHYC is supporting single rank only).
  3. 3. Execute a minimum of two writes to the SDRAM. Any type of data and any SDRAM address can be used for DQS gate training. It is however not recommended to use data

RM0441 Rev 7 359/3787

that is all zeroes since this may mask read data comparison. The data mask must be set to 0 to enable writing of all bytes. The number of writes must be chosen such that it results in a minimum of eight data beats at the SDRAM. This means at least two write commands when using SDRAM burst length of 4.

  1. 4. Start with byte 0 (i.e. byte 0 is selected for training).
  2. 5. Disable all the other bytes except the byte that has been selected for training. The bytes are enabled/disabled by writing 1/0 to bit DXEN in DDRPHYC_DXnGCR register. To avoid having to add programming and delay for a DLL re-lock when later re-enabling a disabled byte Lane, it is recommended to also set bit PDDISDX=0 in DDRPHYC_DXnGCR register before disabling any byte lanes. This prevents the byte Lane's DLL from going into bypass mode when a byte Lane is disabled with bit DXEN=0 in DDRPHYC_DXnGCR register.
  3. 6. Start with the selected byte DQS gating system latency (RnDGSL=0 in DXnDQSTR register).
  4. 7. Start with the selected byte DQS gating phase select (RnDGPS=0 in DXnDQSTR register).
  5. 8. Write the selected DQS gating configurations (bit R0DGSL and R0DGPS in register DXnDQSTR of the selected byte).
  6. 9. Execute reads from the SDRAM locations previously written. The number of reads must be equal to the number of writes used in Step 3. Compare the read data with the expected (written) data and log the pass/fail status as a sequence or history of flags for each trained RnDGSL/RnDGPS configuration (e.g. FFPPPPFF). A fail is either when there is a data mis-compare or when fewer data than expected is returned.

Note: A controller that is designed to always wait for the correct number of read data may need a time-out in case the trained configuration results in fewer data than expected. This is not as issue when using the PUB DCU because it does not wait for the expected number of reads; rather the read count status indicates if fewer reads were returned.

  1. 10. Once the read data has been compared and the pass/fail status logged, issue an ITM soft reset to clear the status of the read data logic in the PHY. This is important because the ITM read data FIFO pointers may be in the wrong state at the end of training an RnDGSL/RnDGPS configuration that resulted in wrong DQS gating window.
  2. 11. If two consecutive fails and some passes exist, then this is the end of the training for this rank byte. In this case, do the following:
    • – Select the middle of the passes and write the values to the corresponding fields of DDRPHYC_DXnDQSTR register.
      • - If this is not the last byte, then select the next byte and go to Step 5.
      • - If this is the last byte but not the last rank, then select the next rank and go to Step 3.
      • - If this is the last byte and the last rank, then go to Step 12 to do final clean-up before the end of the DQS gate training.
    • – If the condition of two consecutive fails and some passes does not exist, then this signals that more RnDGSL/RnDGPS configurations need to be trained for this rank byte. If this is the case, do the following:
      • - if R0DGPS is less than 3, then increment R0DGPS and go to Step 8
      • - if R0DGPS is equal to 3 but R0DGSL is less than 7, then increment R0DGSL and go to Step 7
      • - if R0DGPS is equal to 3 and R0DGSL is equal to 7, then log an error because this is a signal that something in the system is very wrong such that no passing

configuration is possible for this rank byte. With such an error condition, you can either terminate the whole training to investigate the system or you can go to train the next byte.

  1. 12. Once the training of all ranks and all bytes is finished, issue one or more dummy reads to the same SDRAM locations. This flushes out the DQS drift compensation logic in the PHY and therefore avoid reporting any false drift events caused by previous DQS gating settings.
  2. 13. Once the dummy reads have completed, re-enable drift compensation by writing 1 to bit DFTCMP in DXnDQSTR register. This is the end of DQS gate training. Regular memory operations can now commence.

For details of how the PUBL DCU can be used to SDRAM accesses, please refer to Section 7.5: PUBL.

Note: It is not necessary to issue auto-refresh commands to the SDRAM during software DQS gate training if there is no data in the SDRAM other than the DQS gate training data. This is because the same locations are being read over and over within a relatively short period of time that should normally be less than the refresh timing requirement. However, if there is other data in the SDRAM and the training is taking longer than the required refresh timing, then refresh commands must be issued at the required intervals, interspersed relevantly with the training commands.

Read DQS gate training with low frequency LPDDR

When using LPDDR SDRAM, the built-in read DQS gate training is accurate for standard clock frequencies.

However, as the LPDDR tAC timing parameter becomes a smaller percentage of the clock period, fewer read DQS gate settings work. The read DQS gating works at low frequencies with LPDDR SDRAM, but this section provides additional guidance on how to correctly set up read DQS gating at low frequencies with LPDDR SDRAM

For all values of tAC ≥ (0.25*tCK), normal training can be used. When using slower speeds where tAC is less than 1 tCK, the number of data training passes may be less than ideal (as low as two) but the gate position is still satisfactory, even when aligned with rising edge of DQS. This is because there is enough margin before starting to see data fails (90 degrees of margin and at low speed is very large number).

The following lists the number of passing configurations for each of these settings and the gate position:

tAC ≥ 1.0·tCK

tAC ≥ 0.75·tCK < 1.0·tCK

tAC ≥ 0.5·tCK < 0.75·tCK

tAC ≥ 0.25·tCK < 0.5·tCK

Note: The exception to this guidance is when tAC < 0.25·tCK. In this case, no training should be performed and passive windowing should be used. Also, ensure the bits DGSL and DGPS are set to zero (DGPS is 1 by default.)

7.5.7 Read valid training (RVTRN)

The PUBL has a built-in read valid training routine (RVTRN) that may be triggered by software or the memory controller using the DDRPHYC_PIR register.

For DDR3 RVTRN is not required

For LPDDR2/3 RVTRN is normally run at the same time as DQSTRN; it is adjusting the read valid system latency in extreme conditions with tDQSCK timings values.

7.6 PUBL timings and DFI interface

Note: This section is intended to show signals timing at the DDRPHYC interfaces and the relation between the signals at DFI and the SDRAM interface, with information about physical delays which are programmed into DDRCTRL.

7.6.1 Introduction

This section describes the timing for the interface between the controller and the PHY.

The read/write timing waveforms include four groups of signals:

  1. 1. DFI signals (dfi_*)
  2. 2. PHY clocks (ctl_clk, clk_0, clk_90, clk_180, and clk_270)
  3. 3. Controller-to-PHY interface signals (ctl_cmd, ctl_ds_oe, ctl_d_oe, ctl_d, ctl_qs_en, ctl_qs_dis, and ctl_qs_phase)
  4. 4. SDRAM signals (ck/ck_n, cmd, dqs/dqs_n, and dq).

only the important signals whose the timing needs to be controlled are shown, that are dfi_* and SDRAM signals (DDR_*).

The PHY clock group is not shown and ctl_clk is identical to dfi_clk.

From the controller-to-PHY interface signal group, only the ctl_qs_en signal is shown with the PHY passive DQS gating timing.

The read/write waveforms are given for typical PHY configurations and SDRAM latencies; the waveforms are shown for DDR3 mode.

The waveforms are mostly the same for active and the passive DQS gating, only the passive DQS gating timing is shown with the ctl_qs_en signal.

The timing waveforms shown are for write latency (WL) of 5 and read latency (RL) of 5. The timing of any latency, RWL, can be derived from these representative latencies by simply shifting the timing of (ctl_ds_oe, ctl_d_oe, ctl_d, ctl_qs_en, ctl_qs_dis, and ctl_qs_phase) relative to ctl_cmd by RWL controller clocks.

For DDR3, write latency (WL) is equal to CAS write latency (CWL) plus additive latency (AL), and read latency (RL) is equal to CAS latency (CL) plus additive latency (AL).

7.6.2 Write timing

Figure 24 shows the write timing for DDR3 mode with WL = 5 and BL = 8

Note that dfi_clk and ctl_clk are the same clocks, only dfi_clk is shown. The only variable in the DFI timing is the tphy_wrlat, which is the spacing between DFI write command and DFI write data enable (dfi_wrdata_en) signal.

As shown in Table 25, this spacing is equal to WL-1. The DFI controller always drives the write data (dfi_wrdata) one clock after it has driven the write data enable signal.

The timing of DFI write data mask (dfi_wrdata_mask) is the same as the timing of DFI write data (dfi_wrdata) and is therefore not shown in the figure. The DFI write command (dfi_cmd) is simply buffered to, and is therefore aligned with, the PHY controller command (ctl_cmd).

Figure 24 also shows the two PHY latency parameters for the command and data from the controller to the SDRAM. The command latency (tCLAT) is measured from the rising edge of the controller clock (ctl_clk) when the command is available to the PHY to the rising edge of SDRAM clock (DDR_CLK) when the command is output. Similarly, write data latency (tDLAT) is measured from the controller clock rising edge when data is available from the controller to the rising edge of data strobe (DDR_DQS) on which SDRAM data is available.

Figure 24. Write timing with WL = 5, BL = 8

Timing diagram for DDR write operation with WL=5 and BL=8. The diagram shows the relationship between dfi_clk, dfi_cmd[15:0], dfi_wrdata_en, dfi_wrdata[15:0], DDR_CLK, DDR_CMD[15:0], DDR_DQS, and DDR_DQ[7:0]. Key timing parameters include Tphy_wrlat = WL-1, tCLAT, and tDLAT. The write command (WR) is shown on dfi_cmd and DDR_CMD. Data is written on dfi_wrdata and DDR_DQ. The diagram illustrates the write latency and data strobe timing.

Write timing: WL = 5, BL = 8

MSv46567V1

Timing diagram for DDR write operation with WL=5 and BL=8. The diagram shows the relationship between dfi_clk, dfi_cmd[15:0], dfi_wrdata_en, dfi_wrdata[15:0], DDR_CLK, DDR_CMD[15:0], DDR_DQS, and DDR_DQ[7:0]. Key timing parameters include Tphy_wrlat = WL-1, tCLAT, and tDLAT. The write command (WR) is shown on dfi_cmd and DDR_CMD. Data is written on dfi_wrdata and DDR_DQ. The diagram illustrates the write latency and data strobe timing.

7.6.3 Read timing

Figure 25 shows the read timing for the DDR3 mode with WL = 5 and BL = 8.

Note that dfi_clk and ctl-clk are the same clocks, only dfi_clk is shown.

The only variable in the DFI timing is the trddata_en, which is the spacing between DFI read command and DFI read data enable (dfi_rddata_en) signal. As shown in Figure 25, this spacing is equal to RL-2.

The DFI read command (dfi_cmd) is simply buffered to, and is therefore aligned with, the PHY controller command (ctl_cmd).

The timing shown in Figure 25 includes the timing of the read through the PHY read FIFO back to the controller. It also shows the two PHY latency parameters for the data from the SDRAM to the controller.

The data strobe latency (tQSLAT) is measured from the rising edge of the data strobe (DDR_DQS) that is coincident with the first data beat to the rising edge of the controller clock (ctl_clk same as dfi_clk) when data is sampled by the controller.

The read data latency (tQLAT) is measured from the rising edge of the data strobe (DDR_DQS) after two data beats are available to the rising edge of the controller clock (ctl_clk same as dfi_clk) when data is sampled by the controller.

The values of these parameters are described in Table 24. and Table 25.

Note that the read latencies have a variation of up to one controller clock cycle depending on the alignment of the read data strobe and the controller clock. This is because of the clock domain crossing between the read data strobe and the controller clock, which are assumed to be completely asynchronous to each other.

Figure 25. Read timing with WL = 5, BL = 8

Figure 25. Timing diagram illustrating DDR read timing with WL = 5, BL = 8, showing clock signals dfi_clk and DDR_CLK, command signals dfi_cmd[15:0] and DDR_CMD[15:0], control signals dfi_rddata_en, dfi_rddata_valid, and ctl_qs_en, along with strobe DDR_DQS and data buses dfi_rddata[15:0] and DDR_DQ[7:0]. Annotated parameters include Trddata_en = RL-2, Tphy_rdlat = 7*, 1.25clk, RL = 5, tQSLAT, and tQLAT.

Read timing: RL = 5, BL = 8

MSv47348V1

Figure 25. Timing diagram illustrating DDR read timing with WL = 5, BL = 8, showing clock signals dfi_clk and DDR_CLK, command signals dfi_cmd[15:0] and DDR_CMD[15:0], control signals dfi_rddata_en, dfi_rddata_valid, and ctl_qs_en, along with strobe DDR_DQS and data buses dfi_rddata[15:0] and DDR_DQ[7:0]. Annotated parameters include Trddata_en = RL-2, Tphy_rdlat = 7*, 1.25clk, RL = 5, tQSLAT, and tQLAT.

7.6.4 DDRPHY read/write latency

Table 24: PHY latency shows the latency of commands and data through the PHY.

Refer to Write timing on page 363 and Read timing on page 364 for definitions and illustration of these parameters.

Table 24. PHY latency
SYMBOLDescriptionLatencyUnitsNote
\(t_{\text{CLAT}}\)Command Latency1.25tCLK-
\(t_{\text{DLAT}}\)Write data Latency1.25tCLK-
\(t_{\text{QLAT}}\)Read data Latency1-2tCLK1
\(t_{\text{QSLAT}}\)Read data strobe Latency2-3tCLK1

Note: The PHY Latency depends on the alignment of the read data strobe to the controller clock. The PHY read latency parameter \(t_{phy\_rdat}\), i.e. the number of DFI clock cycles from the assertion of dfi_rddata_en signal to the assertion of dfi_rddata_valid is defined as:

\[t_{phy\_rdat} = 3 + t_{QSLAT} + 1 + x + y\]

With the no-bubbles feature enabled, the latency is:

\[t_{phy\_rdat} = 3 + t_{QSLAT} + 1 + x + y + 2\]

With the fixed-latency feature enabled, the latency is:

\[t_{phy\_rdat} = 12\]

Where:

x = propagation delay of the command from the PHY macro outputs to the SDRAM

y = propagation delay of the read data from the SDRAM to the PHY macro inputs

gdqs_rsl = set of DQS gating system latency values for all ranks and all byte-lanes

The term (+3) and the term (+1) of the above equations are internal DFI logic latencies.

The terms x and y include, among other things, the routing between the PHY and the I/Os, the I/O propagation delays, package delays, board delays, and other delays associated with the SDRAM that are not accounted for in the SDRAM read latency (RL) parameter.

The total read latency from the DFI read command to the DFI read data valid is

\[trddata\_en + t_{phy\_rdat}.\]

where trddata_en is described in Table 25.

7.6.5 DFI 2.1 overview

The DFI is an interface protocol that defines the connectivity between a DDR memory controller (DDRCTRL) and a DDR physical interface (DDRPHY) for DDR memory devices (here: DDR3 and LPDDR2).

The protocol defines the signals, signal relationships, and timing parameters required to transfer control information and data to and from the DRAM devices over the DFI.

The DDRPHYC is supporting protocol version 2.1:

Interface signal groups

DFI is subdivided into the following interface groups:

DFI timing parameters

The DFI defines several timing parameters with fixed values and specified as a number of DFI clock cycles. Table 25 describes the DFI parameters applicable to DDRPHYC.

The DFI timings parameters are relevant for DDRCTRL which needs to be programmed accordingly.

Table 25. DFI timing parameters

NameDescriptionSDR modeNote
tctrl_delaySpecifies the number of DFI clock cycles after an assertion or deassertion of the DFI control signals that the control signals at the PHY-DRAM interface reflect the assertion or de-assertion. If the DFI clock and the memory clock are not phase-aligned, this timing parameter should be rounded up to the next integer value.2(1)
tphy_wrdataSpecifies the number of DFI clock cycles between when the dfi_wrdata_en signal is asserted to when the associated write data is driven on the dfi_wrdata signal.1-
tphy_wrlatSpecifies the number of DFI clocks between when a write command is sent on the DFI control interface and when the dfi_wrdata_en signal is asserted
Note: In LPDDR2 mode, the following settings must be used:
WL = MR2[3:0].WL + 1 (to account for tDQSS)
WL-1(2)(3)
(4)
trddata_enSpecifies the time from the assertion of a read command on the DFI to the assertion of the dfi_rddata_en signal.
Note: In LPDDR2 mode, the following settings must be used:
RL = MR2[3:0].RL + tDQSCK
RL-2(2)(3)
tphy_rdlatSpecifies the maximum number of cycles allowed from the assertion of the dfi_rddata_en signal to the assertion of the dfi_rddata_valid signal.15(5)
tdram_clk_disableSpecifies the number of clocks from the assertion of the dfi_dram_clk_disable signal on the DFI until the clock to the DRAM memory devices, at the PHY-DRAM boundary, maintains a low value2-
tdram_clk_enableSpecifies the number of clocks from the de-assertion of the dfi_dram_clk_disable signal on the DFI until the first valid rising edge of the clock to the DRAM devices at the PHYDRAM boundary.2-
tphyupd_type0Specifies the maximum number of DFI clocks that the dfi_phyupd_req signal may remain asserted after the assertion of the dfi_phyupd_ack signal for dfi_phyupd_type = 0.1(6)
tphyupd_respSpecifies the maximum number of DFI clock cycles after the assertion of the dfi_phyupd_req signal to the assertion of the dfi_phyupd_ack signal.64
tphyparitylatSpecifies the maximum number of DFI clock cycles between when the dfi_parity_in signal is driven and when the associated dfi_parity_error is returned.PL+6(7)
  1. Actual latencies are 1.25 but rounded up to the next integer as per DFI specification.
  2. For LPDDR2 device usage the WL is the SDRAM write latency (CAS write latency + additive latency + 1) to ensure that the LPDDR2 tDQSS is accounted for. For all other DDR device usage the WL is the SDRAM write latency (CAS write latency + additive latency). If an external controller wants to run the PHY in loopback mode, i.e. if LBMODE is set, then tphy_wrlat must be set to WL-2.
  3. In LPDDR2 mode, WL = MR2.WL + 1 and RL = MR2.RL + tDQSCK.
  4. RL is the SDRAM read latency (CAS latency + additive latency).
  5. The number includes the latency through the PHY (i.e. command latency plus read latency), plus maximum possible system latency that could be trained by the PUB.
  6. This corresponds to the maximum time required for updating ITMs.
  7. PL is the DIMM parity latency. it is N/A with current configuration.

7.7 PUBL registers

7.7.1 DDRPHYC revision ID register (DDRPHYC_RIDR)

Address offset: 0x000

Reset value: 0x0020 0200

31302928272625242322212019181716
UDRID[7:0]PHYMJR[3:0]PHYMDR[3:0]
rrrrrrrrrrrrrrrr
1514131211109876543210
PHYMNR[3:0]PUBMJR[3:0]PUBMDR[3:0]PUBMNR[3:0]
rrrrrrrrrrrrrrrr

Bits 31:24 UDRID[7:0]: User-defined rev ID

Bits 23:20 PHYMJR[3:0]: PHY maj rev

Bits 19:16 PHYMDR[3:0]: PHY moderate rev

Bits 15:12 PHYMNR[3:0]: PHY minor rev

Bits 11:8 PUBMJR[3:0]: PUB maj rev

Bits 7:4 PUBMDR[3:0]: PUB moderate rev

Bits 3:0 PUBMNR[3:0]: PUB minor rev

7.7.2 DDRPHYC PHY initialization register (DDRPHYC_PIR)

Address offset: 0x004

Reset value: 0x0000 0000

31302928272625242322212019181716
INITBYPZCALBYPLOCKBY
P
CLRSRRes.Res.Res.Res.Res.Res.Res.Res.Res.CTLDINITDLLBYPICPC
wwwwwww
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.RVTRNQSTRNDRAMINITDRAMRSTITMSRSTZCALDLLLOCKDLLSRSTINIT
wwwwwwwww

Bit 8 RVTRN:

it is expected that RVTRN and DQSTRN are run with LPDDR2/3; RVTRN is not required for DDR3

If RVTRN=1 and bit QSTRN=0, when bit INIT=1 (triggering the init process) the read DQS gate training algorithm still runs (as if bit QSTRN in DDRPHYC_PIR register was actually set to 1).

If it is necessary to run only RV training stand-alone, with no read DQS gate training, you can prevent the read DQS gate training from running by setting bit LBGDQS=1 in DDRPHYC_PGCR register.

Note: RV training cannot use multi-purpose register (MPR) and must use the user data programmed in DTDR0-1.

Bit 7 QSTRN: Read DQS training

Executes a PUBL training routine to determine the optimum position of the read data DQS strobe for maximum system timing margins.

Note: Read DQS training cannot use multi-purpose register (MPR) and must use the user data programmed in DTDR0-1.

Bit 6 DRAMINIT: DRAM initialization

Executes the DRAM initialization sequence

Bit 5 DRAMRST: DRAM reset (DDR3 only)

Issues a reset to the DRAM (by driving the DRAM reset pin low) and wait 200us.

This can be triggered in isolation or with the full DRAM initialization (DRAMINIT). For the latter case, the reset is issued and 200us is waited before starting the full initialization sequence.

Bit 4 ITMSRST: ITM reset

Soft resets the interface timing modules for the data and data strobes, i.e., it asserts the ITM soft reset (srstb) signal.

Bit 3 ZCAL: Impedance calibration (Driver and ODT)

Performs PHY impedance calibration.

Bit 2 DLLLOCK: DLL lock

Waits for the PHY DLLs to lock.

Bit 1 DLLSRST: DLL soft reset

Soft resets all PHY DLLs by driving the DLL soft reset pin.

Note: - Requires that ctl_clk be toggling for the DLL soft reset signal to be output from the DLL. If ctl_clk (AC DLL's cclk_0) is not guaranteed to be toggling, it is recommended to use the manual DLL soft reset bit DLLSRST of DDRPHYC_ACDLLCR, and not bit DLLSRST of DDRPHYC_PIR.

- Ensure that the minimum requirements for DLL bypass and DLL reset are observed while asserting this bit.

Bit 0 INIT: Initialization trigger

A write of '1' to this bit triggers the DDR system initialization, including PHY initialization, DRAM initialization, and PHY training.

The exact initialization steps to be executed are specified in bits 1 to 6 of this register. A bit setting of 1 means the step is executed as part of the initialization sequence, while a setting of '0' means the step is bypassed.

The initialization trigger bit is self-clearing.

7.7.3 DDRPHYC PHY global control register (DDRPHYC_PGCR)

Address offset: 0x008

Reset value: 0x0184 2E04

31302928272625242322212019181716
LBMODELBGDQSLBDQSSRFSHDT[3:0]PDDISDXZKSEL[1:0]RANKEN[3:0]IODDRM[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
IOLBCKINVCKDV[1:0]CKEN[2:0]DTOSEL[3:0]DFTLMT[1:0]DFTCMPDQSCFGITMDMD
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 LBMODE: Loop back mode

Indicates if set that the PHY/PUB is in loopback mode

Bit 30 LBGDQS: Loop back DQS gating

Selects the DQS gating mode that should be used when the PHY is in loopback mode. Valid values are:

0: DQS gate training is triggered on the PUB

1: DQS gate is set manually using software

Bit 29 LBDQSS: Loop back DQS shift

Selects how the read DQS is shifted during loopback to ensure that the read DQS is centered into the read data eye. Valid values are:

0: PUB sets the read DQS delay to 0; DQS is already shifted 90 degrees by write path

1: The read DQS shift is set manually through software.

Bits 28:25 RFSHDT[3:0]: Refresh during training

A non-zero value specifies that a burst of refreshes equal to the number specified in this field should be sent to the SDRAM after training each rank except the last rank.

Bit 24 PDDISDX: Power down disabled byte

Indicates if set that the DLL and I/Os of a disabled byte should be powered down.

Bits 23:22 ZKSEL[1:0]: Impedance clock divider selection

Selects the divide ratio for the clock used by the impedance control logic. The source clock for the divider is the configuration port clock signal (pclk), depending on which configuration port type used (see “Impedance Calibration” on page tbc).

Valid values are:

00: Divide by 2

01: Divide by 8

10: Divide by 32

11: Divide by 64

Bits 21:18 RANKEN[3:0]: Rank enable

Specifies the ranks that are enabled for data-training.

only Bit 0 is used and controls rank 0.

Setting the bit to ‘1’ enables the rank, and setting it to ‘0’ disables the rank.

Bit 2 DFTCMP: DQS drift compensation

Enables or disables DQS drift compensation. Valid values are:

0: Disables data strobe drift compensation

1: Enables data strobe drift compensation

By default, drift compensation is enabled.

Note: Drift compensation is not supported under any of the following situations:

- LPDDR2/3 (bit DDRMD set to LPDDR2 in DDRPHYC_DCR register)

- Burst length 2 (bit BL in DDRPHYC_MR0 register set to burst length of 2)

- Read DQS gating using passive windowing (bit DQSCFG in DDRPHYC_PGCR register set to passive windowing)

Drift compensation must be set to disabled if any of the above are set.

Bit 1 DQSCFG: DQS gating configuration

Selects one of the two DQS gating schemes:

0: DQS gating is shut off using the rising edge of DQS_b (active windowing mode)

1: DQS gating blankets the whole burst (passive windowing mode).

Note: Passive windowing must be used for LPDDR2/3.

Bit 0 ITMDMD: ITM DDR mode

Selects whether ITMS uses DQS and DQS# or it only uses DQS.

Valid values are:

0: ITMS uses DQS and DQS#

1: ITMS uses DQS only

Note: The correct setting is always DQS and DQS#.

7.7.4 DDRPHYC PHY global status register (DDRPHYC_PGSR)

Address offset: 0x00C

Reset value: 0x0000 0000

31302928272625242322212019181716
TQRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
r
1514131211109876543210
Res.Res.Res.Res.Res.Res.RVEIRRRVERRDFTERRDTIERRDTERRDTDONEDIDONEZCDDONEDLDONEIDONE
rrrrrrrrrr

Bit 31 TQ: Temperature output (LPDDR only) N/A

Bits 30:10 Reserved, must be kept at reset value.

Bit 9 RVEIRR: Read valid training intermittent error

If set, indicates that there was an intermittent error during read valid training, such as a pass was followed by a fail then followed by another pass.

Bit 8 RVERR: Read valid training error

If set, indicates that a valid read valid placement could not be found during read valid training.

Bit 7 DFTERR: DQS drift error

If set, indicates that at least one of the read data strobes has drifted by more than or equal to the drift limit set in the PHY General Configuration Register (PGCR).

7.7.5 DDRPHYC DDR DLL global control register (DDRPHYC_DLLGCR)

Address offset: 0x010

Reset value: 0x0373 7000

Register map diagram for DDRPHYC_DLLGCR showing bit fields from 31 to 0. The register is 32 bits wide. Bits 31-30: DLLRSVD2[1:0] (rw); Bit 29: LOCKDE (rw); Bits 28-27: FDTRMSL[1:0] (rw); Bits 26-24: SBIAS5_3[2:0] (rw); Bit 23: BPS200 (rw); Bits 22-20: SBIAS2_0[2:0] (rw); Bits 19-16: MBIAS[7:4] (rw); Bits 15-12: MBIAS[3:0] (rw); Bit 11: TESTSW (rw); Bits 10-9: ATC[1:0] (rw); Bits 8-6: DTC[2:0] (rw); Bit 5: TESTEN (rw); Bits 4-2: IPUMP[2:0] (rw); Bit 1-0: DRES[1:0] (rw).
31302928272625242322212019181716
DLLRSVD2[1:0]LOCKDEFDTRMSL[1:0]SBIAS5_3[2:0]BPS200SBIAS2_0[2:0]MBIAS[7:4]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MBIAS[3:0]TESTSWATC[1:0]DTC[2:0]TESTENIPUMP[2:0]DRES[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Register map diagram for DDRPHYC_DLLGCR showing bit fields from 31 to 0. The register is 32 bits wide. Bits 31-30: DLLRSVD2[1:0] (rw); Bit 29: LOCKDE (rw); Bits 28-27: FDTRMSL[1:0] (rw); Bits 26-24: SBIAS5_3[2:0] (rw); Bit 23: BPS200 (rw); Bits 22-20: SBIAS2_0[2:0] (rw); Bits 19-16: MBIAS[7:4] (rw); Bits 15-12: MBIAS[3:0] (rw); Bit 11: TESTSW (rw); Bits 10-9: ATC[1:0] (rw); Bits 8-6: DTC[2:0] (rw); Bit 5: TESTEN (rw); Bits 4-2: IPUMP[2:0] (rw); Bit 1-0: DRES[1:0] (rw).

Bit 5 TESTEN: Test enable

Enables digital and analog test outputs selected by DTC and ATC respectively.

Bits 4:2 IPUMP[2:0]: Charge pump current trim

000: maximum current

111: minimum current

Bits 1:0 DRES[1:0]: Trim reference current versus resistor value variation

00: Rnom

01: Rnom - 20%

1x: Rnom + 20%

Note: For a few processes this field is reserved and is not used by the DLL.

7.7.6 DDRPHYC AC DLL control register (DDRPHYC_ACDLLCR)

Address offset: 0x014

Reset value: 0x4000 0000

31302928272625242322212019181716
DLLDISDLLSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ATESTENRes.Res.
rwrwrw
1514131211109876543210
Res.Res.Res.Res.MFWDLY[2:0]MFBDLY[2:0]Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrw

Bit 31 DLLDIS: DLL disable

A disabled DLL is bypassed. By default DLL is enabled.

Note: DLL bypass must only be changed when DDRPHYC clock (dphy_ker_ck) is inactive.

Bit 30 DLLSRST: DLL soft reset

Soft resets the AC DLL by driving the DLL soft reset pin.

Note: DLL reset must only be changed to 0 when DDRPHYC clock (dphy_ker_ck) is inactive.

Bits 29:19 Reserved, must be kept at reset value.

Bit 18 ATESTEN: Analog test enable

Enables the analog test signal to be output on the DLL analog test output (ATO pin). The DLL analog test output is tri-stated when this bit is '0'.

Bits 17:12 Reserved, must be kept at reset value.

Bits 11:9 MFWDLY[2:0]: Master DLL feed-forward delay trim

Used to trim the delay in the master DLL feed-forward path:

000: minimum delay

111: maximum delay

Bits 8:6 MFBDLY[2:0]: Master DLL feed-back delay trim

Used to trim the delay in the master DLL feed-back path:

000: minimum delay

111: maximum delay

Bits 5:0 Reserved, must be kept at reset value.

7.7.7 DDRPHYC PT register 0 (DDRPHYC_PTR0)

Address offset: 0x018

Reset value: 0x0022 AF9B

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TITMSRST[3:0]TDLLLOCK[11:10]
rwrwrwrwrwrw
1514131211109876543210
TDLLLOCK[9:0]TDLLSRST[5:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:22 Reserved, must be kept at reset value.

Bits 21:18 TITMSRST[3:0]: ITM soft reset

Number of configuration clock cycles that the ITM soft reset pin must remain asserted when the soft reset is applied to the ITMs.

This must correspond to a value that is equal to or more than 8 controller clock cycles.

Default value corresponds to 8 controller clock cycles.

Bits 17:6 TDLLLOCK[11:0]: DLL lock time

Number of configuration clock cycles for the DLL to stabilize and lock, i.e. number of clock cycles from when the DLL reset pin is de-asserted to when the DLL has locked and is ready for use.

Default value corresponds to 5.12us at 533MHz.

Bits 5:0 TDLLSRST[5:0]: DLL soft reset

Number of configuration clock cycles that the DLL soft reset pin must remain asserted when the soft reset is triggered through the PHY initialization register (DDRPHYC_PIR).

This must correspond to a value that is equal to or more than 50ns or 8 controller clock cycles, whichever is bigger.

Default value corresponds to 50 ns at 533 MHz.

7.7.8 DDRPHYC PT register 1 (DDRPHYC_PTR1)

Address offset: 0x01C

Reset value: 0x0604 111D

31302928272625242322212019181716
Res.Res.Res.Res.Res.TDINIT1[7:0]TDINIT0[18:16]
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TDINIT0[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:27 Reserved, must be kept at reset value.

Bits 26:19 TDINIT1[7:0]: tDINIT1

DRAM initialization time corresponding to the following:
DDR3 = CKE high time to first command (tRFC +10 ns or 5 tCK, whichever value is larger)
LPDDR2 = CKE low time with power and clock stable (100 ns)
LPDDR3 = CKE low time with power and clock stable (100 ns)
Default value corresponds to DDR3 360ns at 533MHz.

Bits 18:0 TDINIT0[18:0]: tDINIT0

DRAM initialization time corresponding to the following:
DDR3 = CKE low time with power and clock stable (500 us)
LPDDR2 = CKE high time to first command (200 us)
LPDDR3 = CKE high time to first command (200us)
Default value corresponds to DDR3 500 us at 533MHz.

7.7.9 DDRPHYC PT register 2 (DDRPHYC_PTR2)

Address offset: 0x020

Reset value: 0x042D A072

31302928272625242322212019181716
Res.Res.Res.Res.Res.TDINIT3[9:0]TDINIT2[16]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TDINIT2[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:27 Reserved, must be kept at reset value.

Bits 26:17 TDINIT3[9:0]: tDINIT3

DRAM initialization time corresponding to the following:
LPDDR2 = Time from ZQ initialization command to first command (1 us)
LPDDR3 = Time from ZQ initialization command to first command (1us)
Default value corresponds to the LPDDR2/3 1 us at 533MHz.

Bits 16:0 TDINIT2[16:0]: tDINIT2

DRAM initialization time corresponding to the following:
DDR3 = Reset low time (200 us on power-up or 100 ns after power-up)
LPDDR2 = Time from reset command to end of auto initialization (1 us + 10 us = 11us)
LPDDR3 = Time from reset command to end of auto initialization (11us)
Default value corresponds to DDR3 200 us at 533MHz

7.7.10 DDRPHYC ACIOC register (DDRPHYC_ACIOCR)

Address offset: 0x024

Reset value: 0x3040 0812

31302928272625242322212019181716
ACSR[1:0]RSTIOMRSTPDRRSTPDDRSTODTRes.Res.Res.RANKPDRRes.Res.Res.CSPDDRes.Res.
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.RANKODTCKPDR[2:0]CKPDD[2:0]CKODT[2:0]ACPDRACPDDACODTACOEACIOM
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:30 ACSR[1:0]: AC slew rate

Selects slew rate of the I/O for all address and command pins.

Bit 29 RSTIOM: Reset I/O mode

Selects SSTL mode (when set to 0) or CMOS mode (when set to 1) of the I/O for SDRAM Reset.

Bit 28 RSTPDR: RST pin power down receiver

Powers down, when set, the input receiver on the I/O for SDRAM RST# pin.

Bit 27 RSTPDD: RST pin power down driver

Powers down, when set, the output driver on the I/O for SDRAM RST# pin.

Bit 26 RSTODT: RST pin ODT

Enables, when set, the on-die termination on the I/O for SDRAM RST# pin.

Bits 25:23 Reserved, must be kept at reset value.

Bit 22 RANKPDR: Rank power down receiver

Powers down, when set, the input receiver on the I/O CKE, ODT, and CS# pins.

Only RANKPDR[0] is used for single rank

Bits 21:19 Reserved, must be kept at reset value.

Bit 18 CSPDD: CS power down driver

Powers down, when set, the output driver on the I/O for CS# pins.

Only PDD[0] is used for single rank.

CKE and ODT driver power down is controlled by DSGCR register.

Bits 17:15 Reserved, must be kept at reset value.

Bit 14 RANKODT: Rank ODT

Enables, when set, the on-die termination on the I/O for CKE, ODT, and CS# pins.

Bits 13:11 CKPDR[2:0]: CK pin power down receiver

Powers down, when set, the input receiver on the I/O for CK[0], CK[1], and CK[2] pins, respectively

Bits 10:8 CKPDD[2:0]: CK pin power down driver

Powers down, when set, the output driver on the I/O for CK[0], CK[1], and CK[2] pins, respectively.

7.7.11 DDRPHYC DXCC register (DDRPHYC_DXCCR)

Address offset: 0x028

Reset value: 0x0000 0800

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.AWDT
rw
1514131211109876543210
RVSELDQSNRSTRes.Res.DQSNRES[3:0]DQSRES[3:0]DXPDRDXPDDDXIOMDXODT
rwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:17 Reserved, must be kept at reset value.

Bits 13:12 Reserved, must be kept at reset value.

Bits 11:8 DQSNRES[3:0]: DQS# resistor

Selects the on-die pull-up/pull-down resistor for DQS# pins. Same encoding as DQSRES.

Note: DQS# resistor must be connected for LPDDR2.

Bits 7:4 DQSRES[3:0]: DQS resistor

Selects the on-die pull-down/pull-up resistor for DQS pins.

DQSRES[3] selects pull-down (when set to 0) or pull-up (when set to 1).

DQSRES[2:0] selects the resistor value as follows:

000: Open: On-die resistor disconnected

001: 688 Ω

010: 611 Ω

011: 550 Ω

100: 500 Ω

101: 458 Ω

110: 393 Ω

111: 344 Ω

Note: DQS resistor must be connected for LPDDR2

Bit 3 DXPDR: Data power down receiver

Powers down, when set, the input receiver on I/O for DQ, DM, and DQS/DQS# pins of all DATX8 macros. It also powers down the PDQSR cell of all DAXT8 macros. This bit is ORed with the PDR and DQSRPD configuration bits of the individual DATX8

Bit 2 DXPDD: Data power down driver

Powers down, when set, the output driver on I/O for DQ, DM, and DQS/DQS# pins of all DATX8 macros. This bit is ORed with the PDD configuration bit of the individual DATX8.

Bit 1 DXIOM: Data I/O mode

Selects SSTL mode (when set to 0) or CMOS mode (when set to 1) of the I/O for DQ, DM, and DQS/DQS# pins of all DATX8 macros. This bit is ORed with the IOM configuration bit of the individual DATX8.

Bit 0 DXODT: Data on die termination

Enables, when set, the on-die termination on the I/O for DQ, DM, and DQS/DQS# pins of all DATX8 macros. This bit is ORed with the ODT configuration bit of the individual DATX8.

7.7.12 DDRPHYC DSGC register (DDRPHYC_DSGCR)

Address offset: 0x02C

Reset value: 0xFA00 001F

31302928272625242322212019181716
CKEOERSTOEODTOECKOETPDOETPDPDNL2OENL2PDRes.Res.Res.ODTPDDRes.Res.Res.CKEPDD
rwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.FXDLATNOBUBDQSGE[2:0]DQSGX[2:0]LPDLLPDLPIOPDZUENBDISENPUREN
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 10:8 DQSGE[2:0]: DQS gate early

Specifies the number of clock cycles for which the DQS gating must be enable dearlier than its normal position. Only applicable when using PDQSR I/O cell, passive DQS gating and no drift compensation.

This field is recommended to be set to zero for all DDR types other than LPDDR2/LPDDR3. For LPDDR2/LPDDR3 it should be set to (tDQSCKmax-tDQSCKmin) divide by clock period and rounded up. tDQSCKmax and tDQSCKmin can be found in the LPDDR/LPDDR2 vendor datasheet.

Bits 7:5 DQSGX[2:0]: DQS gate extension

Specifies the number of clock cycles for which the DQS gating must be extended beyond the normal burst length width. Only applicable when using PDQSR I/O cell, passive DQS gating and no drift compensation.

This field is recommended to be set to zero for all DDR types other than LPDDR2/LPDDR3. For LPDDR2/LPDDR3 it should be set to (tDQSCKmax-tDQSCKmin) divide by clock period and rounded up. tDQSCKmax and tDQSCKmin can be found in the LPDDR2 vendor datasheet.

Bit 4 LPDLLPD: Low power DLL power down

Specifies if set that the PHY should respond to the DFI low power opportunity request and power down the DLL of the PHY if the wakeup time request satisfies the DLL lock time.

For more information on requirements when enabling and disabling the DLL, refer to “bypass mode register control”

Bit 3 LPIOPD: Low power I/O power down

Specifies if set that the PHY should respond to the DFI low power opportunity request and power down the I/Os of the PHY.

Bit 2 ZUEN: zcal on DFI update request

Specifies if set that the PHY should perform impedance calibration (update) whenever there is a controller initiated DFI update request. Otherwise the PHY ignores an update request from the controller.

Bit 1 BDISEN: Byte disable enable

Specifies if set that the PHY should respond to DFI byte disable request. Otherwise the byte disable from the DFI is ignored in which case bytes can only be disabled using the DXnGCR register

Bit 0 PUREN: PHY update request enable

Specifies if set, that the PHY should issue PHY initiated DFI update request when there is DQS drift of more than \(\frac{3}{4}\) of a clock cycle within one continuous (back-to-back) read burst.

By default the PHY issues PHY initiated update requests and the controller should respond otherwise the PHY may return erroneous values.

The option to disable it is provided only for silicon evaluation and testing.

7.7.13 DDRPHYC DC register (DDRPHYC_DCR)

Address offset: 0x030

Reset value: 0x0000 000B

31302928272625242322212019181716
TPDRDIMMUDIMMDDR2TNOSRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.DDRTYPE[1:0]MPRDQPDQ[2:0]DDR8BNKDDRMD[2:0]
rwrwrwrwrwrwrwrwrwrw

Bit 31 TPD: Test power down (N/A LPDDR only)

If set it places the DRAM in deep power down mode.

Bit 30 RDIMM: Registered DIMM

Indicates if set that a registered DIMM is used. In this case, the PUBL increases the SDRAM write and read latencies (WL/RL) by 1.

This only applies to PUBL internal SDRAM transactions. Transactions generated by the controller must make its own adjustments to WL/RL when using a registered DIMM

Bit 29 UDIMM: Unbuffered DIMM

Indicates if set that there is address mirroring on the second rank of an un-buffered DIMM (the rank connected to CS#[1]).

In this case, the PUBL re-scrambles the bank and address when sending mode register commands to the second rank.

This only applies to PUBL internal SDRAM transactions. Transactions generated by the controller must make its own adjustments when using an un-buffered DIMM. DCR[NOSRA] must be set if address mirroring is enabled.

Bit 28 DDR2T: 2T timing

Indicates if set that 2T timing should be used by PUB internally generated SDRAM transactions.

Bit 27 NOSRA: No simultaneous rank access

Specifies if set that simultaneous rank access on the same clock cycle is not allowed. This means that multiple chip select signals should not be asserted at the same time. This may be required on some DIMM systems.

Bits 26:10 Reserved, must be kept at reset value.

Bits 9:8 DDRTYPE[1:0]: DDR type (LPDDR2 S4)

Selects the DDR type for the specified LPDDR mode.

Valid values for LPDDR2 are:

00: LPDDR2-S4

01: LPDDR2-S2

Others: Reserved

Bit 7 MPRDQ: MPR DQ

Specifies the value that is driven on non-primary DQ pins during MPR reads.

Valid values are:

0: Primary DQ drives out the data from MPR (0-1-0-1); non-primary DQs drive '0'

1: Primary DQ and non-primary DQs all drive the same data from MPR (0-1-0-1)

Bits 6:4 PDQ[2:0]: Primary DQ(DDR3 Only)

Specifies the DQ pin in a byte that is designated as a primary pin for Multi-Purpose Register (MPR) reads. Valid values are 0 to 7 for DQ[0] to DQ[7], respectively

Bit 3 DDR8BNK: DDR 8 banks

Indicates if set that the SDRAM used has 8 banks. tRPA = tRP+1 and tFAW are used for 8-bank DRAMs, other tRPA = tRP and no tFAW is used.

Note: A setting of 1 for DRAMs that have fewer than 8 banks still results in correct functionality but less tighter DRAM command spacing for the parameters described here.

Bits 2:0 DDRMD[2:0]: SDRAM DDR mode

011: DDR3

100: LPDDR2 (Mobile DDR2)

101: LPDDR3 (Mobile DDR3)

Others: Reserved

7.7.14 DDRPHYC DTP register 0 (DDRPHYC_DTPR0)

Address offset: 0x034

Reset value: 0x3092 666E

31302928272625242322212019181716
TCCDTRC[5:0]TRRD[3:0]TRAS[4:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TRCD[3:0]TRP[3:0]TWTR[2:0]TRTP[2:0]TMRD[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 TCCD: tCCDRead to read and write to write command delay

0: BL/2 for DDR2 and 4 for DDR3

1: BL/2 + 1 for DDR2 and 5 for DDR3

Bits 30:25 TRC[5:0]: tRC

Activate to activate command delay (same bank). Valid values are 2 to 42.

Bits 24:21 TRRD[3:0]: tRRD

Activate to activate command delay (different banks). Valid values are 1 to 8.

Bits 20:16 TRAS[4:0]: tRAS

Activate to precharge command delay. Valid values are 2 to 31.

Bits 15:12 TRCD[3:0]: tRCD

Activate to read or write delay. Minimum time from when an activate command is issued to when a read or write to the activated row can be issued. Valid values are 2 to 11.

Bits 11:8 TRP[3:0]: tRP

Precharge command period: The minimum time between a precharge command and any other command.

Note: Note that the controller automatically derives tRPA for 8-bank DDR2 devices by adding 1 to tRP. Valid values are 2 to 11.

Bits 7:5 TWTR[2:0]: tWTR

Internal write to read command delay. Valid values are 1 to 6.

Bits 4:2 TRTP[2:0]: tRTP

Internal read to precharge command delay. Valid values are 2 to 6. Note that even though RTP does not apply to JEDEC DDR devices, this parameter must still be set to a minimum value of 2 for DDR because the Controller always uses the DDR2 equation, AL+BL/2+max(RTP,2)-2, to compute the read to precharge timing (which is BL/2 for JEDEC DDR).

Bits 1:0 TMRD[1:0]: tMRD

Load mode cycle time: The minimum time between a load mode register command and any other command.

For DDR3 this is the minimum time between two load mode register commands.

For DDR3, the value used for tMRD is 4 plus the value programmed in these bits, i.e. tMRD value for DDR3 ranges from 4 to 7.

For LPDDR3, the value used for tMRD is 8 plus the value programmed in these bits.

7.7.15 DDRPHYC DTP register 1 (DDRPHYC_DTPR1)

Address offset: 0x038

Reset value: 0x0983 0090

31302928272625242322212019181716
Res.Res.TDQSCKMAX[2:0]TDQSCKMIN[2:0]TRFC[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.TRTODTMOD[1:0]TFAW[5:0]TRTWTAOND[1:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:27 TDQSCKMAX[2:0]: tDQSCKmax

Maximum DQS output access time from CK/CK# (LPDDR2 only).

This value is used for implementing read-to-write spacing. Valid values are 1 to 7.

Bits 26:24 TDQSCKMIN[2:0]: tDQSCKmin

DQS output access time from CK/CK# (LPDDR2/3 only).

This value is used for computing the read latency. Valid values are 0 to 7.

This value is derived from the corresponding parameter in the SDRAM datasheet divided by the clock cycle time without rounding up.

The fractional remainder is automatically adjusted for by data training in quarter clock cycle units.

If data training is not performed then this fractional remainder must be converted to quarter clock cycle units and the gating registers (DXnDQSTR) adjusted accordingly.

Bits 23:16 TRFC[7:0]: tRFC

Refresh-to-Refresh: Indicates the minimum time, in clock cycles, between two refresh commands or between a refresh and an active command. This is derived from the minimum refresh interval from the datasheet, tRFC(min), divided by the clock cycle time.

The default number of clock cycles is for the largest JEDEC tRFC(min) parameter value supported.

Bits 15:12 Reserved, must be kept at reset value.

Bit 11 TRTODT: tRTODT

Read to ODT delay (DDR3 only). Specifies whether ODT can be enabled immediately after the read post-amble or one clock delay has to be added.

Valid values are:

0: ODT may be turned on immediately after read post-amble

1: ODT may not be turned on until one clock after the read post-amble

If tRTODT is set to 1, then the read-to-write latency is increased by 1 if ODT is enabled.

Bits 10:9 TMOD[1:0]: tMOD

Load mode update delay (DDR3 only). The minimum time between a load mode register command and a non-load mode register command.

Valid values are:

00: 12

01: 13

10: 14

11: 15

Bits 8:3 TFAW[5:0]: tFAW

4-bank activate period. No more than 4-bank activate commands may be issued in a given tFAW period. Only applies to 8-bank devices.

Valid values are 2 to 31.

Bit 2 TRTW: tRTW

Read to Write command delay.

Valid values are:

0: standard bus turn around delay

1: add 1 clock to standard bus turn around delay

This parameter allows the user to increase the delay between issuing Write commands to the SDRAM when preceded by Read commands. This provides an option to increase bus turn-around margin for high frequency systems.

Bits 1:0 TAOND[1:0]: tAOND/tAOFD

ODT turn-on/turn-off delays (DDR2 only). The delays are in clock cycles.

Valid values are:

00: 2/2.5

01: 3/3.5

10: 4/4.5

11: 5/5.5

Most DDR2 devices utilize a fixed value of 2/2.5. For non-standard SDRAMs, the user must ensure that the operational Write Latency is always greater than or equal to the ODT turn-on delay. For example, a DDR2 SDRAM with CAS latency set to 3 and CAS additive latency set to 0 has a Write Latency of 2. Thus 2/2.5 can be used, but not 3/3.5 or higher.

7.7.16 DDRPHYC DTP register 2 (DDRPHYC_DTPR2)

Address offset: 0x03C

Reset value: 0x1001 A0C8

31302928272625242322212019181716
Res.Res.Res.TDLLK[9:0]TCKE[3:1]
rwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TCKE[0]TXP[4:0]TXS[9:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:19 TDLLK[9:0]: tDLLK

DLL locking time. Valid values are 2 to 1023.

Bits 18:15 TCKE[3:0]: tCKE

CKE minimum pulse width. Also specifies the minimum time that the SDRAM must remain in power down or self refresh mode. For DDR3 this parameter must be set to the value of tCKESR which is usually bigger than the value of tCKE. Valid values are 2 to 15.

Bits 14:10 TXP[4:0]: tXP

Power down exit delay. The minimum time between a power down exit command and any other command. This parameter must be set to the maximum of the various minimum power down exit delay parameters specified in the SDRAM datasheet, i.e. max(tXP, tXARD, tXARDS) for DDR2 and max(tXP, tXPDLL) for DDR3. Valid values are 2 to 31.

Bits 9:0 TXS[9:0]: tXS

Self refresh exit delay. The minimum time between a self refresh exit command and any other command. This parameter must be set to the maximum of the various minimum self refresh exit delay parameters specified in the SDRAM datasheet, i.e. max(tXSNR, tXSRD) for DDR2 and max(tXS, tXSDLL) for DDR3. Valid values are 2 to 1023.

7.7.17 DDRPHYC MR0 register for DDR3 (DDRPHYC_DDR3_MR0)

Address offset: 0x040

Reset value: 0x0A52

1514131211109876543210
RSVD[2:0]PDWR[2:0]DRTMCL[3:1]BTCL0BL[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 15:13 RSVD[2:0]: JEDEC reserved.

Bit 12 PD: Power-down control

Controls the exit time for power-down modes. Refer to SDRAM datasheet for details on power-down modes. Valid values are:

0: Slow exit (DLL off)

1: Fast exit (DLL on)

Bits 11:9 WR[2:0]: Write recovery

This is the value of the write recovery in clock cycles. It is calculated by dividing the data sheet write recovery time, tWR (ns) by the data sheet clock cycle time, tCK (ns) and rounding up a non-integer value to the next integer.

Valid values are:

001: 5

010: 6

011: 7

100: 8

101: 10

110: 12

All other settings are reserved and should not be used.

Note: tWR (ns) is the time from the first SDRAM positive clock edge after the last data-in pair of a write command, to when a precharge of the same bank can be issued.

Bit 8 DR: DLL reset (autoclear)

Writing a ‘1’ to this bit resets the SDRAM DLL. This bit is self clearing,
i.e. it returns back to ‘0’ after the DLL reset has been issued.

Bit 7 TM: Operating mode

Selects either normal operating mode (0) or test mode (1). Test mode is reserved for the manufacturer and should not be used.

Bit 3 BT: Burst type

Indicates whether a burst is sequential (0) or interleaved (1).

Bits 6, 5, 4, 2 CL[3:0]: CAS latency

The delay, in clock cycles, between when the SDRAM registers a read command to when data is available.

Valid values for CL[3:0] are:

0010: 5

0100: 6

0110: 7

1000: 8

1010: 9

1100: 10

1110: 11

Others: Reserved

Bits 1:0 BL[1:0]: Burst length

Determines the maximum number of column locations that can be accessed during a given read or write command.

Valid values for DDR3 are:

00: 8 (Fixed)

01: 4 or 8 (On the fly)

10: 4 (Fixed)

11: Reserved

7.7.18 DDRPHYC MR1 register for DDR3 (DDRPHYC_DDR3_MR1)

Address offset: 0x044

Reset value: 0x0000

1514131211109876543210
Res.Res.Res.QOFFTDQSRes.RTT2Res.LEVELRTT1DIC1AL[1:0]RTT0DIC0DE
rwrwrwrwrwrwrwrwrwrwrw

Bits 15:13 Reserved, must be kept at reset value.

Bit 12 QOFF: Output enable/disable
0: all outputs function as normal
1: all SDRAM outputs are disabled removing output buffer current.
This feature is intended to be used for IDD characterization of read current and should not be used in normal operation.

Bit 11 TDQS: Termination data strobe
When enabled ('1') TDQS provides additional termination resistance outputs that may be useful in some system configurations. (N/A)

Bit 10 Reserved, must be kept at reset value.

Bit 8 Reserved, must be kept at reset value.

Bit 7 LEVEL: Write leveling enable (N/A)

Bits 4:3 AL[1:0]: Posted CAS Additive Latency:
Setting additive latency that allows read and write commands to be issued to the SDRAM earlier than normal (refer to SDRAM datasheet for details). Valid values are:
00: 0 (AL disabled)
01: CL - 1
10: CL - 2
11: Reserved

ST logo
ST logo

7.7.19 DDRPHYC MR1 register for LPDDR2 [alternate]
(DDRPHYC_LPDDR2_MR1)

Address offset: 0x044

Reset value: 0x0000

1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.NWR[2:0]WCBTBL[2:0]
rwrwrwrwrwrwrwrw

Bits 15:8 Reserved, must be kept at reset value.

Bit 4 WC: Wrap control
0: wrap
1: no wrap

Bit 3 BT: Burst Type: Indicates whether a burst is sequential (0) or interleaved (1). ,

Bits 2:0 BL[2:0]: Burst length
Determines the maximum number of column locations that can be accessed during a given read or write command. Valid values are:
010: 4
011: 8
100: 16
Others: Reserved

7.7.20 DDRPHYC MR1 register for LPDDR3 [alternate]
(DDRPHYC_LPDDR3_MR1)

Address offset: 0x044

Reset value: 0x0000

1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.NWR[2:0]Res.Res.BL[2:0]
rwrwrwrwrwrw

Bits 15:8 Reserved, must be kept at reset value.

Bits 7:5 NWR[2:0]: Write recovery
If nWRE (MR2 [4]) = 0:
- 001: nWR=3
- 100: nWR=6
- 110: nWR=8
- 111: nWR=9
If nWRE (MR2[4]) = 1:
- 000: nWR=10
- 001: nWR=11
- 010: nWR=12
Others: Reserved

Bits 4:3 Reserved, must be kept at reset value.

Bits 2:0 BL[2:0]: Burst length
Determines the maximum number of column locations that can be accessed during a given read or write command.
011: 8
Others: Reserved

ST logo
ST logo

7.7.21 DDRPHYC MR2 register for DDR3 (DDRPHYC_DDR3_MR2)

Address offset: 0x048

Reset value: 0x0000

1514131211109876543210
Res.Res.Res.Res.Res.RTTWR[1:0]Res.SRTASRCWL[2:0]PASR[2:0]
rwrwrwrwrwrwrwrwrwrw

Bits 15:11 Reserved, must be kept at reset value.

Bits 10:9 RTTWR[1:0]: Dynamic ODT

Selects RTT for dynamic ODT.

00: Dynamic ODT off

01: RZQ/4

10: RZQ/2

11: Reserved

Bit 8 Reserved, must be kept at reset value.

Bit 7 SRT: Self-refresh temperature range

Selects either normal ('0') or extended ('1') operating temperature range during self-refresh.

Bit 6 ASR: Auto self-refresh

When enabled ('1'), SDRAM automatically provides self-refresh power management functions for all supported operating temperature values.

Otherwise the SRT bit must be programmed to indicate the temperature range.

Bits 5:3 CWL[2:0]: CAS write latency

The delay, in clock cycles, between when the SDRAM registers a write command to when write data is available.

000: 5 (tCK = 2.5ns)

001: 6 (2.5ns > tCK = 1.875ns)

010: 7 (1.875ns > tCK = 1.5ns)

011: 8 (1.5ns > tCK = 1.25ns)

Others: Reserved

Bits 2:0 PASR[2:0]: Partial array self-refresh

Specifies that data located in areas of the array beyond the specified location are lost if self refresh is entered.

Valid settings for 8 banks are:

000: Full Array

001: Half Array (BA[2:0] = 000, 001, 010 & 011)

010: Quarter Array (BA[2:0] = 000, 001)

011: 1/8 Array (BA[2:0] = 000)

100: 3/4 Array (BA[2:0] = 010, 011, 100, 101, 110 & 111)

101: Half Array (BA[2:0] = 100, 101, 110 & 111)

110: Quarter Array (BA[2:0] = 110 & 111)

111: 1/8 Array (BA[2:0] 111)

7.7.22 DDRPHYC MR2 register for LPDDR2 [alternate]
(DDRPHYC_LPDDR2_MR2)

Address offset: 0x048

Reset value: 0x0000

1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RLWL[2:0]
rwrwrw

Bits 15:3 Reserved, must be kept at reset value.

Bits 2:0 RLWL[2:0]: Read and write latency

001: RL = 3 /WL = 1

010: RL = 4 / WL = 2

011: RL = 5 / WL = 2

100: RL = 6 / WL = 3

101: RL = 7 / WL = 4

110: RL = 8 / WL = 4

Others: Reserved

7.7.23 DDRPHYC MR2 register for LPDDR3 [alternate]
(DDRPHYC_LPDDR3_MR2)

Address offset: 0x048

Reset value: 0x0000

1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.WRWLRes.NWRERes.RLWL[2:0]
rwrwrwrwrwrw

Bits 15:8 Reserved, must be kept at reset value.

Bit 7 WR: New for LPDDR3 (not used by this PHY, leave at zero)

Bit 6 WL: New for LPDDR3 (not used by this PHY, leave at zero)

Bit 5 Reserved, must be kept at reset value.

Bit 4 NWRE: New for LPDDR3 (not used by this PHY, leave at zero)

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 RLWL[2:0]: Read and write latency

001: RL = 3 /WL = 1

010: RL = 4 / WL = 2

011: RL = 5 / WL = 2

100: RL = 6 / WL = 3

101: RL = 7 / WL = 4

110: RL = 8 / WL = 4

Others: Reserved

7.7.24 DDRPHYC MR3 register for DDR3 (DDRPHYC_DDR3_MR3)

Address offset: 0x04C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MPRMPRLOC[1:0]
rwrwrw

Bits 31:3 Reserved, must be kept at reset value.

Bit 2 MPR: Multi-purpose register enable

Enables, if set, that read data should come from the Multi-Purpose Register. Otherwise read data come from the DRAM array.

Bits 1:0 MPRLOC[1:0]: Multi-purpose register (MPR) location

Selects MPR data location.

00: Predefined pattern for system calibration

Others: Reserved

7.7.25 DDRPHYC MR3 register for LPDDR2 [alternate] (DDRPHYC_LPDDR2_MR3)

Address offset: 0x04C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DS[3:0]
rwrwrwrw

Bits 31:4 Reserved, must be kept at reset value.

Bits 3:0 DS[3:0]: Drive strength

Valid values are:

0000: Reserved

0001: 34.3 Ω typical

0010: 40 Ω typical

0011: 48 Ω typical

0100: 60 Ω typical

0101: Reserved

0110: 80 Ω typical

0111: 120 Ω typical

Others: Reserved

7.7.26 DDRPHYC MR3 register for LPDDR3 [alternate]
(DDRPHYC_LPDDR3_MR3)

Address offset: 0x04C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PDCTL[1:0]DQ[1:0]
rwrwrwrw

Bits 31:4 Reserved, must be kept at reset value.

Bits 3:2 PDCTL[1:0]: Power-down control

00: ODT disabled by DRAM during power-down

01: ODT enabled by DRAM during power-down

Others: Reserved

Bits 1:0 DQ[1:0]: ODT on-die termination

00: Disable (default)

01: Rzq/4 (see note)

10: Rzq/2

11: Rzq/1

Note: Rzq/4 is optional for LPDDR3-1066 devices.

7.7.27 DDRPHYC ODTc register (DDRPHYC_ODTCR)

Address offset: 0x050

Reset value: 0x0001 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WRODT
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RDODT
rw

Bits 31:17 Reserved, must be kept at reset value.

Bit 16 WRODT:

Specifies whether ODT should be enabled ('1') or disabled ('0') on write

Bits 15:1 Reserved, must be kept at reset value.

Bit 0 RDODT:

Specifies whether ODT should be enabled ('1') or disabled ('0') on read

7.7.28 DDRPHYC DTA register (DDRPHYC_DTAR)

Address offset: 0x054

Reset value: 0x0000 0000

31302928272625242322212019181716
DTMPRDTBANK[2:0]DTROW[15:4]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DTROW[3:0]DTCOL[11:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 DTMPR: Data training using MPR (DDR3 Only):

Specifies, if set, that data-training should use the SDRAM Multi-Purpose Register (MPR) register. Otherwise data-training is performed by first writing to some locations in the SDRAM and then reading the back.

Bits 30:28 DTBANK[2:0]: Data training bank address:

Selects the SDRAM bank address to be used during data training.

Bits 27:12 DTROW[15:0]: Data training row address:

Selects the SDRAM row address to be used during data training.

Bits 11:0 DTCOL[11:0]: Data training column address:

Selects the SDRAM column address to be used during data training.
The lower four bits of this address must always be “0000”.

7.7.29 DDRPHYC DTD register 0 (DDRPHYC_DTDR0)

Address offset: 0x058

Reset value: 0xDD22 EE11

31302928272625242322212019181716
DTBYTE3[7:0]DTBYTE2[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DTBYTE1[7:0]DTBYTE0[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 DTBYTE3[7:0]: Data training data

The first 4 bytes (e.g. shifted as Byte 0,1,2,3) of data used during data training. This same data byte is used for each Byte Lane.

Default sequence is a walking 1 while toggling data every data cycle.

Bits 23:16 DTBYTE2[7:0]: Data Training Data

Bits 15:8 DTBYTE1[7:0]: Data Training Data

Bits 7:0 DTBYTE0[7:0]: Data Training Data

7.7.30 DDRPHYC DTD register 1 (DDRPHYC_DTDR1)

Address offset: 0x05C

Reset value: 0x7788 BB44

31302928272625242322212019181716
DTBYTE7[7:0]DTBYTE6[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DTBYTE5[7:0]DTBYTE4[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 DTBYTE7[7:0]: Data training data:

The second 4 bytes (e.g. shifted as Byte 4,5,6,7) of data used during data training. This same data byte is used for each Byte Lane.

Default sequence is a walking 1 while toggling data every data cycle.

Bits 23:16 DTBYTE6[7:0]: Data Training Data

Bits 15:8 DTBYTE5[7:0]: Data Training Data

Bits 7:0 DTBYTE4[7:0]: Data Training Data

7.7.31 DDRPHYC general purpose register 0 (DDRPHYC_GPR0)

Address offset: 0x178

Reset value: 0x0000 0000

31302928272625242322212019181716
GPR0[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
GPR0[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 GPR0[31:0]: General purpose register 0 bits

7.7.32 DDRPHYC general purpose register 1 (DDRPHYC_GPR1)

Address offset: 0x17C

Reset value: 0x0000 0000

31302928272625242322212019181716
GPR1[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
GPR1[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 GPR1[31:0]: General purpose register 1 bits

7.7.33 DDRPHYC ZQ0C register 0 (DDRPHYC_ZQ0CR0)

Address offset: 0x180

Reset value: 0x0000 014A

31302928272625242322212019181716
ZQPDZCALZCALBYPZDENRes.Res.Res.Res.Res.Res.Res.Res.ZDATA[19:16]
rwrwrwrwrwrwrwrw
1514131211109876543210
ZDATA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 ZQPD: ZCAL power down

Powers down, if set, the PZQ cell.

Bit 30 ZCAL: ZCAL trigger

Impedance Calibration Trigger: A write of '1' to this bit triggers impedance calibration to be performed by the impedance control logic.

The impedance calibration trigger bit is self-clearing and returns back to '0' when the calibration is complete.

Note: If ZDEN is set, then the ZCAL bit should be set to 0.

Bit 29 ZCALBYP: Impedance calibration bypass

Impedance Calibration Bypass: Disables, if set, impedance calibration of this ZQ control block when impedance calibration is triggered globally using the ZCAL bit of DDRPHYC_PIR. Impedance calibration of this ZQ block may be triggered manually using ZCAL.

Bit 28 ZDEN: Impedance override enable

Impedance Over-ride Enable: When this bit is set, it allows users to directly drive the impedance control using the data programmed in the ZQDATA field. Otherwise, the control is generated automatically by the impedance control logic.

Note: If ZDEN is set, then the ZCAL bit should be set to 0.

Bits 27:20 Reserved, must be kept at reset value.

Bits 19:0 ZDATA[19:0]: Impedance override

Impedance Over-Ride Data: Data used to directly drive the impedance control.

ZDATA field mapping for D3R I/Os is as follows:

ZDATA[27:20] is reserved and returns zeros on reads

ZDATA[19:15] is used to select the pull-up on-die termination impedance

ZDATA[14:10] is used to select the pull-down on-die termination impedance

ZDATA[9:5] is used to select the pull-up output impedance

ZDATA[4:0] is used to select the pull-down output impedance

Note: See mPHY ST40c25 Datasheet for ZDATA encoding, default value is: ODT pulp-up/down set to hi-impedance and pull-up/down set to ~44.5 Ω for DDR3, 48.8 Ω for DDR3L, 55.5 Ω for LPDDR2 typical corner 25C

7.7.34 DDRPHYC ZQ0CR1 register (DDRPHYC_ZQ0CR1)

Address offset: 0x184

Reset value: 0x7B

76543210
ZPROG[7:4]ZPROG[3:0]
rwrwrwrwrwrwrwrw

Bits 7:4 ZPROG[7:4]: Impedance divide ratio to ext R

Impedance divide ratio: selects the external resistor divide ratio to be used to set the output impedance and the on-die termination as follows:

ZPROG[7:4] = On-die termination divide select (with RZQ = 240 Ω ±1%)

Bits 3:0 ZPROG[3:0]: Impedance divide ratio to ext R

Impedance divide ratio: selects the external resistor divide ratio to be used to set the output impedance and the on-die termination as follows:

ZPROG[3:0] = Output impedance divide select (with RZQ = 240 Ω ±1%)

7.7.35 DDRPHYC ZQ0S register 0 (DDRPHYC_ZQ0SR0)

Address offset: 0x188

Reset value: 0x0000 014A

31302928272625242322212019181716
ZDONEZERRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.ZCTRL[19:16]
rrrrrr
1514131211109876543210
ZCTRL[15:0]
rrrrrrrrrrrrrrrr

7.7.36 DDRPHYC ZQ0S register 1 (DDRPHYC_ZQ0SR1)

Address offset: 0x18C

Reset value: 0x00

76543210
OPU[1:0]OPD[1:0]ZPU[1:0]ZPD[1:0]
rrrrrrrr
ST logo
ST logo

Bits 7:6 OPU[1:0]: opu calibration status
On-Die termination (ODT) pull-up calibration status.
00: Completed with no errors
01: Overflow error
10: Underflow error
11: Calibration in progress

Bits 5:4 OPD[1:0]: opd calibration status
On-Die termination (ODT) pull-down calibration status.
00: Completed with no errors
01: Overflow error
10: Underflow error
11: Calibration in progress

Bits 3:2 ZPU[1:0]: zpu calibration status
Output impedance pull-up calibration status. Valid status encodings are:
00: Completed with no errors
01: Overflow error
10: Underflow error
11: Calibration in progress

Bits 1:0 ZPD[1:0]: zpd calibration status
Output impedance pull-down calibration status. Valid status encodings are:
00: Completed with no errors
01: Overflow error
10: Underflow error
11: Calibration in progress

7.7.37 DDRPHYC byte lane n GC register (DDRPHYC_DXnGCR)

Address offset: 0x1C0 + 0x40 * n, (n = 0 to 3)

Reset value: 0x0001 0E81

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.R0RVSL[2]
rw
1514131211109876543210
R0RVSL[1:0]RTTOALRTTOH[1:0]DQRTTDQSRTTDSEN[1:0]DQSRPDDXPDRDXPDDDXIOMDQODTDQSODTDXEN
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
ST logo
ST logo

Bits 31:17 Reserved, must be kept at reset value.

Bits 16:14 R0RVSL[2:0]: Read valid system latency in steps

Used to specify the read valid system latency relative to the ideal placement of the ITMD read valid signal when bit RVSEL in DDRPHYC_DXCCR register is set to 0.

Power-up default is 011 (i.e. ideal placement of the read valid signal).

The RVSL fields are initially set by the PUB during automatic read valid training but these values can be overwritten by a direct write to this register.

Valid values are:

000: read valid system latency = ideal placement - 3

001: read valid system latency = ideal placement - 2

010: read valid system latency = ideal placement - 1

011: read valid system latency = ideal placement

100: read valid system latency = ideal placement + 1

101: read valid system latency = ideal placement + 2

110: read valid system latency = ideal placement + 3

Others: Reserved

Bit 13 RTTOAL: RTT ON additive latency

Indicates when the ODT control of DQ/DQS SSTL I/Os is set to the value in DQODT/DQSODT during read cycles.

Valid values are:

0: ODT control is set to DQSODT/DQODT almost two cycles before read data preamble

1: ODT control is set to DQSODT/DQODT almost one cycle before read data preamble

Bits 12:11 RTTOH[1:0]: RTT output hold

Indicates the number of clock cycles (from 0 to 3) after the read data postamble for which ODT control should remain set to DQSODT for DQS or DQODT for DQ/DM before disabling it (setting it to '0') when using dynamic ODT control.

ODT is disabled almost RTTOH clock cycles after the read postamble

Bit 10 DQRTT: DQ dynamic RTT control

Indicates, if set, that the ODT control of DQ/DM SSTL I/Os be dynamically controlled by setting it to the value in DQODT during reads and disabling it (setting it to '0') during any other cycle.

If this bit is not set, then the ODT control of DQ SSTL I/Os is always set to the value in DQODT.

Since dynamic ODT is on by default, when using LPDDR2/LPDDR3 this bit must be set to 0 since LPDDR2/LPDDR3 does not require ODT to be on.`

Bit 9 DQSRTT: DQS dynamic RTT control

Indicates, if set, that the ODT control of DQS SSTL I/Os be dynamically controlled by setting it to the value in DQSODT during reads and disabling it (setting it to '0') during any other cycle.

If this bit is not set, then the ODT control of DQS SSTL I/Os is always set to the value in DQSODT field.

Since dynamic ODT is on by default, when using LPDDR2/LPDDR3 this bit must be set to 0 since LPDDR2/LPDDR3 does not require ODT to be on.

7.7.38 DDRPHYC byte lane n GS register 0 (DDRPHYC_DXnGSR0)

Address offset: 0x1C4 + 0x40 * n, (n = 0 to 3)

Reset value: 0x0000

1514131211109876543210
DTPASS[2:0]Res.Res.Res.Res.DTIERRRes.Res.Res.DTERRRes.Res.Res.DTDONE
rrrrrr

Bits 15:13 DTPASS[2:0]: DQS training pass count

The number of passing configurations during DQS gate training.

Bits 12:9 Reserved, must be kept at reset value.

Bit 8 DTIERR: DQS gate training intermittent error

If set, indicates that there was an intermittent error during DQS gate training of the byte, such as a pass was followed by a fail then followed by another pass.

Bits 7:5 Reserved, must be kept at reset value.

Bit 4 DTERR: DQS gate training error

If set, indicates that a valid DQS gating window could not be found during DQS gate training of the byte.

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 DTDONE: Data training done

Indicates, if set, that the byte has finished doing data training.

7.7.39 DDRPHYC byte lane n GS register 1 (DDRPHYC_DXnGSR1)

Address offset: 0x1C8 + 0x40 * n, (n = 0 to 3)

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.RVPASS[2:0]Res.Res.Res.RVIERR
rrrr
1514131211109876543210
Res.Res.Res.RVERRRes.Res.Res.Res.Res.Res.DQSDFT[1:0]Res.Res.Res.DFTERR
rrrr

Bits 31:23 Reserved, must be kept at reset value.

Bits 22:20 RVPASS[2:0]: Read valid training pass count

The number of passing configurations during read valid training.

Bits 19:17 Reserved, must be kept at reset value.

Bit 16 RVIERR: RV intermittent error for rank

If set, indicates that there was an intermittent error during read valid training of the byte, such as a pass was followed by a fail then followed by another pass.

Bits 15:13 Reserved, must be kept at reset value.

Bit 12 RVERR: RV training error

If set, indicates that a valid read valid placement could not be found during read valid training of the byte

Bits 11:6 Reserved, must be kept at reset value.

Bits 5:4 DQSDFT[1:0]: DQS drift value

Used to report the drift on the read data strobe of the data byte.

Valid settings are:

00: No drift

01: 90° drift

10: 180° drift

11: 270° drift or more

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 DFTERR: DQS drift error

If set, indicates that the byte read data strobe has drifted by more than or equal to the drift limit set in the PHY General Configuration Register (PGCR).

7.7.40 DDRPHYC byte lane n DLLC register (DDRPHYC_DXnDLLCR)

Address offset: 0x1CC + 0x40 * n, (n = 0 to 3)

Reset value: 0x4000 0000

31302928272625242322212019181716
DLLDISDLLSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.SDLBMODEATESTENSDPHASE[3:2]
rwrwrwrwrwrw
1514131211109876543210
SDPHASE[1:0]SSTART[1:0]MFWDLY[2:0]MFBDLY[2:0]SFWDLY[2:0]SFBDLY[2:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 DLLDIS: DLL bypass

A disabled DLL is bypassed. Default ('0') is DLL enabled.

Note: DLL bypass must only be changed when DDRPHYC clock (dphy_ker_ck) is inactive.

Bit 30 DLLSRST: DLL reset

Soft resets the byte DLL by driving the DLL soft reset pin.

Note: DLL reset must only be changed to 0 when DDRPHYC clock (dphy_ker_ck) is inactive.

Bits 29:20 Reserved, must be kept at reset value.

Bit 19 SDLBMODE: Bypass slave DLL during loopback

If this bit is set, the slave DLL is put in loopback mode in which there is no 90 degrees phase shift on read DQS/DQS#. This bit must be set when operating the byte PHYs in loopback mode.

Bits 8:6 MFBDLY[2:0]: Master DLL feed-back trim

Used to trim the delay in the master DLL feedback path:

000: minimum delay

...

111: maximum delay

Bits 5:3 SFWDLY[2:0]: Slave DLL feed-forward trim

Slave Feed-Forward Delay Trim: Used to trim the delay in the slave DLL feedforward path:

000: minimum delay

...

111: maximum delay

Bits 2:0 SFBDLY[2:0]: Slave DLL feed-back trim

Slave Feed-Back Delay Trim: Used to trim the delay in the slave DLL feedback path:

000: minimum delay

...

111: maximum delay

7.7.41 DDRPHYC byte lane n DQT register (DDRPHYC_DXnDQTR)

Address offset: 0x1D0 + 0x40 * n, (n = 0 to 3)

Reset value: 0xFFFF FFFF

31302928272625242322212019181716
DQDLY7[3:0]DQDLY6[3:0]DQDLY5[3:0]DQDLY4[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DQDLY3[3:0]DQDLY2[3:0]DQDLY1[3:0]DQDLY0[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:28 DQDLY7[3:0]: DQ delay for bit 7

Used to adjust the delay of the data relative to the nominal delay that is matched to the delay of the data strobes through the slave DLL and clock tree.

The lower two bits of the DQDLY for each DQ bit controls the delay for the data clocked by DQS, while the higher two bits control the delay for the data clocked by DQS_b.

Valid settings for each 2-bit control field are:

00: nominal delay

01: nominal delay + 1 step

10: nominal delay + 2 steps

11: nominal delay + 3 steps

Bits 27:24 DQDLY6[3:0]: DQ delay for bit 6

idem

Bits 23:20 DQDLY5[3:0]: DQ delay for bit 5

Idem

Bits 19:16 DQDLY4[3:0]: DQ delay for bit 4

Idem

Bits 15:12 DQDLY3[3:0]: DQ delay for bit 3

Idem

Bits 11:8 DQDLY2[3:0]: DQ delay for bit 2
Idem

Bits 7:4 DQDLY1[3:0]: DQ delay for bit 1
Idem

Bits 3:0 DQDLY0[3:0]: DQ delay for bit 0
Idem

7.7.42 DDRPHYC byte lane n DQST register (DDRPHYC_DXnDQSTR)

Address offset: 0x1D4 + 0x40 * n, (n = 0 to 3)

Reset value: 0x3DB0 2000

Bit 31Bit 30Bit 29Bit 28ReservedBit 27Bit 26Bit 25Bit 24Bit 23Bit 22Bit 21Bit 20Bit 19Bit 18Bit 17Bit 16
31302928272625242322212019181716
Res.Res.DMDLY[3:0]DQSNDLY[2:0]DQSDLY[2:0]Res.Res.Res.Res.
rwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.R0DGPS[1:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.R0DGSL[2:0]
rwrwrwrwrw
Bits 29:26Bits 31:30 DMDLY[3:0]: DM delay
Bits 25:23DQSNDLY[2:0]: DQS# delay
RM0441 Rev 7409/3787

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:26 DMDLY[3:0]: DM delay

Used to adjust the delay of the data relative to the nominal delay that is matched to the delay of the data strob through the slave DLL and clock tree.

The lower two bits of the DQDLY for each DQ bit controls the delay for the data clocked by DQS, while the higher two bits control the delay for the data clocked by DQS_b.

Valid settings for each 2-bit control field are:

00: nominal delay

01: nominal delay + 1 step

10: nominal delay + 2 steps

11: nominal delay + 3 steps

Bits 25:23 DQSNDLY[2:0]: DQS# delay

Used to adjust the delay of the data strob relative to the nominal delay that is matched to the delay of the data bit through the slave DLL and clock tree.

Valid values are:

000: nominal delay - 3 steps

001: nominal delay - 2 steps

010: nominal delay - 1 step

011: nominal delay

100: nominal delay + 1 step

101: nominal delay + 2 steps

110: nominal delay + 3 steps

111: nominal delay + 4 steps

Note: - After changing this value, an ITM soft reset must be issued: bit ITMSRST=1 and bit INIT=1 in DDRPHYC_PIR register.

Bits 22:20 DQSDLY[2:0]: DQS delay

Used to adjust the delay of the data strobes relative to the nominal delay that is matched to the delay of the data bit through the slave DLL and clock tree.

Valid values are:

Note: - After changing this value, an ITM soft reset (bit ITMSRST=1 and bit INIT=1 in DDRPHYC_PIR register) must be issued.

Bits 19:14 Reserved, must be kept at reset value.

Bits 13:12 R0DGPS[1:0]: Rank 0 DQS gating phase select

Selects the clock used to enable the data strobes during read so that the value of the data strobes before and after the preamble/postamble are filtered out.

R0DGPS is initially set by the PUBL during automatic DQS data training and subsequently updated during data strobe drift compensation. However, these values can be overwritten by a direct write to this register, and the automatic update during DQS drift compensation can be disabled using the PHY General Configuration Register (PGCR).

Valid values are:

Bits 11:3 Reserved, must be kept at reset value.

Bits 2:0 R0DGSL[2:0]: Rank 0 DQS gating system latency

Used to increase the number of clock cycles needed to expect valid DDR read data by up to five extra clock cycles.

This is used to compensate for board delays and other system delays.

Power-up default is 000 (i.e. no extra clock cycles required).

The SL fields are initially set by the PUBL during automatic DQS data training but these values can be overwritten by a direct write to this register.

Valid values are:

7.7.43 DDRPHYC register map

Table 26. DDRPHYC register map and reset values

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x000DDRPHYC_RIDRUDRID[7:0]PHYMJR [3:0]PHYMDR [3:0]PHYMNR [3:0]PUBMJR [3:0]PUBMDR [3:0]PUBMNR [3:0]
Reset value0000000000100000000000100000000
0x004DDRPHYC_PIRINITBYPZCALBYPLCOKBYPCLRSRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.DLLBYPICPCRes.Res.Res.Res.Res.Res.Res.RVTRNQSTRNDRAMINITDRAMRSTITMSRSTZCALDLLLOCKDLLSRSTINIT
Reset value000000000000000
0x008DDRPHYC_PGCRLBMODELBGDQSLBDQSSRFSHDT [3:0]PDDISDXZKSEL[1:0]RANKEN [3:0]ODDRM[1:0]IOLBCKINVCKDV[1:0]CKEN [2:0]DTOSEL [3:0]DFTLMT[1:0]DFTCMPDQSCFGITMDMD
Reset value00000000110000100001011100000010
0x00CDDRPHYC_PGSRTQRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RVEIRRRVERRDFERRDTIERRDTERRDTDONEDIDONEZCDDONEDL DONE
Reset value0000000000
0x010DDRPHYC_DLLGCRDLLRSVD2[1:0]LOCKDETFDTRMSL[1:0]SBIAS5_3[2:0]BPS200SBIAS2_0[2:0]MBIAS[7:0]TESTSWATC [1:0]DTC [2:0]TESTENIPUMP[2:0]DRES[1:0]
Reset value00000011011100110101110000000000
0x014DDRPHYC_ACDLLCRDLLDISDLLSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MFWDLY[2:0]MFBDLY[2:0]Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0100000000
0x018DDRPHYC_PTR0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TITMSRST[3:0]TDLLLOCK[11:0]TDLLSRST[5:0]
Reset value1000101010111110011011
0x01CDDRPHYC_PTR1Res.Res.Res.Res.Res.TDINIT1[7:0]TDINIT0[18:0]
Reset value110000001000001000100011101
0x020DDRPHYC_PTR2Res.Res.Res.Res.Res.TDINIT3[9:0]TDINIT2[16:0]
Reset value100001011011010000001110010
0x024DDRPHYC_ACIOCRACSR[1:0]RSTIOMRSTPDRRSTPDDRSTODTRANKPDR[3:0]CSPDD [3:0]Res.Res.Res.RANKODTCKPDR[2:0]CKPDD[2:0]CKODT[2:0]ACPDRACPDDACODTACOEACIOM
Reset value00110000001000000010000010010

Table 26. DDRPHYC register map and reset values (continued)

DDR physical interface control (DDRPHYC) Offset Register namecolumn_2RM0441
reset value 31 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 21 2 019 18 17 16 15 14 13 12 1 1 10 9 8 7 6 5 4 3 2 1 0
Q S S[3:0] D N R E
Q S S[3:0] D R E
Q S S D N R T
D X P D R
O D X D T
D X P D D
S R V E L
XIO D M
AWD
T
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s .
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
Reset value0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Q D S G E[2:0]
Q D S G X[2:0]
L P D L L P D
FX D LA T
PIO L P D
B DIS E N
O N B U B
O O D T E
O T P D E
S O R T E
P U R E N
T P D P D
2O N L E
2 N L P D
C O K E
C O K E
Z U E N
R e s.
R e s.
R e s.
0x02C DDRPHYC_DSGCR [3:0][3: 0]
Reset value 1 1 1 1 1 0 1 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 1 1 1 1 1
D D R T Y P E[1:0]
D[2:0] D D R M
D D R8 B N K
Q M P R D
O S N R A
D D R 2 T
R DIM M
U DIM M
R e s.
R e s.
R e s .
R e s .
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
T P D
0x030 DDRPHYC_DCR0]
Reset value 0 0 0 0 00 0 0 0 0 0 1 0 1 1
T M R D[1:0]
C C T D
TRC[5:0] T RRD[3:0] TRAS[4:0] TRCD[3:0] TRP[3:0]TWTR TRTP
0x034 DDRPHYC_DTPR0[2:0] [2:0]
Reset value 0 0 1 1 0 0 0 0 1 0 0 1 0 0 10 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0
Q T D S C K M A X[2:0]
Q S C T D K MIN[2:0]
O T A N D[1:0]
O T M D[1:0]
O T R T D T
T R TW
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
TRFC[7:0] TFAW[5:0]
Reset value 0 0 1 0 0 1 1 0 0 0 0 0 11 0 0 0 0 1 0 0 1 0 0 0 0
R e s.
R e s.
R e s.
TDLLK[9:0]TCKE [3:0] TXP [4:0] TXS[9:0]
Reset value 1 0 0 0 0 0 0 0 0 0 0 01 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0
RSVD CL1 BL
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s .
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
T M CL 0
P D WR[2:0] D R B T
0x040 DDRPHYC_DDR3_MR0[2:0] [2:0] [1:0]
Reset value0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0
0x042 ReservedRes.
L E V E L
Q OF F
Q S T D AL
R T T 2
R T T 0
R T T1 D E
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s .
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s.
DIC1
0x044[1: 0]
Reset value0 0 0 0 0 0 0 0 0 0 0
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s .
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s .
R e s. WC
B T BL [2:0]
0x044 MR1[2:0]
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s .
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s .
R e s .
R e s.
R e s.
R e s. BL
0x044 MR1[2:0]
Reset value000 000
0x046 ReservedRes.
ST logo
ST logo

Table 26. DDRPHYC register map and reset values (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x048DDRPHYC_DDR3_MR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RTTWR[1:0]Res.SRTASRCWL [2:0]PASR [2:0]
Reset value0000000000
0x048DDRPHYC_LPDDR2_MR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RLWL [2:0]
Reset value000
0x048DDRPHYC_LPDDR3_MR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WRWLNWRERes.Res.Res.RLWL [2:0]
Reset value000000
0x04A - 0x04BReservedRes.
0x04CDDRPHYC_DDR3_MR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MPRMPRLOC[1:0]
Reset value000
0x04CDDRPHYC_LPDDR2_MR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DS[3:0]
Reset value0000
0x04CDDRPHYC_LPDDR3_MR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PDCTL[1:0]DQ[1:0]
Reset value0000
0x04D - 0x04EReservedRes.
0x050DDRPHYC_ODTCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WRODTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RDODT
Reset value10
0x052 - 0x050ReservedRes.
0x054DDRPHYC_DTARDTMPRDTBANK[2:0]DTROW[15:0]DTCOL[11:0]
Reset value00000000000000000000000000000000
0x058DDRPHYC_DTDR0DTBYTE3[7:0]DTBYTE2[7:0]DTBYTE1[7:0]DTBYTE0[7:0]
Reset value11011101001000101110111000010001
0x05CDDRPHYC_DTDR1DTBYTE7[7:0]DTBYTE6[7:0]DTBYTE5[7:0]DTBYTE4[7:0]
Reset value01110111000100010111011010001000
0x060 - 0x174ReservedRes.
0x178DDRPHYC_GPR0GPR0[31:0]
Reset value00000000000000000000000000000000
0x17CDDRPHYC_GPR1GPR1[31:0]
Reset value00000000000000000000000000000000

Table 26. DDRPHYC register map and reset values (continued)

DDR physical interface control (DDRPHYC) Offset Register namecolumn_2RM0441
reset value 31 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 212 0 19 18 17 16 15 14 13 12 1 1 10 9 8 7 6 5 4 3 2 1 0
R e s. R e s. R e s. R e s. R e s. R e s. Re s.R e s. ZDATA[19:0]
Z C AL B Y P
C Z AL
Q Z P D
Z D E N
Reset value 0 0 0 00 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
0x184 DDRPHYC_ZQ0CR14] 0]
0x184 ReservedRes.
Z E R R
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
O Z D N E
Reset value 0 00 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0
OPU OPD ZPU ZPD
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
0x18C DDRPHYC_ZQ0SR1[1:0] [1:0] [1:0] [1:0]
0x1BC ReservedRes.
D X P D R
Q O S D D T
Q S D R T T
Q O D D T
O R T T AL
Q D R T T
O R T T H[1:0]
S N[1:0] D E
Q S D R P D
S R0R V L[2:0]
D X P D D
XIO D M
D X E N
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
D TIE R R
D T E R R
O D T D N E
S S[2:0] D T P A
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Reset value0 0 0 0 0 0
D F T E R R
R VIE R R
R V E R R
Q S T[1:0] D D F
S S[2:0] R V P A
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Reset value 0 0 00 0 0 0 0
S S D L L R T
DIS D L L
MF B D LY[2:0]
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
S O D L B M D E
S S T A R T[1:0]
S S D P H A E[3:0] MFWD LY[2:0]
S LY[2:0] F B D
S FWD LY[2:0]
S A T E T E N
Reset value 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
DQDLY6 DQDLY5DQDLY4 DQDLY3 DQDLY2 DQDLY1 DQDLY0
0x1D0 DDRPHYC_DX0DQTR DQDLY7
[3:0] [3:0] [3:0][3:0] [3:0] [3:0] [3:0] [3:0]
G S[1:0] R0 D P
Q S D D LY[2:0]
R0 G S L[2:0] D
Q S D N D LY[2:0]
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
0x1D4 DDRPHYC_DX0DQSTR [3:0]
Reset value 1 1 1 1 0 1 1 0 1 11 0 0 0 0
0x1FCRes.
ST logo
ST logo

Table 26. DDRPHYC register map and reset values (continued)

RM0441 Offset Register namecolumn_2DDR physical interface control (DDRPHYC)
reset value 31 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 21 2 01918 17 16 15 14 13 12 1 1 10 9 8 7 6 5 4 3 2 1 0
Q O D D T
D X P D R
Q S D R T T
Q O S D D T
O R T T AL
Q D R T T
S R0R V L[2:0]
Q S D R P D
D X P D D
O R T T H[1:0]
S N[1:0] D E
XIO D M
D X E N
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
Reset value1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1
D F T E R R
R VIE R R
R V E R R
Q S T[1:0] D D F
S S[2:0] R V P A
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Reset value 0 0 00 0 0 0 0
D F T E R R
R VIE R R
R V E R R
Q S T[1:0] D D F
S S[2:0] R V P A
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Reset value 0 0 00 0 0 0 0
S S D L L R T
MF B D LY[2:0]
DIS D L L
S S D P H A E[3:0] MFWD LY[2:0]
S S T A R T[1:0]
S O D L B M D E
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
S FWD LY[2:0]
S LY[2:0] F B D
S A T E T E N
Reset value 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
DQDLY6 DQDLY5DQDLY4 DQDLY3 DQDLY2 DQDLY1 DQDLY0
0x210 DDRPHYC_DX1DQTR DQDLY7
[3:0] [3:0] [3:0][3:0] [3:0] [3:0] [3:0] [3:0]
Q S D N D LY[2:0]
G S[1:0] R0 D P
Q S D D LY[2:0]
R0 G S L[2:0] D
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
0x214 DDRPHYC_DX1DQSTR [3:0]
Reset value 1 1 1 1 0 1 1 0 1 11 0 0 0 0
0x23C ReservedRes.
Q S D R T T
D X P D R
Q O S D D T
O R T T AL
Q D R T T
Q O D D T
Q S D R P D
S R0R V L[2:0]
O R T T H[1:0]
S N[1:0] D E
D X P D D
XIO D M
D X E N
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
Reset value1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1
0x244 ReservedRes.
D F T E R R
R VIE R R
R V E R R
Q S T[1:0] D D F
S S[2:0] R V P A
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Reset value 0 0 00 0 0 0 0
RM0441 Rev 7415/ 3787

Table 26. DDRPHYC register map and reset values (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x24CDDRPHYC_DX2DLLCRDLLDISDLLSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.SDLBMODEATESTENSDPHASE[3:0]SSTART[1:0]MFWDLY[2:0]MFBDLY[2:0]SFWDLY[2:0]SFBDLY[2:0]
Reset value0100000000000000000000
0x250DDRPHYC_DX2DQTRDQDLY7
[3:0]
DQDLY6
[3:0]
DQDLY5
[3:0]
DQDLY4
[3:0]
DQDLY3
[3:0]
DQDLY2
[3:0]
DQDLY1
[3:0]
DQDLY0
[3:0]
Reset value11111111111111111111111111111111
0x254DDRPHYC_DX2DQSTRRes.Res.DMDLY
[3:0]
DQSNDLY[2:0]DQSDLY[2:0]Res.Res.Res.Res.Res.Res.R0DGPS[1:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.R0DGSL[2:0]
Reset value111101101110000
0x258 -
0x27C
ReservedRes.
0x280DDRPHYC_DX3GCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.R0RVSL[2:0]RTTOALRTTOH[1:0]DQRTTDQSRTTDSEN[1:0]DQSRPDDXPDRDXPDDDXIOMDQODTDQSODTDXEN
Reset value10000111010000001
0x286 -
0x284
ReservedRes.
0x288DDRPHYC_DX3GSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.RVPASS[2:0]Res.Res.Res.RVIERRRes.Res.RVERRRes.Res.Res.Res.Res.DQSDFT[1:0]Res.Res.Res.DFTERR
Reset value00000000
0x28CDDRPHYC_DX3DLLCRDLLDISDLLSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.SDLBMODEATESTENSDPHASE[3:0]SSTART[1:0]MFWDLY[2:0]MFBDLY[2:0]SFWDLY[2:0]SFBDLY[2:0]
Reset value0100000000000000000000
0x290DDRPHYC_DX3DQTRDQDLY7
[3:0]
DQDLY6
[3:0]
DQDLY5
[3:0]
DQDLY4
[3:0]
DQDLY3
[3:0]
DQDLY2
[3:0]
DQDLY1
[3:0]
DQDLY0
[3:0]
Reset value11111111111111111111111111111111
0x294DDRPHYC_DX3DQSTRRes.Res.DMDLY
[3:0]
DQSNDLY[2:0]DQSDLY[2:0]Res.Res.Res.Res.Res.Res.R0DGPS[1:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.R0DGSL[2:0]
Reset value111101101110000

Refer to Section 2.5 on page 149 for the register boundary addresses.