Using Hyperflash as Data-Storage

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Hyperflash as Data-Storage

Jump to solution
480 Views
Masmiseim
Contributor V

#MIMX-RT1050-EVK

Hello,

 

Are there any examples around how to use the Hyperflash as Data-Storage while simultaneously running code out of it?

I’m aware that the SDK has some examples for using the flexSPI with NOR and Hyperflash, but this example run out of the On-Chip-RAM.

I believe with running out of the Hyperflash things are a bit different. The Interface should be already initialized by the On-Chip-Bootloader. The routines doing the actual access should be running out of RAM (ITCM) … anything else?

 

Thanks and Regards

Tags (1)
0 Kudos
1 Solution
201 Views
art
NXP TechSupport
NXP TechSupport

Q. When booting from it everything should be initialized by the Bootloder, correct? All the things which are done in ‘FLEXSPI_Init’ shouldn’t be necessary, only the LUT should be initialized, right?

A. Seems that only the Read path of the FlexSPI controller is initialized by the BootROM code to XiP the code from HyperFlash. So, the right sequence seems to move the code that initializes the FlexSPI Write path and then performs read/erase/write to ITCM, then jump there, initialize the Write path first and then perform read/erase/write only from ITCM as a separate and complete routine.

View solution in original post

0 Kudos
5 Replies
201 Views
art
NXP TechSupport
NXP TechSupport

It is not possible to simultaneously execute the code in XiP mode and write data to physically the same HyperFlash memory. A separate HyperFlash memory on the differnt chip select should be used to store data. Or, the code should be loaded into RAM and executed from there.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
102 Views
jose_au_zone
Contributor II

Hi Art. I hope you see this after those years

Did you mean that it is not possible to write to any address of the same hyperflash that's being used with XIP?

Even if my application is running, say in the first 4KB of a 32MB hyperflash, I cannot write to any address of such hyperflash?

 

Thanks!

0 Kudos
201 Views
Masmiseim
Contributor V

Hello Artur,

 

Thanks for the reply.

Is it enough to executed the Routines which do the actual reading\writing\erasing in the ITCM?
Based on the NXP-SDK: Is it enough that the routine FLEXSPI_TransferBlocking plus the ones called inside go into the ITCM and the rest is executed in XIP?

I tried to do that and my program is crashing when trying to erase and ending in an endless loop when trying to write some Data. The endless loop is in this one here:
while (!((status = base->INTR) & kFLEXSPI_IpTxFifoWatermarkEmpltyFlag))
{
}

Reading seems to be working fine.

 

What do I have to do for the initialization of the flexSPI. When booting from it everything should be initialized by the Bootloder, correct?
All the things which are done in ‘FLEXSPI_Init’ shouldn’t be necessary, only the LUT should be initialized, right?

 

Best Regards

0 Kudos
202 Views
art
NXP TechSupport
NXP TechSupport

Q. When booting from it everything should be initialized by the Bootloder, correct? All the things which are done in ‘FLEXSPI_Init’ shouldn’t be necessary, only the LUT should be initialized, right?

A. Seems that only the Read path of the FlexSPI controller is initialized by the BootROM code to XiP the code from HyperFlash. So, the right sequence seems to move the code that initializes the FlexSPI Write path and then performs read/erase/write to ITCM, then jump there, initialize the Write path first and then perform read/erase/write only from ITCM as a separate and complete routine.

View solution in original post

0 Kudos
201 Views
Masmiseim
Contributor V

Hey Artur,

 

now everything is working fine. We had some additional problems with the QSPI-Interface instead of the Hyperflash, but now it’s working.

 

Thank you.

0 Kudos