Everything you need to know about DQS pin on FlexSPI and SEMC interface of i.MXRT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Everything you need to know about DQS pin on FlexSPI and SEMC interface of i.MXRT

Everything you need to know about DQS pin on FlexSPI and SEMC interface of i.MXRT

Frequently, we receive questions related to the DQS pins present on i.MXRT whether how to use it and what it is exactly the function of this as well as why it is important to use it.
The goal of this document is answering common questions and expose the most common mistakes when connecting this pin.

Lets start defining why DQS signal is helpful for memory interfaces; DQS stands as data strobe and it is the clock signal for the data lines used to solve an issue during the memory read. The controller must first transmit the clock to memory, where it arrives x ns later, then the memory sends data bits to the controller and this takes x nanoseconds. There is a clock skew, which limits how fast you can transmit.

On iMXRT family it is present on FlexSPI and SEMC interfaces where you can connect multiple memories, it also allows to have multiple configurations as not all memories provide DQS signal on the memory.
The next section will detail the particular configuration on each memory interface, RT1170 data will be used but information on RT10xx family is also applicable on this. 

SEMC
SEMC has two configurations for DQS pad, on DQSMD register.

Omar_Anguiano_0-1729282845633.png

 

For DQSMD = 0: We do not have an exact maximum/minimum for the achievable frequency, we only know that when DQSMD we will not reach the maximum SEMC frequency on SDRAM. There could be variations on the frequency on this mode. It is impossible to run at the max 200MHz1 and meet this input timing spec on datasheet, so the clock frequency needs to be decreased to ensure you still meet timing., this depends on the data output delay spec for the memory that is being used.

For DQSMD = 1: As the signal delay is calculated in DQS pad, 200MHz1 frequency can be achieved on this mode, please consider that the pin needs to be floating or apply extra capacitance on special cases which will be discussed below.

As SDRAM device don't output DQS signal, so it take DQS pad as loopback and measure signals delay, and take this delay to compensate and get the correct data strobe point, this can cover most application case and get the good performance, however, if external signal delay is big, it has the complicated topology and long trace, so it can't take DQS pad delay to compensate external SDRAM signal delay.
There are two methods to adjust the delay, the first one is using Delay Chain Control Register(DCCR) while the other one is adding capacitance to the DQS pad; unfortunately there is no formula to calculate the register value and capacitance as this is related to SDRAM signal layout, different layout will get the different signal delay.

There are some particular cases where more than 3 SDRAMs were added to RT1xx, since the combined memories capacitance exceeded the pad capacitance there were issues using the memory at the max speed; this was solved by adding extra capacitance to DQS pin.

 

FlexSPI
FlexSPI DQS pins behaves similarly as the one we found on SEMC with some difference on the available configuration and maximum speeds.

For FlexSPI device there are three different modes of configuration controlled by the RXCLKSRC field on MCR0 register.

RXCLKsrc=0x0 (Internal dummy read strobe and internal loopback)

In this mode DQS pin not used so an alternative option for this pin can be configured, however the achieved frequency is the lowest as the timings for highest speeds cannot be achieved.

Omar_Anguiano_1-1729282845643.png

 

RXCLKsrc=0x1 (Internal dummy read strobe and loopback from DQS pad)

In this mode FlexSPI uses DQS pin and it must be configured for the FlexSPI function, it is not an option to use it for a different purpose in this mode. The internally generated read strobe is sent to the DQS pin and is sampled at the pin to match more closely the data pin timings. The timing for sampling with an internal dummy read strobe loopback is very similar to the timing for loopback from pad but it can achieve a higher frequency than loopbacking internally however not the highest one.

Similarly to the described on the SEMC side, there are some special cases where signal delay is big, the design has a complicated topology or long traces were the solution is adding extra capacitance to DQS pad, As this is dependent of design there is no formula to calculate the needed capacitance.

Omar_Anguiano_2-1729282845651.png

 

RXCLKsrc=0x3 (Flash-memory-provided read strobe)

In this mode DQS signal is provided by the connected memory, this mode allows maximum frequency for the memory however only certain memories provide this signal. The FlexSPI controller delays the read strobe for one half cycle of the serial root clock (with DLL), then samples read data with the delayed strobe.

Omar_Anguiano_3-1729282845659.png

Conclusion

On i.mxRT family commonly uses external memories to execute code or access important data where good performance on the device is needed. To optimize the access speed of the memory DQS signal is always needed as it may limit the speed rate.

1 Please consult the device specific datasheet for detailed rates. 

 

Labels (1)
No ratings
Version history
Last update:
Tuesday
Updated by: