Using Hyperflash as Data-Storage

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using Hyperflash as Data-Storage

ソリューションへジャンプ
2,696件の閲覧回数
Masmiseim
Senior Contributor I

#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

タグ(1)
0 件の賞賛
返信
1 解決策
2,417件の閲覧回数
art
NXP Employee
NXP Employee

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.

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
2,417件の閲覧回数
art
NXP Employee
NXP Employee

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 件の賞賛
返信
2,318件の閲覧回数
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 件の賞賛
返信
2,417件の閲覧回数
Masmiseim
Senior Contributor I

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 件の賞賛
返信
2,418件の閲覧回数
art
NXP Employee
NXP Employee

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.

0 件の賞賛
返信
2,417件の閲覧回数
Masmiseim
Senior Contributor I

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 件の賞賛
返信
1,794件の閲覧回数
rathna
Contributor I

Hi NXP

 

Could this sample call functions and the code flow can be shared ??

 

We are trying to copy the contents from hyperflash to RAM area and then go for flash erase,write and read

with the hex files contents received from serial

 

thanks in advance

ratna

 

0 件の賞賛
返信