Hi

My MMC card driver is working fine but when i insert an unformatted MMC
card, then a dialog appears asking for formatting. If i select yes in the
dialog box to format, my MMC card is not formatted. Can any one help me to
format the MMC card from my driver.

Thanks and Regards
Anand

RE: Formatting MMC card by adamkod

adamkod
Fri Nov 14 12:03:02 CST 2003

Which version of Windows CE do you have? Are you developing your own MMC
driver?

SD/MMC cards have very specific formatting requirements ({disk size,
cluster size} combinations aren't very flexible). If a disk is large
enough, Windows CE will attempt to format to FAT32. However, SD/MMC cards
only support FAT16. We are in the process of addressing this issue, in
addition to providing more flexibility with respect to volume formatting.

---
Adam Kodeda [MS]
Windows CE File Systems/Storage

To reply directly, remove "online." from my e-mail address.
This posting is provided AS IS with no warranties, and confers no rights.

--------------------
>From: "Anand" <anand@mdr-tech.com>
>Subject: Formatting MMC card
>Date: Thu, 13 Nov 2003 11:33:30 +0800
>Lines: 11
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <uNiUUbZqDHA.1680@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.windowsce.platbuilder
>NNTP-Posting-Host: bb-203-125-36-153.singnet.com.sg 203.125.36.153
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:42064
>X-Tomcat-NG: microsoft.public.windowsce.platbuilder
>
>Hi
>
>My MMC card driver is working fine but when i insert an unformatted MMC
>card, then a dialog appears asking for formatting. If i select yes in the
>dialog box to format, my MMC card is not formatted. Can any one help me to
>format the MMC card from my driver.
>
>Thanks and Regards
>Anand
>
>
>


Re: Formatting MMC card by Anand

Anand
Sun Nov 16 19:51:23 CST 2003

Hi Adam Kodeda,

Thanks a lot for ur reply. I'm using WinCE 4.2. I'm writing my own MMC
driver.
I found using debug messages, when I inserted an unformatted MMC card, the
OS tries to write something in sector zero. but even after finished writing,
the card is not formatted.

can u help me to resolve this.

regards
Anand

"Adam Kodeda [MS]" <adamkod@online.microsoft.com> wrote in message
news:mFTuNmtqDHA.2164@cpmsftngxa06.phx.gbl...
> Which version of Windows CE do you have? Are you developing your own MMC
> driver?
>
> SD/MMC cards have very specific formatting requirements ({disk size,
> cluster size} combinations aren't very flexible). If a disk is large
> enough, Windows CE will attempt to format to FAT32. However, SD/MMC cards
> only support FAT16. We are in the process of addressing this issue, in
> addition to providing more flexibility with respect to volume formatting.
>
> ---
> Adam Kodeda [MS]
> Windows CE File Systems/Storage
>
> To reply directly, remove "online." from my e-mail address.
> This posting is provided AS IS with no warranties, and confers no rights.
>
> --------------------
> >From: "Anand" <anand@mdr-tech.com>
> >Subject: Formatting MMC card
> >Date: Thu, 13 Nov 2003 11:33:30 +0800
> >Lines: 11
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> >Message-ID: <uNiUUbZqDHA.1680@TK2MSFTNGP10.phx.gbl>
> >Newsgroups: microsoft.public.windowsce.platbuilder
> >NNTP-Posting-Host: bb-203-125-36-153.singnet.com.sg 203.125.36.153
> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
> >Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:42064
> >X-Tomcat-NG: microsoft.public.windowsce.platbuilder
> >
> >Hi
> >
> >My MMC card driver is working fine but when i insert an unformatted MMC
> >card, then a dialog appears asking for formatting. If i select yes in the
> >dialog box to format, my MMC card is not formatted. Can any one help me
to
> >format the MMC card from my driver.
> >
> >Thanks and Regards
> >Anand
> >
> >
> >
>



Re: Formatting MMC card by adamkod

adamkod
Mon Nov 17 14:48:12 CST 2003

Can you please post your debug output and your custom MMC storage profile
registry key? Also, which BSP/platform and MMC controller are you
targeting?

---
Adam Kodeda [MS]
Windows CE File Systems/Storage

To reply directly, remove "online." from my e-mail address.
This posting is provided AS IS with no warranties, and confers no rights.

--------------------
>From: "Anand" <anand@mdr-tech.com>
>References: <uNiUUbZqDHA.1680@TK2MSFTNGP10.phx.gbl>
<mFTuNmtqDHA.2164@cpmsftngxa06.phx.gbl>
>Subject: Re: Formatting MMC card
>Date: Mon, 17 Nov 2003 09:51:23 +0800
>Lines: 63
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <#KRvW1KrDHA.2488@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.windowsce.platbuilder
>NNTP-Posting-Host: bb-203-125-36-153.singnet.com.sg 203.125.36.153
>Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.
phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:42207
>X-Tomcat-NG: microsoft.public.windowsce.platbuilder
>
>Hi Adam Kodeda,
>
>Thanks a lot for ur reply. I'm using WinCE 4.2. I'm writing my own MMC
>driver.
>I found using debug messages, when I inserted an unformatted MMC card, the
>OS tries to write something in sector zero. but even after finished
writing,
>the card is not formatted.
>
>can u help me to resolve this.
>
>regards
>Anand
>
>"Adam Kodeda [MS]" <adamkod@online.microsoft.com> wrote in message
>news:mFTuNmtqDHA.2164@cpmsftngxa06.phx.gbl...
>> Which version of Windows CE do you have? Are you developing your own MMC
>> driver?
>>
>> SD/MMC cards have very specific formatting requirements ({disk size,
>> cluster size} combinations aren't very flexible). If a disk is large
>> enough, Windows CE will attempt to format to FAT32. However, SD/MMC
cards
>> only support FAT16. We are in the process of addressing this issue, in
>> addition to providing more flexibility with respect to volume formatting.
>>
>> ---
>> Adam Kodeda [MS]
>> Windows CE File Systems/Storage
>>
>> To reply directly, remove "online." from my e-mail address.
>> This posting is provided AS IS with no warranties, and confers no rights.
>>
>> --------------------
>> >From: "Anand" <anand@mdr-tech.com>
>> >Subject: Formatting MMC card
>> >Date: Thu, 13 Nov 2003 11:33:30 +0800
>> >Lines: 11
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>> >Message-ID: <uNiUUbZqDHA.1680@TK2MSFTNGP10.phx.gbl>
>> >Newsgroups: microsoft.public.windowsce.platbuilder
>> >NNTP-Posting-Host: bb-203-125-36-153.singnet.com.sg 203.125.36.153
>> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
>> >Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:42064
>> >X-Tomcat-NG: microsoft.public.windowsce.platbuilder
>> >
>> >Hi
>> >
>> >My MMC card driver is working fine but when i insert an unformatted MMC
>> >card, then a dialog appears asking for formatting. If i select yes in
the
>> >dialog box to format, my MMC card is not formatted. Can any one help me
>to
>> >format the MMC card from my driver.
>> >
>> >Thanks and Regards
>> >Anand
>> >
>> >
>> >
>>
>
>
>


Re: Formatting MMC card by Anand

Anand
Mon Nov 17 20:21:16 CST 2003

Hi Adam,

The registry settings:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StorageCardLoader]
"Prefix"="SCL"
"Dll"="StorageCardLoader.Dll"
"Order"=dword:0
"Ioctl"=dword:4
"FriendlyName"="Storage Card Loader"

[HKEY_LOCAL_MACHINE\Drivers\MMCSD]
"FSD"="FATFS.DLL"
"Prefix"= "DSK"
"Dll"="mmcsd.dll"
"Index"=dword:1
"IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMCSD]
"Name"="SD/MMC Card"
"Folder"="MMCSD"

The debug messages...

DSK_IOControl: Read / Write
MMCSD_ReadSingleBlock+, Address:0x0, Size:0x200
MMCSD_ReceiveSingleBlock+, pbyBuffer:0x0406caa0, dwLength:0x200
MMCSD_ReceiveSingleBlock-
MMCSD_ReadSingleBlock-
DSK_IOControl: Read / Write
MMCSD_ReadSingleBlock+, Address:0x0, Size:0x200
MMCSD_ReceiveSingleBlock+, pbyBuffer:0x0406caa0, dwLength:0x200
MMCSD_ReceiveSingleBlock-
MMCSD_ReadSingleBlock-
DSK_IOControl: Format Starting...
DSK_IOControl: Read / Write
MMCSD_Write+: 00000000, 0406cac0, 00001000
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406cac0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406ccc0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406cec0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d0c0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d2c0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d4c0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d6c0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d8c0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_Write-: 00001000
DSK_IOControl: Write data to MMC sector no = 0
DSK_IOControl: Read / Write
MMCSD_Write+: 00000000, 0406cac0, 00000200
MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406cac0, dwLength:0x200
MMCSD_TransmitSingleBlock-
MMCSD_Write-: 00000200
DSK_IOControl: Write data to MMC sector no = 0
DSK_IOControl: Read / Write
MMCSD_ReadSingleBlock+, Address:0x0, Size:0x200
MMCSD_ReceiveSingleBlock+, pbyBuffer:0x0406cac0, dwLength:0x200
MMCSD_ReceiveSingleBlock-
MMCSD_ReadSingleBlock-

regards,
Anand

"Adam Kodeda [MS]" <adamkod@online.microsoft.com> wrote in message
news:xyY4hwUrDHA.1332@cpmsftngxa06.phx.gbl...
> Can you please post your debug output and your custom MMC storage profile
> registry key? Also, which BSP/platform and MMC controller are you
> targeting?
>
> ---
> Adam Kodeda [MS]
> Windows CE File Systems/Storage
>
> To reply directly, remove "online." from my e-mail address.
> This posting is provided AS IS with no warranties, and confers no rights.
>
> --------------------
> >From: "Anand" <anand@mdr-tech.com>
> >References: <uNiUUbZqDHA.1680@TK2MSFTNGP10.phx.gbl>
> <mFTuNmtqDHA.2164@cpmsftngxa06.phx.gbl>
> >Subject: Re: Formatting MMC card
> >Date: Mon, 17 Nov 2003 09:51:23 +0800
> >Lines: 63
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> >Message-ID: <#KRvW1KrDHA.2488@TK2MSFTNGP09.phx.gbl>
> >Newsgroups: microsoft.public.windowsce.platbuilder
> >NNTP-Posting-Host: bb-203-125-36-153.singnet.com.sg 203.125.36.153
> >Path:
>
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.
> phx.gbl
> >Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:42207
> >X-Tomcat-NG: microsoft.public.windowsce.platbuilder
> >
> >Hi Adam Kodeda,
> >
> >Thanks a lot for ur reply. I'm using WinCE 4.2. I'm writing my own MMC
> >driver.
> >I found using debug messages, when I inserted an unformatted MMC card,
the
> >OS tries to write something in sector zero. but even after finished
> writing,
> >the card is not formatted.
> >
> >can u help me to resolve this.
> >
> >regards
> >Anand
> >
> >"Adam Kodeda [MS]" <adamkod@online.microsoft.com> wrote in message
> >news:mFTuNmtqDHA.2164@cpmsftngxa06.phx.gbl...
> >> Which version of Windows CE do you have? Are you developing your own
MMC
> >> driver?
> >>
> >> SD/MMC cards have very specific formatting requirements ({disk size,
> >> cluster size} combinations aren't very flexible). If a disk is large
> >> enough, Windows CE will attempt to format to FAT32. However, SD/MMC
> cards
> >> only support FAT16. We are in the process of addressing this issue, in
> >> addition to providing more flexibility with respect to volume
formatting.
> >>
> >> ---
> >> Adam Kodeda [MS]
> >> Windows CE File Systems/Storage
> >>
> >> To reply directly, remove "online." from my e-mail address.
> >> This posting is provided AS IS with no warranties, and confers no
rights.
> >>
> >> --------------------
> >> >From: "Anand" <anand@mdr-tech.com>
> >> >Subject: Formatting MMC card
> >> >Date: Thu, 13 Nov 2003 11:33:30 +0800
> >> >Lines: 11
> >> >X-Priority: 3
> >> >X-MSMail-Priority: Normal
> >> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> >> >Message-ID: <uNiUUbZqDHA.1680@TK2MSFTNGP10.phx.gbl>
> >> >Newsgroups: microsoft.public.windowsce.platbuilder
> >> >NNTP-Posting-Host: bb-203-125-36-153.singnet.com.sg 203.125.36.153
> >> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
> >> >Xref: cpmsftngxa06.phx.gbl
microsoft.public.windowsce.platbuilder:42064
> >> >X-Tomcat-NG: microsoft.public.windowsce.platbuilder
> >> >
> >> >Hi
> >> >
> >> >My MMC card driver is working fine but when i insert an unformatted
MMC
> >> >card, then a dialog appears asking for formatting. If i select yes in
> the
> >> >dialog box to format, my MMC card is not formatted. Can any one help
me
> >to
> >> >format the MMC card from my driver.
> >> >
> >> >Thanks and Regards
> >> >Anand
> >> >
> >> >
> >> >
> >>
> >
> >
> >
>



Re: Formatting MMC card by adamkod

adamkod
Sat Nov 22 15:12:15 CST 2003

Anand,

I'm curious as to why you provide a level of loader "indirection" through
StorageCardLoader.Dll?

I suspect you may have created a block driver that conforms to the old
block driver architecture. This is perfectly valid, but you may be mixing
up IOCTL arguments.

Does your driver accept IOCTL_DISK_DEVICE_INFO? If so, when your "MMCSD"
driver is loaded, what do you return in response to IOCTL_DISK_DEVICE_INFO?
That is, what do you populate the szProfile field of the STORAGEDEVICEINFO
struct with? It should be "MMCSD".

Moreover, are you actually loading an FSD based on the FSD registry value?
That is, when your driver processes
IOCTL_DISK_INITIALIZED/DISK_IOCTL_INITIALIZED, do you call LoadFSD based on
the FSD registry value in your driver's subkey?

Which IOCTLs do you accept for reading/writing? DISK_IOCTL_READ or
IOCTL_DISK_READ? DISK_IOCTL_WRITE or IOCTL_DISK_WRITE? In either case,
can you tell me how you use each argument of DSK_IOControl?

---
Adam Kodeda [MS]
Windows CE File Systems/Storage

To reply directly, remove "online." from my e-mail address.
This posting is provided AS IS with no warranties, and confers no rights.

---

>Hi Adam,
>
>The registry settings:
>
>[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StorageCardLoader]
> "Prefix"="SCL"
> "Dll"="StorageCardLoader.Dll"
> "Order"=dword:0
> "Ioctl"=dword:4
> "FriendlyName"="Storage Card Loader"
>
>[HKEY_LOCAL_MACHINE\Drivers\MMCSD]
> "FSD"="FATFS.DLL"
> "Prefix"= "DSK"
> "Dll"="mmcsd.dll"
> "Index"=dword:1
> "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
>
>[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMCSD]
> "Name"="SD/MMC Card"
> "Folder"="MMCSD"
>
>The debug messages...
>
>DSK_IOControl: Read / Write
>MMCSD_ReadSingleBlock+, Address:0x0, Size:0x200
>MMCSD_ReceiveSingleBlock+, pbyBuffer:0x0406caa0, dwLength:0x200
>MMCSD_ReceiveSingleBlock-
>MMCSD_ReadSingleBlock-
>DSK_IOControl: Read / Write
>MMCSD_ReadSingleBlock+, Address:0x0, Size:0x200
>MMCSD_ReceiveSingleBlock+, pbyBuffer:0x0406caa0, dwLength:0x200
>MMCSD_ReceiveSingleBlock-
>MMCSD_ReadSingleBlock-
>DSK_IOControl: Format Starting...
>DSK_IOControl: Read / Write
>MMCSD_Write+: 00000000, 0406cac0, 00001000
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406cac0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406ccc0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406cec0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d0c0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d2c0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d4c0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d6c0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406d8c0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_Write-: 00001000
>DSK_IOControl: Write data to MMC sector no = 0
>DSK_IOControl: Read / Write
>MMCSD_Write+: 00000000, 0406cac0, 00000200
>MMCSD_TransmitSingleBlock+, pbyBuffer:0x0406cac0, dwLength:0x200
>MMCSD_TransmitSingleBlock-
>MMCSD_Write-: 00000200
>DSK_IOControl: Write data to MMC sector no = 0
>DSK_IOControl: Read / Write
>MMCSD_ReadSingleBlock+, Address:0x0, Size:0x200
>MMCSD_ReceiveSingleBlock+, pbyBuffer:0x0406cac0, dwLength:0x200
>MMCSD_ReceiveSingleBlock-
>MMCSD_ReadSingleBlock-
>
>regards,
>Anand