How to partition an external NOR flash for LittleFS and CODE in a IMXRT1062

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

How to partition an external NOR flash for LittleFS and CODE in a IMXRT1062

ソリューションへジャンプ
3,171件の閲覧回数
patriciocohen
Contributor IV

Hi,

In my custom board I'm using an external NOR Flash connected to FLEXSPI1.
I need to partition this external flash, so it can contain code and also a filesystem. I'm using FreeRTOS and the filesystem is LittleFS.

I have seen some posts that a solution is to execute code from RAM, but this is not possible in my case. I need to be able to run code from flash and use it as filesystem storage as well.

Please give directions on how to do it. At the moment I'm getting hard faults.

1) Do I need to create a partition in MCU Settings?

2) How to configure the MPU in this case?

Is there and example available that shares external NOR flash between code and filesystem?

Thank you,

Patricio

 

 

0 件の賞賛
返信
1 解決策
3,105件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @patriciocohen ,

You can move erase and program function code to SRAM. When it is executing, disable all interrupt and stay in SRAM. The flexspi demo in SDK works in this way.

Or you can use two spi flash.

 

Regards,

Jing

元の投稿で解決策を見る

3 返答(返信)
3,130件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @patriciocohen ,

It's very hard to XIP while littlefs access nor flash. LittleFS access NOR flash in IP command mode(write, erase), XIP read flash on AHB bus. This will certainly cause conflict.

 

Regards,

Jing

0 件の賞賛
返信
3,120件の閲覧回数
patriciocohen
Contributor IV

Hi @jingpan 

Thanks for your reply.

Is there a way to do this that you can think of?

Best regards,

Patricio 

 

0 件の賞賛
返信
3,106件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @patriciocohen ,

You can move erase and program function code to SRAM. When it is executing, disable all interrupt and stay in SRAM. The flexspi demo in SDK works in this way.

Or you can use two spi flash.

 

Regards,

Jing