Does the MQX4.1 support micro SD card

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

Does the MQX4.1 support micro SD card

Jump to solution
1,846 Views
小勇邹
Contributor II

My source code works normally in the Freescale_MQX_4_1_TWRK64F120M.

It can open the SD card and access the file in it. But there is a “NOT_A_DOS_DISK”
error when let the source code run in our product. The micro SD card is used in
our product. The micro SD card is produced by Kingston and its type is
SDC10/32GB.

0 Kudos
Reply
1 Solution
1,473 Views
DavidS
NXP Employee
NXP Employee

Hi Robin,

Not sure where the issue is.

With MQX_4.1.1 I have run the mfs_sdcard_frdmk64f works fine with SD Cards formatted as FAT (256MB card) or FAT32 (16GB card) .  But it doesn't work with exFAT(64GB card).

The KSDK_1.2.0 sdhc_sdcard_example does recognize all cards but note that it is in the raw format and not using MFS of any variety.

I spoke with a MQX developer and he states the following:

I am not aware about SDCARD capacity limitation in MFS. There is no intentional or implied technical limit.

The possible reasons may be:

  1. 1)      The customer is using factory formatted SDCARDs and the 32 GB one is SDXC (factory formatted to exFAT, which is not compatible), but I would expect the opening of “a:” to succeed, then format would be needed, so this is unlikely.
  2. 2)      The cards may differ in partition table (one having a partition table and the other one directly containing the filesystem).
  3. 3)      There may be a bug in 4.1. There are significant differences between 4.1 and 4.2/KSDK 1.2.0 in MFS sources, however I am not aware about changes which would make such difference.

Anyways, more information is needed to identify the issue.

So my memory must be wrong about a size limit....I guess.

I then ran a quick test with C:\Freescale\KSDK_1.2.0\middleware\filesystem\mfs\examples\sdcard and was able to access the 256MB and 16GB cards I have but not the 64GB.  So this matches the MQX4.1.1 behavior. 

Regards,

David

View solution in original post

0 Kudos
Reply
10 Replies
1,473 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

Yes, MQX 4.1 and K64 spport micro SD card. we have a demo project

C:\Freescale\Freescale_MQX_4_1\mfs\examples\sdcard\build\cw10gcc\mfs_sdcard_frdmk64f

You can check our frdmk64f design and config


Have a nice day,
Daniel

0 Kudos
Reply
1,473 Views
小勇邹
Contributor II

Dear Daniel,

Thank you.

But there is a “NOT_A_DOS_DISK”

error when let the source code run in our product. The micro SD card is used in

our product. The micro SD card is produced by Kingston and its type is

SDC10/32GB.

0 Kudos
Reply
1,473 Views
DavidS
NXP Employee
NXP Employee

Hi Robin,

I have found that the MFS has a maximum size that it will allow for SD Cards.  I think it might be 8GBytes works and bigger sizes don't.

You might want to try a smaller sized memory card.

Regards,

David

0 Kudos
Reply
1,473 Views
小勇邹
Contributor II

Dear David,

I am sorry for the wrong description above.

The correct one is shown bellow.

After changing from 32G to 4G, there is not error when doing the function fopen("a:", NULL).

But it cannot open the file. For example, fopen("a:SDFunction.INI", "r"). It always returns NULL.

I let the example “C:\Freescale\KSDK_1.2.0\examples\twrk64f120m\driver_examples\sdhc_sdcard\iar” run in my hardware.

I debug it and find that “SDCARD_DRV_Init(&host,&card)” and  “SDCARD_DRV_ReadBlocks(&card, testData, 1,1)”  run normally.

The  KSDK_1.2.0 can access the micro SD card but it seems that the MFS in MQX4.1 can not access the file in the micro SD card.

What is the reason?

Regards,

Robin

0 Kudos
Reply
1,474 Views
DavidS
NXP Employee
NXP Employee

Hi Robin,

Not sure where the issue is.

With MQX_4.1.1 I have run the mfs_sdcard_frdmk64f works fine with SD Cards formatted as FAT (256MB card) or FAT32 (16GB card) .  But it doesn't work with exFAT(64GB card).

The KSDK_1.2.0 sdhc_sdcard_example does recognize all cards but note that it is in the raw format and not using MFS of any variety.

I spoke with a MQX developer and he states the following:

I am not aware about SDCARD capacity limitation in MFS. There is no intentional or implied technical limit.

The possible reasons may be:

  1. 1)      The customer is using factory formatted SDCARDs and the 32 GB one is SDXC (factory formatted to exFAT, which is not compatible), but I would expect the opening of “a:” to succeed, then format would be needed, so this is unlikely.
  2. 2)      The cards may differ in partition table (one having a partition table and the other one directly containing the filesystem).
  3. 3)      There may be a bug in 4.1. There are significant differences between 4.1 and 4.2/KSDK 1.2.0 in MFS sources, however I am not aware about changes which would make such difference.

Anyways, more information is needed to identify the issue.

So my memory must be wrong about a size limit....I guess.

I then ran a quick test with C:\Freescale\KSDK_1.2.0\middleware\filesystem\mfs\examples\sdcard and was able to access the 256MB and 16GB cards I have but not the 64GB.  So this matches the MQX4.1.1 behavior. 

Regards,

David

0 Kudos
Reply
1,473 Views
小勇邹
Contributor II

Dear David,

Thank you very much.

The issue is as fellow shown.

“The cards may differ in partition table (one having a partition table and the other one directly containing the filesystem).”

My micro SD card has a partition table. But I cannot see it in the PC. So I have not installed MFS over partition.

The 32G micro SD card is OK after installing MFS over partition.

Best regards.

Robin Zou.

Robin-XiaoYong Zou

ABB Xiamen Low Voltage Equipment Company Limited

BU LPLS E&D China

No. 12-20,3rd Chuang Xin Road Xiamen SEZ,Fujian 361006 P.R.China

CN

Phone: +86 592 5767877

Telefax: +86 592 6038110

Mobile: +86 181-5089-3720

email: robin-xiaoyong.zou@cn.abb.com<mailto:robin-xiaoyong.zou@cn.abb.com>

0 Kudos
Reply
1,473 Views
小勇邹
Contributor II

And the function SDCARD_DRV_SendIfCond(card)  returns the error “kStatus_SDHC_RequestFailed”.

0 Kudos
Reply
1,473 Views
小勇邹
Contributor II

Dear David,

After changing from 32G to 4G, there is not error when doing the function fopen("a:", NULL).

But it cannot open the file. For example, fopen("a:SDFunction.INI", "r"). It always returns NULL.

I let the example “C:\Freescale\KSDK_1.2.0\examples\twrk64f120m\driver_examples\sdhc_sdcard\iar” run in my hardware.

I debug it and find that the function “SDCARD_DRV_Init” returns the error  “kStatus_SDHC_NotSupportYet”.

What is the reason?

Regards,

Robin

0 Kudos
Reply
1,473 Views
小勇邹
Contributor II

Dear David,

Maybe we cannot buy the SD card that is smaller than 32G in the future.

Is it possible to let MFS support the 32G by modifying MFS source code? Or does the MFS in MQX4.2 support 32G ?

Regards,

Robin

0 Kudos
Reply
1,473 Views
小勇邹
Contributor II

Dear David,

Thank you.

Which document can I find the information "The maximum size that it will allow for SD Cards"?

Regards,

Robin

0 Kudos
Reply