RT1060 uses rom api to implement file system

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RT1060 uses rom api to implement file system

跳至解决方案
1,955 次查看
2548903578
Contributor III

Hello

Because we don't use sd card on our board, so the file system can only be ported on nor flash. There is rom api in the official sdk package, so I ported the file system based on this. However, during testing, it was found that sometimes it could be mounted, and sometimes it could not be mounted. When I use to create directories and files, there is a high probability of failure or even board reset.

Hardware Details
Device :MIMXRT1061

Nor Flash:W25Q128JVSQ
SDK Details

SDK Name:SDK_2.x_MIMXRT1061xxxxA
SDK Version :2.11.1 (563 2022-03-24)
Host OS :Windows
Toolchain :MCUXpresso IDE(11.5.0_7232)
Middleware  :FatFS, FreeRTOS

Drivers:fsl_romapi.c,fsl_romapi.h
Reference Demo

SDK_2.11.1_EVK-MIMXRT1060\evkmimxrt1060_fsl_romapi

Reference Post

https://community.nxp.com/t5/i-MX-Processors/FatFs-with-nor-flash-memory-MIMXRT1062/m-p/975244

Phenomenon

QQ截图20220527090209.png

The device resets after entering the create directory command.

0 项奖励
回复
1 解答
1,884 次查看
jeremyzhou
NXP Employee
NXP Employee


Hi,
Thanks for your reply.
To provide the fastest possible support, I'd highly recommend you refer to the post to learn how to debug in the SDRAM.
Have a great day,
TIC

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

在原帖中查看解决方案

0 项奖励
回复
8 回复数
1,940 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I'd like to know the ratio of the issues happening, further, whether you can introduce the steps of porting code and upload the whole demo code.
Have a great day,
TIC

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
1,926 次查看
2548903578
Contributor III

Hi,

I modified the romapi demo based on the development board to create a fatfs project on nor flash. The phenomenon is exactly the same as when I first started. Hope you can give me some advice! thank you very much!

0 项奖励
回复
1,898 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Firstly, according to your reply, it will encounter the issue after the task scheduler begins to work, is it right?
Second, I was wondering if you can list the steps of porting code,
Lastly, I guess the issue may be related to a lack of taking critical section protection prior to calling ROM APIs, I‘d like to suggest you use the pair of taskENTER_CRITICAL() and taskEXIT_CRITICAL() to do it.
Have a great day,
TIC

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
1,890 次查看
2548903578
Contributor III

Hi,

After several days of testing, it was found that the program was running in the flash and used the file system to operate the flash. This will cause the program to hang. Now you can run the program in the external sram. But another problem is that I am using the mcupresso Secure Provisioning tool to program the program, which will cause me to adjust the mode of the board every time. It is not possible to download directly using the ide. And it is also very inconvenient for debugging. I would like to ask if the program can run directly in the external SRAM? It doesn't matter if the power is lost. This makes debugging easier.

0 项奖励
回复
1,885 次查看
jeremyzhou
NXP Employee
NXP Employee


Hi,
Thanks for your reply.
To provide the fastest possible support, I'd highly recommend you refer to the post to learn how to debug in the SDRAM.
Have a great day,
TIC

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 项奖励
回复
1,881 次查看
2548903578
Contributor III

Hi,

Thank you very much for your reply, this article was very useful to me. But the article mentioned that the script RT1050_SDRAM_Init.scp is for the rt1050 chip. Does rt1060 also work? If not, where should I get this script RT1060_SDRAM_Init.scp. Looking forward to your reply!

0 项奖励
回复
1,870 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Does rt1060 also work?
-- Yes.
Have a great day,
TIC

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
1,938 次查看
2548903578
Contributor III

Hi,

Temporarily unable to upload the entire project, here I upload the interface files of fatfs and rom api first. I think there may be something wrong with the configuration of these two files. Looking forward to your reply!

0 项奖励
回复