Hi,
I have a device which includes a NAND FLASH DEVICES using Windows CE 6.0.

According to the MSDN i have created a devide driver with the FMD_
Functions, then a DLL which exports DSK prefixed Functions.
I have made changes in the register as follows:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\NANDDEVICE]
"Profile"="NANDDEVICE"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Order"=dword:0
"FriendlyName"="NANDDEVICE Driver"
"Dll"="NANDDEVICE.dll"
"Prefix"="DSK"

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\NANDDEVICE]
"DriverPath"="Drivers\\BuiltIn\\NANDDEVICE"
; LoadFlags 0x01 == load synchronously
"LoadFlags"=dword:1
"Order"=dword:0
"BootPhase"=dword:0

I havem't checked any components in my catalog 'cause I already have a file
system (FAT).

I download my new NK image but nothing happens.
I think i forgot a step in this process, but MSDN doesn't help to find
what's wrong (maybe i cannot find the right help link), what should i do
now?

Best Regards

--
Rudy Barbieri
rudy.barbieriCHIOCCIOLAdestura.it

Re: Problem implementing a NAND Flash device by Valter

Valter
Mon May 14 08:10:51 CDT 2007

"Rudy Barbieri" <rudy_punto_barbieri_chiocciola__destura_punto_it>
wrote in news:e9heRHilHHA.568@TK2MSFTNGP02.phx.gbl:

> Hi,
> I have a device which includes a NAND FLASH DEVICES using Windows
> CE 6.0.
[...]
> I download my new NK image but nothing happens.
> I think i forgot a step in this process, but MSDN doesn't help to
> find what's wrong (maybe i cannot find the right help link), what
> should i do now?


Did you provide an entry for your profile under HKEY_LOCAL_MACHINE
\System\StorageManager\Profiles\?
Use the debugger to check if your driver is loaded, if your FMD_Init
entry point is invoked and if a partition and file system driver are
loader. You may need to set the autoformat and autopart flags for your
device to partition/format it at startup or use the storage manager
applet to create and format a partition before you will be able to
access it using regular file system calls.

--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)

Re: Problem implementing a NAND Flash device by Rudy

Rudy
Mon May 14 08:55:41 CDT 2007

> Did you provide an entry for your profile under HKEY_LOCAL_MACHINE
> \System\StorageManager\Profiles\?
> Use the debugger to check if your driver is loaded, if your FMD_Init
> entry point is invoked and if a partition and file system driver are
> loader. You may need to set the autoformat and autopart flags for your
> device to partition/format it at startup or use the storage manager
> applet to create and format a partition before you will be able to
> access it using regular file system calls.


I have put this registry entry:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NANDDEVICE]
"Name"="FLASH NAND"
"Folder"="FLASH_NAND"

It seems that noone calls FMD_Init function. I have put a RETAIL MSG at the
top of the function and it doesn't appear. In my OemPlatformInit function I
call this function and it works fine (it reads the Flash ID well).

Other Suggestions?

Best Regards

--
Rudy Barbieri
rudy.barbieriCHIOCCIOLAdestura.it



Re: Problem implementing a NAND Flash device by Valter

Valter
Mon May 14 09:42:03 CDT 2007

"Rudy Barbieri" <rudy_punto_barbieri_chiocciola__destura_punto_it>
wrote in news:up0EV#ilHHA.3484@TK2MSFTNGP02.phx.gbl:

[...]
> I have put this registry entry:
> [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NANDDEVICE]
> "Name"="FLASH NAND"
> "Folder"="FLASH_NAND"
>
> It seems that noone calls FMD_Init function. I have put a RETAIL
> MSG at the top of the function and it doesn't appear. In my
> OemPlatformInit function I call this function and it works fine
> (it reads the Flash ID well).
>
> Other Suggestions?

If you can enable the debugger and put a breakpoint inside FMD_Init
this will speed-up the problem detection process (spending some time
enabling the debugger will save a lot of time later, IMVHO).

Did you put the RETAILMSG at the beginning of your FMD_Init call or
somewhere else?
The same function works inside OEMInit? You should use MmMapIoSpace
to map your flash memory inside your driver, at least, and that will
not work inside the initialization functions.
If you put the RETAILMSG inside FMD_Init, check that the DLL is
included in the image (ce.bib), and the keys to load it are inside
the registry (reginit.ini). Check also that the K flag is specified
in the BIB entry of your driver (if it's running in kernel mode).
If your message is after some other operations, check wy they may
fail (ex: GPF caused by an invalid address).

--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)

Re: Problem implementing a NAND Flash device by Jeson

Jeson
Mon May 14 09:41:56 CDT 2007

I think you should add the "auto load", "auto format","filesystem" values
under the Profiles key.
In my case, I did not set the values under the \storagemanager\autoload\ key
and at the booting time, my FMD_init is called.

