LPC4357 Filesystem demo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4357 Filesystem demo

2,710 Views
Ashrumochan
Contributor III

Hello Friends,
I am using MCB4300 MCB kit and using sandisk 32GB SDcard for interface.
I imported the example project from pack installer as "FilesystemDemo" then compiled the project.
After flashing into board the help screen is visible in debug(print) window. But not able to perform any read and write functionalities.

After step debugging found that in fmount is returning fsNoFileSystem error .
Also when i try to format using debug window options getting error as Drive M0 not formatted.

I have cross checked the pin configuration and all other setting found okay as per board.
I tried to change filesystem of SDCARD to NTFS/FAT32 but still got same error(fsNoFileSystem).
Can anyone please let me know how to overcome this issue or anything i am missing out?


Regards,

Ashru 

Tags (2)
0 Kudos
13 Replies

2,677 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI 

Please check if you have used the PC to format the card before use. The Fat secification requires 2 bytes at address 510 of Boot sector to be 0xAA55 even if the sector sieze is >512 bytes.

Thanks,

Jun Zhang

 

0 Kudos

2,675 Views
Ashrumochan
Contributor III

Hi Jun Zhang,
Thanks for replying.

yes i have done format using PC. I tried using another sandisk SDcard of 1GB which is working fine.
So for higher GB sdcards what need to be done.

Regards,

Ashrumochan

0 Kudos

2,638 Views
Ashrumochan
Contributor III

Awaiting a solution/suggestion.

0 Kudos

2,632 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

 

- How did you format the card? please send me a screenshot or video

- where did you download your demo? is that from nxp based on LPCOPEN?

0 Kudos

2,628 Views
Ashrumochan
Contributor III

Hi,
for your reference I have attached the screen shots .
Could you please have a look on them?

This is how i taken the example project.

ExprojectPath.PNG

This is how i used to format the card using PC.

format.PNG



Regards,

Ashru

0 Kudos

2,601 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I tested 8G/16G/32G SD cards.

All these 3 cards worked well with the demo. UART3 output log file to terminal which showed these cards are well recognized and read.

Suggest you testing another card.

0 Kudos

2,598 Views
Ashrumochan
Contributor III

I tried with 16GB/32GB/8GB.

But getting the same error. While I am figuring out like it is supporting for only upto 2GB.
Is the project having any issue or the development board SDCARD slot having any issue?

 

If possible can you share your project code?

Regads,

Ashru

0 Kudos

2,591 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Ashru

Please download lpcopen here:

https://www.nxp.com/webapp/Download?colCode=LPCOPEN-3-02-KEIL-MCB-4357

demo code is: sdmmc_speed

Thanks,

Jun Zhang

 

2,587 Views
Ashrumochan
Contributor III

Okay Thank You!

0 Kudos

2,565 Views
Ashrumochan
Contributor III

Hi Jun Zhang,
Thank you for your support!

I tested using the LPCopen example projects .I am able to access SDCARD operation successfully.

Now i want to know what is the difference between pack installer(Fileystem_demo) and LPCopen(SDMMC_Speed/SDMMC) example projects?

Both should work as per me the file systems and all hw registers are similarly used?

 

Can you please have any comments?

 

 

Regards,

Ashrumochan

0 Kudos

2,547 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

From my understanding Fileystem_demo is not NXP demo. I never use it and don't support it.

I suggest you contact Keil for this demo usage.

Thanks for your understanding.

 

2,425 Views
Ashrumochan
Contributor III

Hi Jun Zhang,

I was trying to open file in append mode and write continuosly. 

But in lpcopen example projects if i configure as append mode there no macros defined. And if i am trying like below file open error is observed. 

fp = fopen("abc.txt","a");

In below append mode macro is missing and in fopen definition also i see there is no implementation for append mode.

#define FA_READ 0x01
#define FA_OPEN_EXISTING 0x00
#define FA__ERROR 0x80

#if !_FS_READONLY
#define FA_WRITE 0x02
#define FA_CREATE_NEW 0x04
#define FA_CREATE_ALWAYS 0x08
#define FA_OPEN_ALWAYS 0x10
#define FA__WRITTEN 0x20
#define FA__DIRTY 0x40
#endif

 

Can you suggest how to append data in file using the same drivers?

 

Regards,

Ashru

0 Kudos

2,359 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

This is a new question, please create a new thread to separate different topic. Thanks for your cooperation.