Free up DSQ pin for FlexSPI B

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

Free up DSQ pin for FlexSPI B

611 Views
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 Kudos
6 Replies

522 Views
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

 

514 Views
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 Kudos

597 Views
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 

594 Views
bp1979
Senior Contributor I

Hi@jingpan 

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

0 Kudos

525 Views
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

515 Views
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 Kudos