35. Delay block (DLYB)

35.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 or Octo-SPI interface.

35.2 DLYB main features

The delay block has the following features:

35.3 DLYB implementation

Table 298. STM32MP21xx features

DLYB associated peripheralDLYBOS1DLYBSD1DLYBSD2DLYBSD3
OCTOSPI1X---
SDMMC1-X--
SDMMC2--X-
SDMMC3---X

35.4 DLYB functional description

35.4.1 DLYB diagram

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

Figure 254. 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 SYSCFG block provides configuration signals to the Digital Control block. The DLYB block outputs rx_op_clk and tx_op_clk to the external system.

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

35.4.2 DLYB internal signals

Table 299 lists the DLYB functional signals.

Table 299. 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 300 lists the DLYB interconnections. The SYSCFG registers are highlighted in light gray, RCC registers in dark gray and peripheral ports in blue.

Table 300. SDMMC DLYB interconnections
Signal nameSource/destination
SDMMC1SDMMC2SDMMC3
dll_clkClkDII
(sdmmc1_ClkDII)
ClkDII
(sdmmc2_ClkDII)
ClkDII
(sdmmc3_ClkDII)
rx_ip_clkCKio
(SDMMC1_CK_in)
CKio
(SDMMC2_CK_in)
CKio
(SDMMC3_CK_in)
tx_ip_clkNot used
rx_op_clkFB_CLK
(sdmmc1_fb_clk)
FB_CLK
(sdmmc2_fb_clk)
FB_CLK
(sdmmc3_fb_clk)
tx_op_clkNot used
rst_nRCC_SDMMC1CFGR.
SDMMC1DLLRST
RCC_SDMMC2CFGR.
SDMMC2DLLRST
RCC_SDMMC3CFGR.
SDMMC3DLLRST
dll_start_lockSYSCFG_DLYBSD1CR.ENSYSCFG_DLYBSD2CR.ENSYSCFG_DLYBSD3CR.EN
dll_lockedSYSCFG_DLYBSD1SR.
LOCK
SYSCFG_DLYBSD2SR.
LOCK
SYSCFG_DLYBSD3SR.
LOCK
tx_ph_select[5:0]Not used
tx_ph_select_ackNot used
rx_ph_select[5:0]SYSCFG_DLYBSD1CR.
RX_TAP_SEL[5:0]
SYSCFG_DLYBSD2CR.
RX_TAP_SEL[5:0]
SYSCFG_DLYBSD3CR.
RX_TAP_SEL[5:0]
rx_ph_select_ackSYSCFG_DLYBSD1SR.
RX_TAP_SEL_ACK
SYSCFG_DLYBSD2SR.
RX_TAP_SEL_ACK
SYSCFG_DLYBSD3SR.
RX_TAP_SEL_ACK
antiglitch_enSYSCFG_DLYBSD1CR.
ANTIGLITCH_EN
SYSCFG_DLYBSD2CR.
ANTIGLITCH_EN
SYSCFG_DLYBSD3CR.
ANTIGLITCH_EN
dll_bypass_cmd_enSYSCFG_DLYBSD1CR.
BYP_EN
SYSCFG_DLYBSD2CR.
BYP_EN
SYSCFG_DLYBSD3CR.
BYP_EN
dll_bypass_cmd[4:0]SYSCFG_DLYBSD1CR.
BYP_CMD[4:0]
SYSCFG_DLYBSD2CR.
BYP_CMD[4:0]
SYSCFG_DLYBSD3CR.
BYP_CMD[4:0]
Table 301. OCTOSPI DLYB interconnections
Signal nameSource/destination
OCTOSPI1
dll_clkospi_clk_o_free_run
rx_ip_clkospi_clk_fb_to_dly_o
tx_ip_clkospi_clk_o
rx_op_clkospi_clk_fb_dly_i
tx_op_clkospi_clk_ddrohold_dly_i

Table 301. OCTOSPI DLYB interconnections (continued)

Signal nameSource/destination
OCTOSPI1
rst_nRCC_OSPI1CFGR.OSPI1DLLRST
dll_start_lockSYSCFG_DLYBOS1CR.EN
dll_lockedSYSCFG_DLYBOS1SR.LOCK
tx_ph_select[5:0]SYSCFG_DLYBOS1CR.TX_TAP_SEL[5:0]
tx_ph_select_ackSYSCFG_DLYBOS1SR.TX_TAP_SEL_ACK
rx_ph_select[5:0]SYSCFG_DLYBOS1CR.RX_TAP_SEL[5:0]
rx_ph_select_ackSYSCFG_DLYBOS1SR.RX_TAP_SEL_ACK
antiglitch_enNot used (disabled)
dll_bypass_cmd_enSYSCFG_DLYBOS1CR.BYP_EN
dll_bypass_cmd[4:0]SYSCFG_DLYBOS1CR.BYP_CMD[4:0]

35.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:

unit includes 24 delay elements. The number of delay elements which are enabled in each delay unit depends on the value of dll_bypass_cmd[4:0].

35.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.

35.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.