Free up DSQ pin for FlexSPI B

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Free up DSQ pin for FlexSPI B

675 次查看
bp1979
Senior Contributor I

I am following up on an old question, we are getting further but still not there with a working solution.

Our problem remains the same, we have two flashes on our custom board. One "external" module in the 1024, connected to FlexSPI A1, and another external flash (8MB, same flash module as 1021 uses) connected to FlexSPI B1.

As explained in linked issue, our custom board uses SD_B1_05 for flash B, while it is also used for flash A where it can serve as a DQS pad.

bp1979_0-1702591695940.png

From the reference manual, I understand that this DQS pad can be used to get a higher frequency from flash (e.g. 133 Mhz). Our software runs fine with 60 Mhz, we have no need for getting the 133 Mhz.

I am trying to free up the DQS pin for flash A, so that I can mux it for flash B SS0 function. But when I do that, the app hard faults immediately when SD_B1_05 is muxed for flash B SS0.

my problem reproduces perfectly with the blinky SDK example, on an EVK.

EVK 1024:

- import SDK example: blinky

- upload to target => runs fine

- mux SD_B1_05 for anything as long as it is not flash A DSQ (e.g. mux it as GPIO3 IO25)

- upload to target => hard fault (IBUSERR)

From the reference manual:

bp1979_1-1702592500328.png

Is MCR0 the problem? Should I do something for MCR0 make sure the RXCLKSRC is set to 0? I glanced at the code, but I can't seem to find what I need to change to make this happen.

So my question:

I need to free up SD_B1_05, I want to proof that it works by running blinky from flash, while SD_B1_05 is muxed for any other peripheral. What other changes do I need to make this happen?

 

 

0 项奖励
7 回复数

61 次查看
yosri_c
Contributor I

hello everyone, sorry to jump in like this but we currently facing some issues with the flash frequency, we're using an external flash NOR with an RT1176, now everything works fine with 60Mhz but we need to raise it to at least 100/133Mhz, we noticed that we're using the loopback internally as areadSampleClkSrc and that would not get the needed freq, so we changed it to loop from DQS pad, changed the frequency to 133Mhz and it didn't even start.. any clue on what to change a part from readSampleClkSrc to loopback from DQS 

0 项奖励

586 次查看
Rick_Bourgeois1
Contributor II

I had the same or similar problem.

I am new to iMXRT1021 and through a lot of trials and errors discovered this gem.

In the XIP DIRECTORY evkmimxrt1020_flexspi_nor_config.c has this code.

.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,

change it to:

.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackInternally

 

578 次查看
bp1979
Senior Contributor I

@Rick_Bourgeois1Thanks for pointing that out. We found it as well a few days ago. Still not there getting flash2 working, but bit by bit I think we are understanding more and more :).

Anyway, this was what I was looking for! For the 1024 its a bit more special it seems, since the ROM code for 1024 doesn't seem to initialize DQS, so that bit is dealt with in the startup code of SDK examples.

So I think the part in xip bytes is irrelevant for the 1024, as its overruled in SystemInit. I think for now I now enough, time to drill down further in reference manual and hopefully learn whatever we're missing atm

Thx both!

0 项奖励

661 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @bp1979 ,

If it's not in debug mode, the system will boot up on FCB's configuration. For example, in iled_blinky demo, readSampleClkSrc is loopback internally. But when debug, you'll find this MCR0[RXCLKSRC] is 1, that is  loopback from DQS pad. I think this is set by the tool. So, you must change it to 0. Then mux the SD_B1_05 to other function.

 

Regards,

Jing 

658 次查看
bp1979
Senior Contributor I

Hi@jingpan 

Thx for your reply! What is "FCB" configuration?

0 项奖励

589 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @bp1979 ,

Please see the evkmimxrt1024_flexspi_nor_config.c in your project. The detail is in 9.6.2.1 in RM.

 

Regards,

Jing

579 次查看
bp1979
Senior Contributor I

Hi @jingpan 

So FCB stands for "flexspi configuration block".

Thx for the link to RM! This reveals a lot of details I figured out more or less by reverse engineering code, but I probably would have been better off reading these parts of documentation first :).

 

0 项奖励