IMXRT1050-EVKB SD card Integration in a C++ project

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

IMXRT1050-EVKB SD card Integration in a C++ project

ソリューションへジャンプ
5,561件の閲覧回数
yogesh_modi
Contributor II

Hello,

I'm trying to integrate SD card FatFs in my tensorflow lite KWS project, I've added all the dependencies like FatFs folder, SDmmc folder in the path, updated the pinMUX.c , Their are no errors in the build.

But still when I call to f_open or any file operation the program gets stuck in a never ending wait state.

It been many days I'm struggling with this iss

ラベル(1)
0 件の賞賛
返信
1 解決策
5,356件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
It seems a bit weird, I was wondering if you can introduce the steps of the integration process in details, next, I'd like to suggest you find the cause related to the phenomenon by the method of exclusion.
Looking forward to your reply.
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.
-------------------------------------------------------------------------------

 

元の投稿で解決策を見る

20 返答(返信)
5,535件の閲覧回数
yogesh_modi
Contributor II

SD card mount is successful but the program gets stuck in any file operation like f_open,f_mkfs, etc.

I'm not able to find the possible issue. So please look into it 

0 件の賞賛
返信
5,526件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you to introduce the steps of porting code in brief at firstly, in further, I was wondering if you can upload the code, as I can replicate the phenomenon on my site.
Looking forward to your reply.
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 件の賞賛
返信
5,523件の閲覧回数
yogesh_modi
Contributor II

Hello,

Thanks for your reply, I tried to integrate two example projects, tensorflow lite KWS and the SD card FatFs example provided in the SDK. I've attached my project below please have a look on it.

https://drive.google.com/file/d/1U_BvPPCIARN9pA5_B9Eh6TuF7rI9lbNT/view?usp=sharing

Thank you.

0 件の賞賛
返信
5,522件の閲覧回数
yogesh_modi
Contributor II

The following are the steps I took to integrate the SD card in my project

  1. copied the source code to my project
  2. copied all the dependencies (Fatfs,SDMMC folders)
  3. added the dependencies to my compile path
  4. updated pin_mux 
  5. Updated the preprocessors.

 

0 件の賞賛
返信
5,499件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
After having a brief review of your demo, I guess the phenomenon is related to the inappropriate porting.
So I created a C++ demo project for SDCARD FATFS, it works well on the MIMXRT1050 EVK board (QSPI) and you can refer to it for details.
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.
-------------------------------------------------------------------------------

5,490件の閲覧回数
yogesh_modi
Contributor II

I tried to upload this project to my board, But it is showing some memory related error.

I've attached the screenshot

0 件の賞賛
返信
5,458件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
The attached project is suited for the QSPI version of the MIMXRT1050 board, however, the default Nor Flash of the MIMXRT1050 board is Hyperflash, so I guess the error is related to Nor Flash incompatibility, and it needs you to check it by yourself, and if my guess is right, please adapt this project to suit for your board.
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 件の賞賛
返信
5,455件の閲覧回数
yogesh_modi
Contributor II

Yes your guess is right the default is hyperflash for my board. So where do I need to make the changes?

0 件の賞賛
返信
5,453件の閲覧回数
yogesh_modi
Contributor II

Actually I'm new to NXP and I don't understand the project structure till now so I'm facing many difficulties to port the code, So please let me know when do I need to make the changes to adapt the code to the default hyperflash.

0 件の賞賛
返信
5,445件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I've adapted the demo project, I think it's Okay now and you can give it a try again.
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.
-------------------------------------------------------------------------------

5,443件の閲覧回数
yogesh_modi
Contributor II

Thanks man,

This is working on my board, now I will try to integrate this to my C++ project and will let you know if it works

0 件の賞賛
返信
5,439件の閲覧回数
yogesh_modi
Contributor II

I tried to integrate this to my project but the issue is still their, SD card mount is successful but the program hangs in file operation like f_open etc. The issue is something else.

0 件の賞賛
返信
5,410件の閲覧回数
yogesh_modi
Contributor II

Hello @jeremyzhou ,

Happy new year!

I tried integrating the CPP project you provided but the problem still exists, So can you try on your end to integrate it in my project?

0 件の賞賛
返信
5,357件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
It seems a bit weird, I was wondering if you can introduce the steps of the integration process in details, next, I'd like to suggest you find the cause related to the phenomenon by the method of exclusion.
Looking forward to your reply.
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.
-------------------------------------------------------------------------------

 

5,350件の閲覧回数
yogesh_modi
Contributor II

Hello @jeremyzhou ,

I followed the following steps:

  1. Copied SDMMC & FTAFS directory to my project
  2. Added them to the compile path as done in sd card project
  3. Updated the preprocessors in project settings
  4. Updated the pinMux file
  5. Copied the source code to my project 

I'm trying to find out the issue by exclusion, if I get any will let you know.

Thank you for your support.

 

0 件の賞賛
返信
5,349件の閲覧回数
yogesh_modi
Contributor II

Program is hanging in sd_disk_initialize()

0 件の賞賛
返信
5,315件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
The sd_disk_initialize is called in many file operations actually,
so whether you mean this function works well sometimes, however, fails sometimes too.
And in my opinion, you give a try to port your project to the
evkbimxrt1050_sdcard_fatfs_C_Plus.
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 件の賞賛
返信
5,311件の閲覧回数
yogesh_modi
Contributor II

Hii @jeremyzhou ,

Thanks for you great support, I found the issue while debugging both projects side by side. The issue was in board.h file a pre-processor was missing, now SD card is working perfectly in my projects.

Thank you.

0 件の賞賛
返信
5,497件の閲覧回数
yogesh_modi
Contributor II

Hello,

Thanks for your efforts, I also think the same that it might be the porting issue,

I will try to port this C++ project and will let you know.

 

Thank you.

0 件の賞賛
返信
3,677件の閲覧回数
Arkadiusz
Contributor I

Hello. What was wrong inside board.h file? I'm trying to run C++ project with freertos, fatfs & sdcard too but im stuck on the same function as you described.

I attached my project

0 件の賞賛
返信