Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: ageisreiter <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 Jun 2009 07:53:27 -0700
Ok, I will check the data *** because of the geometry.
But one other question. What is the SectorSize? Why do I need this registry
setting?
Thanks,
Andreas
"Bruce Eitman [eMVP]" wrote:
Actually, I beleive that the data *** is wrong about that - or at least.
inconsistent. Check the Geometry (I think) in the data ***. But the
actual value will depend on how your driver uses it. I have modified mine
to support P30, so it is considerably different. Mine calculates the write
buffer size based on the information that it reads from flash.
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
EuroTech Inc.
www.EuroTech.com
"ageisreiter" <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3161F0FA-8644-4BCB-BECA-9EE8021559E5@xxxxxxxxxxxxxxxx
I would say that 0x20 for the WriteBufferSize is correct, because a
buffered
program command is followed by up to 32 words of data at P30 Flash (from
the
data*** P30 StrataFlash).
But I have tried 10 (0xA) and I get the same error mesages:
FSDMGR!AutoLoadBlockDevice: Auto-loading block driver from
"Drivers\BuiltIn\StrataFMD"FSDMGR!MountStore: Attaching new storage device
"MSFlash"OSAXST1: >>> Loading Module 'stratad.dll' (0x83FAE708) at address
0xC0D20000-0xC0D41000 in Process 'NK.EXE' (0x813D9AA0)
OSAXST1: >>> Loading Module 'k.ceddk.dll' (0x83FAE840) at address
0xC0630000-0xC063E000 in Process 'NK.EXE' (0x813D9AA0)
Kernel DLL 'stratad.dll' needs thread creation/deletion notification
INFO: FMD_Init: -> InitializeFlash() 8 Blocks unlocked from virtual Flash
Address =0x9aa00000
INFO: FMD_Init: Flash Address=0x9aa00000 Length=0x100000.
Unknown: DEBUGCHK failed in file
C:\ymzki\private\winceos\DRIVERS\msflash\src\.\falmain.cpp at line 1409
DEBUG_BREAK @c0d2ddf0 Ignored.
FLASHDRV.DLL:CalculateLogicalRange() - Invalid number of logical blocks 0
FSDMGR!MountStore: Failed mounting store "MSFlash"; error=50
FSDMGR!StoreDisk_t::~StoreDisk_t: deleting store (D0021D30)OSAXST1: <<<
Unloading Module 'stratad.dll' (0x83FAE708) at address
0xC0D20000-0xC0D41000
in Process 'NK.EXE' (0x813D9AA0)
OSAXST1: <<< Unloading Module 'k.ceddk.dll' (0x83FAE840) at address
0xC0630000-0xC063E000 in Process 'NK.EXE' (0x813D9AA0)
FSDMGR!AutoLoadFileSystems: Unable to auto-load
HKLM\System\StorageManager\AutoLoad\MSFlash;
error=50FSDMGR!STOREMGR_StartBootPhase BootPhase=1 (PrevBootPhase=0)
FSDMGR!AutoLoadFileSystems: CurrentBootPhase=1, LoadFlags=1
FSVOL: Using system database volume "\Documents and Settings\default.vol"
By the way, I have no paired flash. I have only 16bit databus width.
Have you another idea?
Thanks,
Andreas
"Bruce Eitman [eMVP]" wrote:
Double check WriteBufferSize - it should be n, where the actual write
buffer
size is 2 ^ n (2 raised to the power of n) multiplied by 2 if Paired
Flash
is set.
I think that n for P30 is 10 (0xA)
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
EuroTech Inc.
www.EuroTech.com
"ageisreiter" <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2E398BC4-59BA-4890-A120-64B7A6DE93B1@xxxxxxxxxxxxxxxx
Hi Bruce,
I don't use the smaller blocks at the beginning of the flash. I will
split
my flash in two parts. The first for the Image: 0x0000_0000 -
0x00FF_FFFF
and
the seccond for the FlashDisk: 0x0100_0000 - 0x01FF_FFFF
But it doesn't work. So I think the failure is in the registry settings
or
in the OEMAddressTable.
Registry settings:
--------------------
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StrataFMD]
"Dll"="stratad.dll"
"Order"=dword:2
"Prefix"="DSK"
"Ioctl"=dword:4
"Profile"="MSFlash"
"IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
;"XIPEntireFlash"=dword:1
"MemBase"=dword:9AA00000
"MemLen"=dword:100000
"BlockSize"=dword:20000
"WriteBufferSize"=dword:20
"SectorSize"=dword:200
"IsPairedFlash"=dword:0 ; 16 bit Data-Bus width
; Support XIP in IMGFS
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\IMGFS]
;"XIP"=dword:1
; Override names in default profile
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"Name"="MSFLASH for STRATAFLASH"
"Folder"="NOR Flash"
"DefaultFileSystem"="FATFS"
"PartitionDriver"="mspart.dll"
"AutoMount"=dword:1
"AutoPart"=dword:1
"AutoFormat"=dword:1
"MountFlags"=dword:6
[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\MSFlash]
"DriverPath"="Drivers\\BuiltIn\\StrataFMD"
; LoadFlags 0x01 == load synchronously
"LoadFlags"=dword:1
"Order"=dword:0
"BootPhase"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles]
"AutoMount"=dword:1
"AutoPart"=dword:1
"AutoFormat"=dword:1
"MountFlags"=dword:6
"DefaultFileSystem"="FATFS"
"PartitionDriverName"="MSPART"
"Folder"="Mounted Volume"
IF IMGULDR
; Allow xip and read-only filesys regions to be written to
; in the update loader only
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StrataFMD]
"UpdateReadOnly"=dword:1
ENDIF
Config.bib:
-------------
...
ZBANK 9A500000 00100000 RESERVED ;Reserve
ZBANK
FLASH 9AA00000 01000000 RESERVED ;Flash
Storage
EBOOT 9BA00000 00040000 RESERVED ;EBOOT
Flash
image
BOOTCFG 9BA40000 00040000 RESERVED ;BOOT
config
parm
...
OEMAddressTable:
----------------------
...
DCD 0x9A900000, 0x08000000, 1 ; MAINSTONEII: nCS2: Ethernet
controller
DCD 0x9AA00000, 0x01000000, 16 ; MAINSTONEII: nCS0: Storage
(16MB)
DCD 0x9BA00000, 0x00000000, 16 ; MAINSTONEII: nCS0: BootFlash
(16MB)
DCD 0x9EA00000, 0x50000000, 1 ; BULVERDE: Camera peripheral
interface.
...
Please have I look at my settings.
Thanks,
Andreas
"Bruce Eitman [eMVP]" wrote:
Yes, it can be modified to support P30.
Giving it more thought, you probably can get it to work with P30
simply
by
avoiding the smaller blocks. That is set the start address or size to
keep
the flash disk out of the smaller blocks.
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
EuroTech Inc.
www.EuroTech.com
"ageisreiter" <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:45E52357-EF55-4C35-9A4D-824B83DC5B06@xxxxxxxxxxxxxxxx
Hi Bruce,
Yes my driver contains if (g_FMDInfo.Geometry.NumEraseBlocks !=
1)....
Can I modify the driver, that it support P30 StrataFlash? I think,
that
I'm
not the first person, which will use this Flash driver for P30
components.
By the way, I have added an UNLOCK command at the beginning of the
FMD_Init() function. And now I can run through the FMD_Init()
function
without an error message. I had read in some internet discussion
groups,
that
the block lock can be a problem. But I don't get an Flash Folder at
Windows
CE. And I get some errors on the debug output:
FSDMGR!AutoLoadBlockDevice: Auto-loading block driver from
"Drivers\BuiltIn\StrataFMD"FSDMGR!MountStore: Attaching new storage
device
"MSFlash"OSAXST1: >>> Loading Module 'stratad.dll' (0x83FAE708) at
address
0xC0D20000-0xC0D41000 in Process 'NK.EXE' (0x813D9AA0)
OSAXST1: >>> Loading Module 'k.ceddk.dll' (0x83FAE840) at address
0xC0630000-0xC063E000 in Process 'NK.EXE' (0x813D9AA0)
Kernel DLL 'stratad.dll' needs thread creation/deletion notification
INFO: FMD_Init: -> InitializeFlash() 8 Blocks unlocked from virtual
Flash
Address =0x9aa00000
INFO: FMD_Init: Flash Address=0x9aa00000 Length=0x100000.
Unknown: DEBUGCHK failed in file
C:\ymzki\private\winceos\DRIVERS\msflash\src\.\falmain.cpp at line
1409
DEBUG_BREAK @c0d2ddf0 Ignored.
FLASHDRV.DLL:CalculateLogicalRange() - Invalid number of logical
blocks
0
FSDMGR!MountStore: Failed mounting store "MSFlash"; error=50
FSDMGR!StoreDisk_t::~StoreDisk_t: deleting store (D0021D30)OSAXST1:
<<<
Unloading Module 'stratad.dll' (0x83FAE708) at address
0xC0D20000-0xC0D41000
in Process 'NK.EXE' (0x813D9AA0)
OSAXST1: <<< Unloading Module 'k.ceddk.dll' (0x83FAE840) at address
0xC0630000-0xC063E000 in Process 'NK.EXE' (0x813D9AA0)
FSDMGR!AutoLoadFileSystems: Unable to auto-load
HKLM\System\StorageManager\AutoLoad\MSFlash;
error=50FSDMGR!STOREMGR_StartBootPhase BootPhase=1 (PrevBootPhase=0)
FSDMGR!AutoLoadFileSystems: CurrentBootPhase=1, LoadFlags=1
FSVOL: Using system database volume "\Documents and
Settings\default.vol"
What could I do? Is it with little efford possible to adjust the
driver
for
P30 flash?
Thanks,
Andreas
"Bruce Eitman [eMVP]" wrote:
I just realized that you have P30 Flash. The last time I looked,
Microsoft
didn't support P30. If your driver has this:
if (g_FMDInfo.Geometry.NumEraseBlocks != 1)
{
DEBUGMSG(1, (TEXT("ERROR: InitializeFlash: more than
one
block
per erase region (%d).\r\n"), g_FMDInfo.Geometry.NumEraseBlocks));
return(FALSE);
}
in the InitializeFlash() function, then it doesn't support P30.
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
EuroTech Inc.
www.EuroTech.com
"ageisreiter" <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:EA341867-ECE5-4932-985A-F845ADCFF59A@xxxxxxxxxxxxxxxx
Hi Gary,
I can use CFI, if I don't specify the registry settings
"WriteBufferSize"
and "BlockSize". Then the driver try to connect the Flash via the
CFI.
But I get the following error message:
- Follow-Ups:
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: Bruce Eitman [eMVP]
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- References:
- FMD driver problem - Unable to add FlashDisk to my OS Design
- From: ageisreiter
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: Bruce Eitman [eMVP]
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: ageisreiter
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: Gary Swalling
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: ageisreiter
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: Bruce Eitman [eMVP]
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: ageisreiter
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: Bruce Eitman [eMVP]
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: ageisreiter
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: Bruce Eitman [eMVP]
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: ageisreiter
- Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- From: Bruce Eitman [eMVP]
- FMD driver problem - Unable to add FlashDisk to my OS Design
- Prev by Date: Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- Next by Date: Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- Previous by thread: Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- Next by thread: Re: FMD driver problem - Unable to add FlashDisk to my OS Design
- Index(es):