SD Card: NOT A DOS DISK! You must format to continue.

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

SD Card: NOT A DOS DISK! You must format to continue.

Jump to solution
3,232 Views
Mike_d
Contributor IV

When I plug in a new SD Card out of the package I get the message, NOT A DOS DISK! You must format to continue.  Windows XP can read it fine.  I was told that MQX can read an SD Card formatted by Windows so I had XP format it with FAT32 but still no luck.

 

If I format it with MQX it will then work and Windows can also read it.  If I format a card with Windows that has been previously formatted by MQX everything is fine.

 

So I guess there is a bug in MQX. Something is being written to it that Windows does not write.  I want to preload the SD card with data before it is introduced to MQX so I need Windows to be able to format it.  Any help is appreciated.

 

-Mike

0 Kudos
1 Solution
578 Views
PetrM
Senior Contributor I

Hard drives used to carry their attributes along with the boot code in sector 0 (MBR).

That's what MFS reads/checks before it mounts the drive.

Nowadays, the SD card factory information in sector 0 is restricted only to partitions, so MFS doesn't find the attributes and refuses such drives.

 

The solution is to use partition manager upon the MFS, because it deals only with the available partition information. Please replace the attached file in your MFS sdcard example which enables you to use partition manager whenever possible.

 

Regards,

PetrM

 

View solution in original post

0 Kudos
5 Replies
579 Views
PetrM
Senior Contributor I

Hard drives used to carry their attributes along with the boot code in sector 0 (MBR).

That's what MFS reads/checks before it mounts the drive.

Nowadays, the SD card factory information in sector 0 is restricted only to partitions, so MFS doesn't find the attributes and refuses such drives.

 

The solution is to use partition manager upon the MFS, because it deals only with the available partition information. Please replace the attached file in your MFS sdcard example which enables you to use partition manager whenever possible.

 

Regards,

PetrM

 

0 Kudos
578 Views
Mike_d
Contributor IV

PetrM,

 

Thanks for the update.  Works great!

 

While we're on the subject about the SD Demo.  What do you recommend doing if I hit one if the _task_block()s?

 

-Mike

0 Kudos
578 Views
PetrM
Senior Contributor I

Well, task_block() is here just for simplicity. It should be replaced by some mechanism, that prints what happened, restores the state (uninstalls, closes everything since card detection) and waits for card removal. Then it should start checking for the card presence again (main loop).

 

PetrM

 

0 Kudos
578 Views
Tonkabot
Contributor III

I just got my MCF52255 to run the demo.c for the SDcard, and it works!

 

I do have a couple questions about it, though...

1) Does the sdcard stuff have to be in a separate task like in your demo.c?    I can't see a reason that it needs to be, can you explain the reasoning here?

 

2) Does this work correctly with SDHC cards?   is there a size limit? 

    I am using a 1GB card for testing and it seems to work fine, with just a few dinky files on it.

 

Brynn

0 Kudos
578 Views
PetrM
Senior Contributor I

The shell task reacts only to terminal input and the infinite loop is there only for the case when user types "exit" command. So this task has to be separate. If you want to react to card insertion/removal, there has to be another task.

 

Yes, the driver supports SHDC cards, 8 GB card has been sucessfully tested.

 

PetrM

 

0 Kudos