1021/1024 FlexSPI A DSQ pin conflicts with FlexSPI B SS0

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

1021/1024 FlexSPI A DSQ pin conflicts with FlexSPI B SS0

Jump to solution
1,241 Views
bp1979
Senior Contributor I

Dear nxp,
Still struggling getting our secondary flash operational. I've opened two topics on this board earlier, and with your help I think we (our project) now also understands the comment raised by nxp on our previous question.

https://community.nxp.com/t5/i-MX-RT/imx-rt-1021-custom-board-use-flash-on-FlexSPI-B/td-p/1495752

 

bp1979_0-1675714665347.png

 

Here Jeremy Zhou already noticed that we misuse the FlexSPI B SS0 pin, since it's using the same pin required by FlexSPI A DSQ.

We've read through the reference manual and mostly read about things we don't understand well enough. But we do understand that DSQ is mandatory to run flash in 133mhz.

Does that mean, that we can "disable" the DSQ function and run flash on a lower frequency? Because that would mean that we are still able to get both Flash A and Flash B operational, with the current schematics. Right?

If this is still correct, could you please advise us how to configure FlexSPI A as such that it no longer needs to claim the DSQ pin, and thus, that we can use pin 29 for for FlexSPI B SS0?

0 Kudos
1 Solution
1,148 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @bp1979 ,

1. Yes, if you set the frequency to 60M, DQS pin can be used to other function.

2. In RT1020/1024 SDK, there is flashloader project. It is similar to boot ROM. But boot ROM is secret, will never open to customer.

 

Regards,

Jing 

View solution in original post

7 Replies
1,227 Views
mitterha
Senior Contributor I

Hello,

yes it is possible to use flash A1 and B1 with the smaller packages.

Reduce the frequency to e.g. 60MHz and use .readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad. Furthermore the Boot-ROM will not initialize Flash B1 pins correctly. Therefore you will have to initialize the pins used for flash b1 and after that initilize your flash B1 (e.g. setting quad enable if necessary) before using it.

I think there is a table with maximum flash frequency while using different read sample clock settings in the electrical characteristics datasheet.

Kind regards,

Steve

0 Kudos
1,209 Views
bp1979
Senior Contributor I

Hi Steve,

Thanks for the reply. A couple of additional questions to hopefully understand better how to proceed.

1. FlexSPI A has a pin for DSQ which is supposed to remain floating, in order to run the flash module connected to FlexSPI A to run on 133mhz. Correct? Because that pin, is routed to SD_B1_05. And that very same pin is used for FlexSPI B SS0. So in order to be able to use SD_B1_05 for FlexSPI B, I *need* to configure that pin for SS0 for FlexSPI B, effectively writing that pin 0. Are you sure if I configure FlexSPI A to run on 60 mhz, the SD_B1_05 pin will have no effect on FlexSPI A?

2. If that's the case, how do I configure the speed for FlexSPI A? Is that also defined in the XIP bytes written to 0x6000 0000 ?

0 Kudos
1,183 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @bp1979 ,

1. FlexSPI A and B can only have same speed.

2. FlexSPI B DQS can only use GPIO_SD_B0_05, can't use GPIO_SD_B1_05. 

 

Regards,

Jing

0 Kudos
1,172 Views
bp1979
Senior Contributor I

Hi@jingpan  !

 

Thanks for taking the time to reply! I am still very much in the process of "demystifying" stuff for my brain.

I spend some time in MCUxpresso in the clock configuration and found that I indeed can set the clock for FlexSPI to a frequency of 60mhz (after playing around with the clock source and divider a bit).

But, the code which gets updated then, is in a `#define` which is only compiled without SDK XIP.

Am I correct that the FlexSPI clock is configured *through the DCD bytes" which are stored at 0x60000000? Because I also found a part where the frequency of the flash is set, in the part which gets compiled to these DCD / XIP bytes. But I am afraid to adjust them and maybe brick my board.

Any advise here? Or maybe an SDK example that details on running flash / FlexSPI on a slower frequency (60mhz)?

Thanks a lot in advance!

 

 

 

 

 

 

0 Kudos
1,164 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @bp1979 ,

In SDK demo project, there is a evkmimxrt1021_flexspi_nor_config.c. In this file, it has a qspiflash_config structure. In the structure, serialClkFreq define the flexspi clock speed.

This structure will be put in to FCB section (at 0x60000000) when compile. Boot ROM will read FCB and configure the flexspi.

 

Regards,

Jing

0 Kudos
1,157 Views
bp1979
Senior Contributor I

Hi @jingpan 

Again, thank you so much for the answers! Great help so far.

OK, so by just changing the frequency in flash config in *flexspi_nor_config, the internal bootloader will confgure the flexspi clock accordingly. So just to be 100% clear, when I change that enum value to 60mhz, I can do whatever with the FlexSPI A DSQ pin, write it high, write it low, and my program will remain running. The FlexSPI A DSQ pin no longer plays any role for the FlexSPI A device?

One side question, is it possible to see the code which is running in the internal bootloader? Is that open sourced by any chance?

0 Kudos
1,149 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @bp1979 ,

1. Yes, if you set the frequency to 60M, DQS pin can be used to other function.

2. In RT1020/1024 SDK, there is flashloader project. It is similar to boot ROM. But boot ROM is secret, will never open to customer.

 

Regards,

Jing