31. Delay block (DLYB)

31.1 DLYB introduction

The delay block (DLYB) is used to generate two output clocks that are dephased from 2 input clocks. The phase of each output clock must be programmed by the user application. The output clocks are then used to clock the data transmitted/received by another peripheral such as an SDMMC.

31.2 DLYB main features

The delay block has the following features:

31.3 DLYB implementation

Table 234. STM32N6x5/x7xx features

DLYB associated peripheralDLYBSD1DLYBSD2
SDMMC1X-
SDMMC2-X

31.4 DLYB functional description

31.4.1 DLYB diagram

The delay block includes the following sub-blocks (shown in the figure below):

Figure 261. DLYB block diagram

Block diagram of the DLYB (Delay Block) showing Master delay line, Phase Comparator, Digital Control, RX delay line, and TX delay line with various control signals and outputs.

The diagram illustrates the internal structure of the DLYB (Delay Block). It is divided into several functional blocks:

The outputs of the RX and TX delay lines are multiplexed to produce rx_op_clk and tx_op_clk respectively. The rx_ip_clk and tx_ip_clk inputs are also connected to the delay lines.

Block diagram of the DLYB (Delay Block) showing Master delay line, Phase Comparator, Digital Control, RX delay line, and TX delay line with various control signals and outputs.

MSv67483V1

31.4.2 DLYB internal signals

Table 235 lists the DLYB functional signals.

Table 235. DLYB functional signals

Signal nameSignal typeDescription
dll_clkDigital inputFree-running input clock used as reference clock for the Master delay line and FSM blocks
tx_ip_clkDigital inputInput clock of the TX slave delay line
rx_ip_clkDigital inputInput clock of the RX slave delay line
tx_op_clkDigital outputSelected output clock of the TX slave delay line
rx_op_clkDigital outputSelected output clock of the RX slave delay line
rst_nDigital inputAsynchronous active low reset
dll_start_lockDigital inputEnable of DLL when configured in Lock mode
dll_lockedDigital outputLock indicator. When high, it indicates that the FSM has finished the lock sequence. The DLL can be used
tx_ph_select[5:0]Digital inputSelection of the slave DLL phase shift over 33 for TX path
000000: 0 tap selection
000001: 1 tap selection
011111: 31 taps selection
1xxxxx: 32 taps selection
tx_ph_select_ackDigital outputWhen high: phase selected by tx_ph_select is acknowledged
When low: output clock tx_op_clk is tied low
rx_ph_select[5:0]Digital inputSelection of the slave DLL phase shift over 33 for RX path
000000: 0 tap selection
000001: 1 tap selection
011111: 31 taps selection
1xxxxx: 32 taps selection
rx_ph_select_ackDigital outputWhen high: phase selected by rx_ph_select is acknowledged
When low: output clock rx_op_clk is tied low
antiglitch_enDigital inputWhen high: output clocks (tx_op_clk or rx_op_clk) when minimum delay is selected (tx_ph_select = 0 or rx_ph_select=0) are gated to avoid any glitch when phase selection changes
When low: output clocks (tx_op_clk or rx_op_clk) when minimum delay is selected (tx_ph_select = 0 or rx_ph_select=0) are not gated (possible glitches if input clocks (tx_ip_clk or rx_ip_clk) are enabled when phase selection changes)
dll_bypass_cmd_enDigital inputActive high: use dll_bypass_cmd for command generation
dll_bypass_cmd[4:0]Digital inputpermits to force delays for all taps when dll_bypass_cmd_en high:
00000: not functional
00001: pass gate 0 is activated (min delay)
00010: pass gate 1 is activated
11000: pass gate 23 is activated
11001 to 11111: pass gate 23 is activated (max delay)

Table 236 lists the DLYB interconnections. The SDMMCx DLYB registers (DLYBSDx) are highlighted in light gray, RCC registers in dark gray and peripheral ports in blue.

Table 236. DLYB interconnection
Signal nameSource/destination
SDMMC1SDMMC2
dll_clkClkDII
(sdmmc1_ClkDII)
ClkDII
(sdmmc2_ClkDII)
rx_ip_clkCKio
(sdmmc1_io_CKio)
CKio
(sdmmc2_io_CKio)
tx_ip_clkNot used
rx_op_clkFB_CLK
(sdmmc1_fb_clk)
FB_CLK
(sdmmc2_fb_clk)
tx_op_clkNot used
rst_nRCC_MISCRSTR.SDMMC1DLLRSTRCC_MISCRSTR.SDMMC2DLLRST
dll_start_lockDLYBSD_CFG(1)
SDMMC_DLL_EN
DLYBSD_CFG(2)
SDMMC_DLL_EN
dll_lockedDLYBSD_STATUS(1)
SDMMC_DLL_LOCK
DLYBSD_STATUS(2)
SDMMC_DLL_LOCK
tx_ph_select[5:0]Not used
tx_ph_select_ackNot used
rx_ph_select[5:0]DLYBSD_CFG(1)
SDMMC_RX_TAP_SEL[5:0]
DLYBSD_CFG(2)
SDMMC_RX_TAP_SEL[5:0]
rx_ph_select_ackDLYBSD_STATUS(1)
SDMMC_RX_TAP_SEL_ACK
DLYBSD_STATUS(2)
SDMMC_RX_TAP_SEL_ACK
antiglitch_enDLYBSD_CFG(1)
SDMMC_DLL_ANTIGLITCH_EN
DLYBSD_CFG(2)
SDMMC_DLL_ANTIGLITCH_EN
dll_bypass_cmd_enDLYBSD_CFG(1)
SDMMC_DLL_BYP_EN
DLYBSD_CFG(2)
SDMMC_DLL_BYP_EN
dll_bypass_cmd[4:0]DLYBSD_CFG(1)
SDMMC_DLL_BYP_CMD[4:0]
DLYBSD_CFG(2)
SDMMC_DLL_BYP_CMD[4:0]