However, I am still having some questions about the architecture of
FAL+FMD=>block device driver.

Do we only need to implement the FMD lib to build a flash block driver? Does
the FAL translate all the AP calles into FMD_ calls?
Which filesystem to use to manager the nand flash, FAT or BinFS or any of
the two?


"Rudy Barbieri" <rudy_punto_barbieri_chiocciola__destura_punto_it> дÈëÏûÏ¢ÐÂÎÅ:up0EV%23ilHHA.3484@TK2MSFTNGP02.phx.gbl...
>> Did you provide an entry for your profile under HKEY_LOCAL_MACHINE
>> \System\StorageManager\Profiles\?
>> Use the debugger to check if your driver is loaded, if your FMD_Init
>> entry point is invoked and if a partition and file system driver are
>> loader. You may need to set the autoformat and autopart flags for your
>> device to partition/format it at startup or use the storage manager
>> applet to create and format a partition before you will be able to
>> access it using regular file system calls.
>
>
> I have put this registry entry:
> [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NANDDEVICE]
> "Name"="FLASH NAND"
> "Folder"="FLASH_NAND"
>
> It seems that noone calls FMD_Init function. I have put a RETAIL MSG at
> the top of the function and it doesn't appear. In my OemPlatformInit
> function I call this function and it works fine (it reads the Flash ID
> well).
>
> Other Suggestions?
>
> Best Regards
>
> --
> Rudy Barbieri
> rudy.barbieriCHIOCCIOLAdestura.it
>



Re: Problem implementing a NAND Flash device by Valter

Valter
Mon May 14 09:51:07 CDT 2007

"Jeson" <jeson_01721@126.com> wrote in
news:#om3KYjlHHA.1244@TK2MSFTNGP04.phx.gbl:

> I think you should add the "auto load", "auto format","filesystem"
> values under the Profiles key.
> In my case, I did not set the values under the
> \storagemanager\autoload\ key and at the booting time, my FMD_init
> is called.
>
> However, I am still having some questions about the architecture
> of FAL+FMD=>block device driver.
>
> Do we only need to implement the FMD lib to build a flash block
> driver? Does the FAL translate all the AP calles into FMD_ calls?
> Which filesystem to use to manager the nand flash, FAT or BinFS or
> any of the two?

You can use any filesystem that relies on CE block devices to support
it's operations. Some filesystems (ex: IPSM by intel) work only with
specific devices.
FAT, TFAT and exFAT (only on CE 6.0) are supported by OS components
but you may be able to find other filesystem provided by third
parties.

--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)

Re: Problem implementing a NAND Flash device by Rudy

Rudy
Mon May 14 10:38:02 CDT 2007

>Check also that the K flag is specified
> in the BIB entry of your driver (if it's running in kernel mode).
> If your message is after some other operations, check wy they may
> fail (ex: GPF caused by an invalid address).

I have missed the K flag!!!!

Now is working well.

Thanks!


--
Rudy Barbieri
member of Valter Minute Fans Club
rudy.barbieriCHIOCCIOLAdestura.it



Re: Problem implementing a NAND Flash device by Gary

Gary
Mon May 14 13:00:52 CDT 2007

Yes, the FAL translates calls from the filesystem into the FMD. The FAL is
the allocator, doing small sector emulation. The combination of FAL lib
plus your FMD is a stream inteface driver. This picture gives an idea of
how it interfaces with other components:
http://msdn2.microsoft.com/en-us/library/ms894042.aspx

Regards,
Gary

"Valter Minute" <v_a_l_t_e_r.m_i_n_u_t_e@g_m_a_i_l.com> wrote in message
news:Xns9930AB6E1A8D2VALTERMINUTE@207.46.248.16...
> "Jeson" <jeson_01721@126.com> wrote in
> news:#om3KYjlHHA.1244@TK2MSFTNGP04.phx.gbl:
>
>> I think you should add the "auto load", "auto format","filesystem"
>> values under the Profiles key.
>> In my case, I did not set the values under the
>> \storagemanager\autoload\ key and at the booting time, my FMD_init
>> is called.
>>
>> However, I am still having some questions about the architecture
>> of FAL+FMD=>block device driver.
>>
>> Do we only need to implement the FMD lib to build a flash block
>> driver? Does the FAL translate all the AP calles into FMD_ calls?
>> Which filesystem to use to manager the nand flash, FAT or BinFS or
>> any of the two?
>
> You can use any filesystem that relies on CE block devices to support
> it's operations. Some filesystems (ex: IPSM by intel) work only with
> specific devices.
> FAT, TFAT and exFAT (only on CE 6.0) are supported by OS components
> but you may be able to find other filesystem provided by third
> parties.
>
> --
> Valter Minute
> (the reply address of this message is invalid)
> (l'indirizzo di reply di questo messaggio non è valido)