41. Delay block (DLYB)
41.1 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.
41.2 DLYB main features
The delay block has the following features:
- • Frequency range for Lock mode is [50 MHz, 208 MHz]
- • 32 phases (delay taps)
- • Bypass mode for operation below 50 MHz
41.3 DLYB implementation
Table 351. STM32MP23/25xx features
| DLYB associated peripheral | DLYBOS1 | DLYBOS2 | DLYBSD1 | DLYBSD2 | DLYBSD3 |
|---|---|---|---|---|---|
| OCTOSPI1 | X | - | - | - | - |
| OCTOSPI2 | - | X | - | - | - |
| SDMMC1 | - | - | X | - | - |
| SDMMC2 | - | - | - | X | - |
| SDMMC3 | - | - | - | - | X |
41.4 DLYB functional description
41.4.1 DLYB diagram
The delay block includes the following sub-blocks (shown in the figure below):
- • Digital block to generate commands for delay lines and phase selection. This block embeds lock FSM.
- • Delay line supporting the unit delays
- • Output clock selection multiplexer

The diagram illustrates the internal architecture of the Delay Block (DLYB) and its interface to SYSCFG:
- Master delay line: Consists of delay elements (1, 2, to 32) receiving dll_clk and control signals (cmd) from the Digital Control block.
- Phase Comparator: Receives input from the delay line through a multiplexer controlled by track_mode, outputting up_ndown to the Digital Control.
- Digital Control: Interfaces with SYSCFG on the left (inputs: dll_start_lock, dll_bypass_cmd[4:0], dll_bypass_cmd_en, antiglitch_en, rx_ph_select[5:0], tx_ph_select[5:0]) and outputs on the right (dll_locked, rx_ph_select_ack, tx_ph_select_ack, phase_sel_tx_out[30:0], phase_sel_rx_out[30:0]). It drives the delay tuning signal cmd to the Master, RX, and TX delay lines.
- RX delay line: Delay cells (1, 2, to 32) processing rx_ip_clk to produce rx_op_clk via an output multiplexer.
- TX delay line: Delay cells (1, 2, to 32) processing tx_ip_clk to produce tx_op_clk via an output multiplexer.
- Additional signals include rst_n.
MSv67483V1
41.4.2 DLYB internal signals
Table 352 lists the DLYB functional signals.
Table 352. DLYB functional signals
| Signal name | Signal type | Description |
|---|---|---|
| dll_clk | Digital input | Free-running input clock used as reference clock for the Master delay line and FSM blocks |
| tx_ip_clk | Digital input | Input clock of the TX slave delay line |
| rx_ip_clk | Digital input | Input clock of the RX slave delay line |
| tx_op_clk | Digital output | Selected output clock of the TX slave delay line |
| rx_op_clk | Digital output | Selected output clock of the RX slave delay line |
| rst_n | Digital input | Asynchronous active low reset |
| dll_start_lock | Digital input | Enable of DLL when configured in Lock mode |
| dll_locked | Digital output | Lock indicator. When high, it indicates that the FSM has finished the lock sequence. The DLL can be used |
| tx_ph_select[5:0] | Digital input | Selection 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_ack | Digital output | When 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 input | Selection 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_ack | Digital output | When high: phase selected by rx_ph_select is acknowledged When low: output clock rx_op_clk is tied low |
| antiglitch_en | Digital input | When 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_en | Digital input | Active high: use dll_bypass_cmd for command generation |
| dll_bypass_cmd[4:0] | Digital input | permits 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 353 and Table 354 list the DLYB interconnections. The SYSCFG registers are highlighted in light gray, RCC registers in dark gray and peripheral ports in blue.
Table 353. SDMMC DLYB interconnections| Signal name | Source/destination | ||
|---|---|---|---|
| SDMMC1 | SDMMC2 | SDMMC3 | |
| dll_clk | ClkDII (sdmmc1_ClkDII) | ClkDII (sdmmc2_ClkDII) | ClkDII (sdmmc3_ClkDII) |
| rx_ip_clk | CKio (SDMMC1_CK_in) | CKio (SDMMC2_CK_in) | CKio (SDMMC3_CK_in) |
| tx_ip_clk | Not used | ||
| rx_op_clk | FB_CLK (sdmmc1_fb_clk) | FB_CLK (sdmmc2_fb_clk) | FB_CLK (sdmmc3_fb_clk) |
| tx_op_clk | Not used | ||
| rst_n | RCC_SDMMC1CFGR. SDMMC1DLLRST | RCC_SDMMC2CFGR. SDMMC2DLLRST | RCC_SDMMC3CFGR. SDMMC3DLLRST |
| dll_start_lock | SYSCFG_DLYBSD1CR.EN | SYSCFG_DLYBSD2CR.EN | SYSCFG_DLYBSD3CR.EN |
| dll_locked | SYSCFG_DLYBSD1SR. LOCK | SYSCFG_DLYBSD2SR. LOCK | SYSCFG_DLYBSD3SR. LOCK |
| tx_ph_select[5:0] | Not used | ||
| tx_ph_select_ack | Not 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_ack | SYSCFG_DLYBSD1SR. RX_TAP_SEL_ACK | SYSCFG_DLYBSD2SR. RX_TAP_SEL_ACK | SYSCFG_DLYBSD3SR. RX_TAP_SEL_ACK |
| antiglitch_en | SYSCFG_DLYBSD1CR. ANTIGLITCH_EN | SYSCFG_DLYBSD2CR. ANTIGLITCH_EN | SYSCFG_DLYBSD3CR. ANTIGLITCH_EN |
| dll_bypass_cmd_en | SYSCFG_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] |
| Signal name | Source/destination | |
|---|---|---|
| OCTOSPI1 | OCTOSPI2 | |
| dll_clk | ospi_clk_o_free_run | ospi_clk_o_free_run |
| rx_ip_clk | ospi_clk_fb_to_dly_o | ospi_clk_fb_to_dly_o |
| tx_ip_clk | ospi_clk_o | ospi_clk_o |
| rx_op_clk | ospi_clk_fb_dly_i | ospi_clk_fb_dly_i |
| tx_op_clk | ospi_clk_ddrohold_dly_i | ospi_clk_ddrohold_dly_i |
Table 354. OCTOSPI DLYB interconnections (continued)
| Signal name | Source/destination | |
|---|---|---|
| OCTOSPI1 | OCTOSPI2 | |
| rst_n | RCC_OSPI1CFGR.OSPI1DLLRST | RCC_OSPI2CFGR.OSPI2DLLRST |
| dll_start_lock | SYSCFG_DLYBOS1CR.EN | SYSCFG_DLYBOS2CR.EN |
| dll_locked | SYSCFG_DLYBOS1SR.LOCK | SYSCFG_DLYBOS2SR.LOCK |
| tx_ph_select[5:0] | SYSCFG_DLYBOS1CR.TX_TAP_SEL[5:0] | SYSCFG_DLYBOS2CR.TX_TAP_SEL[5:0] |
| tx_ph_select_ack | SYSCFG_DLYBOS1SR.TX_TAP_SEL_ACK | SYSCFG_DLYBOS2SR.TX_TAP_SEL_ACK |
| rx_ph_select[5:0] | SYSCFG_DLYBOS1CR.RX_TAP_SEL[5:0] | SYSCFG_DLYBOS2CR.RX_TAP_SEL[5:0] |
| rx_ph_select_ack | SYSCFG_DLYBOS1SR.RX_TAP_SEL_ACK | SYSCFG_DLYBOS2SR.RX_TAP_SEL_ACK |
| antiglitch_en | Not used (disabled) | |
| dll_bypass_cmd_en | SYSCFG_DLYBOS1CR.BYP_EN | SYSCFG_DLYBOS2CR.BYP_EN |
| dll_bypass_cmd[4:0] | SYSCFG_DLYBOS1CR.BYP_CMD[4:0] | SYSCFG_DLYBOS2CR.BYP_CMD[4:0] |
41.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:
- • Lock mode (dll_bypass_cmd_en = 0)
- – This mode can only be used when the frequency of dll_clk is in the range [50 MHz, 208 MHz]
- – The delay block is enabled by setting dll_start_lock to '1'.
- – The delay block locks on the frequency of the dll_clk input clock and compensates for voltage and temperature variations. This process determines the command to be applied to each of the 32 delay units (a.k.a. tap) of the master delay line for the total master delay to represent one period of dll_clk. This command is copied to each delay unit of the RX and TX delay lines. The command varies with voltage and temperature for the DLL to remain locked. This guarantees that each delay unit of the RX and TX delay lines represents 1/32th of the input clock period.
- – Independent delay values can be selected for the RX and TX delay lines by controlling rx_ph_select[5:0] and tx_ph_select[5:0] parameters. The granularity of the delay is 1/32th of the input clock period.
- • Bypass mode (dll_bypass_cmd_en = 1)
- – This mode is required to be able to insert a delay between the rx_ip_clk (resp. tx_ip_clk) input clock and the rx_op_clk (resp. tx_op_clk) output clock when the operating frequency is lower than the minimum frequency supported by the delay block in lock mode (frequency < 50 MHz). This is necessary to support OCTOSPI devices in DTR mode at low frequency for which DQS must be delayed to sample data.
- – In this mode, delays in the RX and TX delay lines are used as “pure” delays, i.e. without trying to lock on the frequency of the dll_clk input clock. There is therefore no voltage nor temperature compensation in this mode and the RX and TX delay values vary with voltage and temperature. The command applied to each delay unit of the RX and TX delay lines is controlled by dll_bypass_cmd[4:0]. Each delay
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].
- – Independent delay values can be selected for the RX and TX delay lines by controlling rx_ph_select[5:0] and tx_ph_select[5:0] parameters. The total delay inserted by the RX (resp. TX) delay line depends on rx_ph_select[5:0] (resp. tx_ph_select[5:0]) and dll_bypass_cmd[4:0] values.
41.4.4 Lock mode procedure
For frequencies greater or equal to 50MHz, procedure is given below:
- 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. 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. During lock sequence DLYB can not be used until dll_locked flag is set to '1'.
- 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. 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. 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.
41.4.5 Bypass mode procedure
For frequencies lower the 50 MHz, procedure is given below:
- 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. 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. 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.