1. Register in DLYB1 instance.

2. Register in DLYB2 instance.

31.4.3 General description

The delay block is structured around one master delay line and two slave delay lines (RX and TX) and there are two operating modes:

31.4.4 Lock mode procedure

For frequencies greater or equal to 50MHz, procedure is given below:

  1. 1. When rst_n is low, DLYB lock FSM is put in Idle mode. Note that dll_start_lock must be set to '0' during hard reset.
  2. 2. Once the input signal dll_clk is stable (after a frequency switch for example) the lock sequence can be started by setting dll_start_lock to '1' and maintain this value.
  3. 3. During lock sequence DLYB can not be used until dll_locked flag is set to '1'.
  4. 4. Once it is done, delay line for master and slaves are PVT compensated (tracking V and T evolution but not a frequency switch).
  5. 5. Then the phase can be programmed using tx_ph_select[5:0] and rx_ph_select[5:0] input signals. The selected delays are applied to TX output clock and RX output clock once tx_ph_select_ack and rx_ph_select_ack are set to '1' respectively.
  6. 6. If another lock sequence is needed, for a frequency switch for example, dll_start_lock signal must go to '0' and sequence can be restarted with step 2.

31.4.5 Bypass mode procedure

For frequencies lower the 50 MHz, procedure is given below:

  1. 1. When rst_n is low, DLYB lock FSM is put in Idle mode. Note that dll_start_lock must be set to '0' during hard reset.
  2. 2. Delay block is enabled by setting dll_bypass_cmd_en to '1'. The command applied to every delay unit is defined by dll_bypass_cmd[4:0] input (the value 0 is reserved and must not be used).
  3. 3. The phase can be programmed using tx_ph_select[5:0] and rx_ph_select[5:0] input signals. The selected delays are applied to TX output clock and RX output clock once tx_ph_select_ack and rx_ph_select_ack are set to '1' respectively. For minimum delay, tx_ph_select[5:0] (resp. rx_ph_select[5:0]) must be set to 0.

31.5 DLYB SDMMC registers description

There is one DLYB module associated to each SDMMC (see Section 2.3: Memory organization). It contains registers to configure the DLL for the RX path. The registers are described below.

31.5.1 Delay block SDMMC DLL configuration (DLYBSD_CFG)

Address offset: 0x0

Reset value: 0x0040 0000

SDMMC DLL configuration register.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.SDMMC_DLL_ANTIGLITCH_ENSDMMC_DLL_BYP_CMD[4:0]SDMMC_DLL_BYP_EN
rwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.SDMMC_RX_TAP_SEL[5:0]SDMMC_DLL_EN
rwrwrwrwrwrwrw

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

Bit 22 SDMMC_DLL_ANTIGLITCH_EN: Antiglitch logic enabled when 1

Bits 21:17 SDMMC_DLL_BYP_CMD[4:0]: Bypass command

It is applied on RX path and corresponds to the number of delay cells activated (when SDMMC_DLL_BYP_EN is high).

Bit 16 SDMMC_DLL_BYP_EN: DLL configuration

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

Bits 6:1 SDMMC_RX_TAP_SEL[5:0]: selection of RX delay

In 1/32th of clock period.

Bit 0 SDMMC_DLL_EN: DLL enable

Used to enable the DLL when configured in lock mode.

31.5.2 Delay block SDMMC DLL status (DLYBSD_STATUS)

Address offset: 0x4

Reset value: 0x0000 0002

SDMMC DLL status register.

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.Res.SDMMC_RX_TAP_SEL_ACKSDMMC_DLL_LOCK
rwrw

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

Bit 1 SDMMC_RX_TAP_SEL_ACK: SDMMC RX delay selection acknowledge

This bit indicates that RX delay line has been configured with the delay selected by SDMMC_RX_TAP_SEL[5:0].

Bit 0 SDMMC_DLL_LOCK: SDMMC DLL lock

This bit indicates that DLL is locked to the input frequency.

31.5.3 DLYB register map

Table 237. DLYB register map and reset values

OffsetRegister name
Reset value
313029282726252423222120191817161514131211109876543210
0x0DLYBSD_CFGRes.Res.Res.Res.Res.Res.Res.Res.Res.SDMMC_DLL_ANTIGLITCH_ENSDMMC_DLL_BYP_CMDSDMMC_DLL_BYP_ENRes.Res.Res.Res.Res.Res.Res.Res.Res.SDMMC_RX_TAP_SELSDMMC_DLL_EN
Reset value100000000000000

Table 237. DLYB register map and reset values (continued)

OffsetRegister name
Reset value
313029282726252423222120191817161514131211109876543210
0x4DLYBSD_STATUSRes.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.Res.SDMMC_RX_TAP_SEL_ACK
Reset value10

Refer to Section 2.3 on page 163 for the register boundary addresses.

ST logo
ST logo