CF Storage Card Question (4.2 .Net / Sandgate)
- From: "Dale Ziebarth" <dziebarth@xxxxxxxxxxx>
- Date: Thu, 7 Jul 2005 16:20:15 -0500
I have a problem with getting a SanDisk Compact Flash storage card to work
with a Sandgate / PXA255 development system under Win CE 4.2 .Net. As far
as I can tell the block driver ATADISK is loaded just fine (judging by the
"Active" registry entry) and the PCMCIA driver does not have any trouble
talking to the hardware. Since I have only one socket on the Sandgate board
I had to download the image through the Ethernet card then remove it and
plug in the storage card to test functionality until I get my actual
development system. The following debug output (I eliminated the
CardGetNextTupple, etc output for brevity) occurs when I insert the Sandisk
card. I cranked up the debug zones in the PCMCIA, Atadisk and Fatfsd
drivers and the Storage Manager code. I expected to be able to explore the
Storage Card directory from ActiveSync but am unable to see it even after
waiting for 30 seconds.
My registry entries are at the bottom. Since I use the persistant storage
of my registry the project.reg is not applicable. I think that it has
something to do with the partition table entries. Also I did not see where
Storage Manager loaded the fatfsd.dll. It does not show up under the Remote
Process Viewer (I expected to see it as a thread under the filesys.exe
process) The fatfsd.dll would have been loaded by the Atadisk block driver
if Storage Manager was not there. I am fairly sure that Storage Manager is
a requirement of the FAT File System.
I modified the ATADISK driver to use 3.3 volts instead of the 5.0 volts
because that is all the Sandgate board supports. The SanDisk card supports
both 3.3 and 5 volts.
This is my debug output:
0x83c6c820: NOTIFICATION::XCeEventHasOccurred
0x83c4e400: StatusChangeThread: out of wait
0x83c4e400: StatusChangeThread: calling PDCardGetSocket
0x83c4e400: fChanged = 80 for Socket 0 and fCurr = c0, PowerState = 1,
fFlags = 10002b0
0x83c4e400: PCMCIA:StatusChangeThread: Changes on socket 0: CARD_DETECT and
fFlags = 10002b0
0x83c4e400: PCMCIA:Enqueued CE_CARDSERV_LOAD for client 0x0, socket 0,
function 0
0x83c4e400: EnqueueEvent:Enqueued for client 0x0, socket 0, function 0
0x83c4e400: OEMInterruptDone: Cleared Card Detect Edge Detect
0x83c5ea08: PCMCIA:Dequeued CE_CARDSERV_LOAD for client 0x0, socket 0,
function 0
0x83c5ea08: CallbackThread: event = 0x10000
0x83c5ea08: PCMCIA:CardServLoadDriver on socket 0
0x83c5ea08: CardServLoadDriver: calling PDCardGetSocket
0x83c5ea08: PcmciaPowerOff: calling PDCardGetSocket/PDCardSetSocket
0x83c5ea08: PcmciaPowerOff: calling PDCardGetAdapter/PDCardSetAdapter
0x83c5ea08: PCMCIA:Leaving PcmciaPowerOff
0x83c5ea08: Before Battery Check fFlags for socket 0 = 10002b0
0x83c5ea08: PCMCIA:Couldn't getprocaddr of GetSystemPowerStatusEx
0x83c5ea08: PCMCIA:BatteryCheck TRUE-fFlag for Socket 0 is 10002b0
0x83c5ea08: PDCardSetAdapter: Powering On Socket 0
0x83c5ea08: PDCardSetAdapter: NOT in Kernel Mode to power on
0x83c5ea08: PcmciaPowerOn: socket 0 powered up
0x83c5ea08: PcmciaPowerOn: reseting the socket
0x83c5ea08: PDCardResetSocket: Resetting PC Card in socket 0
0x83c5ea08: PDCardResetSocket: Card RDY after 20 ms
0x83c5ea08: CardGetParsedTuple entered 26
0x83c5ea08: CardGetFirstTuple entered 26
0x83c5ea08: I_MapWindow: pCardAddress = 0x0, v_PageSize = 0x1000
0x83c5ea08: PCMCIA:I_MapWindow MAKE SURE THIS PLATFORM'S PCMCIA MEMORY AREAS
ARE SPECIFIED AS ACTUAL PHYSICAL ADDRESSES
0x83c5ea08: I_MapWindow: pPhys->uBase = 0x28000000
0x83c5ea08: I_MapWindow: uBase = 0x28000000, uStart = 0x0, uWinOffset= 0x0,
uPhysAddr = 0x28000000
0x83c5ea08: I_MapWindow: Window 0 @ 230000 (phys = 28000000), size = 8192
0x83c5ea08: CardGetParsedTuple succeeded
0x83c5ea08: I_MapWindow: pCardAddress = 0x200, v_PageSize = 0x1000
0x83c5ea08: PCMCIA:I_MapWindow MAKE SURE THIS PLATFORM'S PCMCIA MEMORY AREAS
ARE SPECIFIED AS ACTUAL PHYSICAL ADDRESSES
0x83c5ea08: I_MapWindow: pPhys->uBase = 0x28000000
0x83c5ea08: I_MapWindow: uBase = 0x28000000, uStart = 0x0, uWinOffset= 0x0,
uPhysAddr = 0x28000000
0x83c5ea08: I_MapWindow: Window 0 @ 240000 (phys = 28000000), size = 15
0x83c5ea08: CreateFunction: Re-using Tuple attribute window, Config
registers @ 0x240200 for 0:0
0x83c5ea08: CardGetFirstTuple entered 6
0x83c5ea08: CardGetFirstTuple failed 31
0x83c5ea08: CreateFunctions: CardGetFirstTuple(CISTPL_LONGLINK_MFC) returned
31 for 0:0
0x83c5ea08: PCMCIA:CreateFunctions - Created 1 functions
0x83c5ea08: CreateDeviceID entered
0x83c5ea08: CardGetTupleData: uCISOffset = 0x16
0x83c5ea08: CardGetTupleData succeeded
0x83c5ea08: Manufacturer = SanDisk
0x83c5ea08: Product Name = SDP
0x83c5ea08: GetCardCRC: Calculating CRC
0x83c5ea08: GetCardCRC: CRC = dbf
0x83c5ea08: CreateDeviceID done
0x83c5ea08: PCMCIA:Enqueued CE_CARD_INSERTION for client 0x1, socket 0,
function 0
0x83c5ea08: EnqueueEvent:Enqueued for client 0x1, socket 0, function 0
0x83c5ea08: PCMCIA:Dequeued CE_CARD_INSERTION for client 0x1, socket 0,
function 0
0x83c5ea08: CallbackThread: event = 0x40
0x83c5ea08: PCMCIA:CallbackThread: 0:0 MajorEvent=CE_CARD_INSERTION,
SubEvent=CE_CARD_INSERTION
0x83c5ea08: PCMCIA:CallClient entered
0x83c5ea08: PCMCIA:CallClient done
0x83c5ea08: CallbackThread: calling PDCardGetSocket/PDCardSetSocket for
insertion
0x83c5ea08: PCMCIA:PcmciaPowerOff(0) -- socket is active, not powering down
0x83b9cd44: PCMCIA:LoadPCCardDriver:
RegOpenKeyEx(Drivers\PCMCIA\SanDisk-SDP-0DBF) returned 2
0x83b9cd44: ATADISK: DLL_PROCESS_ATTACH
0x83b9cd44: PCMCIA:RunDetectors: calling 50:atadisk.dll:DetectATADisk
0x83b9cd44: CardGetFirstTuple entered 34
0x83b9cd44: CardGetFirstTuple succeeded
0x83b9cd44: CardGetTupleData entered
0x83b9cd44: CardGetTupleData: uCISOffset = 0x38
0x83b9cd44: CardGetTupleData succeeded
0x83b9cd44: ATADISK: DLL_PROCESS_DETACH
0x83b9cd44: PCMCIA:RunDetectors: 50:atadisk.dll:DetectATADisk returned
ATADisk
0x83b9cd44: DEVICE!ActivateDeviceEx(Drivers\PCMCIA\ATADisk) entered
0x83b9cd44: ATADISK: DLL_PROCESS_ATTACH
0x83b9cd44: ATADISK: DSK_Init
0x83b9cd44: ATADISK: Attempting to register with PCMCIA.DLL
0x83b9cd44: CardRegisterClient entered
0x83b9cd44: PCMCIA:Enqueued CE_REGISTRATION_COMPLETE for client 0x2, socket
0, function 0
0x83b9cd44: EnqueueEvent:Enqueued for client 0x2, socket 0, function 0
0x83c5ea08: PCMCIA:Dequeued CE_REGISTRATION_COMPLETE for client 0x2, socket
0, function 0
0x83c5ea08: CallbackThread: event = 0x82
0x83c5ea08: PCMCIA:CallbackThread: 0:0 MajorEvent=CE_REGISTRATION_COMPLETE,
SubEvent=CE_CARD_INSERTION
0x83c5ea08: PCMCIA:CallClient entered
0x83c5ea08: ATADISK: PcmciaCallBack(CE_CARD_INSERTION)
0x83c5ea08: PCMCIA:CallClient done
0x83c5ea08: PCMCIA:PcmciaPowerOff(0) -- socket is active, not powering down
0x83c5ea08: PCMCIA:Enqueued CE_REGISTRATION_COMPLETE for client 0x2, socket
0, function 0
0x83c5ea08: EnqueueEvent:Enqueued for client 0x2, socket 0, function 0
0x83c5ea08: PCMCIA:Dequeued CE_REGISTRATION_COMPLETE for client 0x2, socket
0, function 0
0x83c5ea08: CallbackThread: event = 0x82
0x83c5ea08: PCMCIA:CallbackThread: 0:0 MajorEvent=CE_REGISTRATION_COMPLETE,
SubEvent=CE_REGISTRATION_COMPLETE
0x83c5ea08: PCMCIA:CallClient entered
0x83c5ea08: ATADISK: PcmciaCallBack(CE_REGISTRATION_COMPLETE)
0x83c5ea08: PCMCIA:CallClient done
0x83b9cd44: CardRegisterClient succeeded
0x83b9cd44: ATADISK Cfg[0] = x00: def:Y 50 dV 0 ranges
0x83b9cd44: ATADISK Cfg[1] = x00: def:Y 30 dV 0 ranges
0x83b9cd44: ATADISK Cfg[2] = x01: def:Y 50 dV 0 ranges
0x83b9cd44: ATADISK Cfg[3] = x01: def:Y 30 dV 0 ranges
0x83b9cd44: ATADISK Cfg[4] = x02: def:Y 50 dV 2 ranges
0x83b9cd44: ATADISK Cfg[5] = x02: def:Y 30 dV 2 ranges
0x83b9cd44: CardRequestWindow entered
0x83b9cd44: FindPhysWindow: Size=8, socket=0, desired caps=0x4, other
caps=0x10
0x83b9cd44: FindPhysWindow: returning 0x30480
0x83b9cd44: CardRequestWindow succeeded
0x83b9cd44: CardMapWindow entered
0x83b9cd44: PCMCIA:CardMapWindow MAKE SURE THIS PLATFORM'S PCMCIA MEMORY
AREAS ARE SPECIFIED AS PHYSICAL
0x83b9cd44: CardMapWindow:Window 6 @ 460000 (phys = 40008000), size = 4096,
returning 4601f0
0x83b9cd44: CardMapWindow succeeded
0x83b9cd44: ATADISK: pATAReg = 0x4601f0
0x83b9cd44: CardRequestWindow entered
0x83b9cd44: FindPhysWindow: Size=1, socket=0, desired caps=0x4, other
caps=0x10
0x83b9cd44: FindPhysWindow: returning 0x30480
0x83b9cd44: CardRequestWindow succeeded
0x83b9cd44: CardMapWindow entered
0x83b9cd44: PCMCIA:CardMapWindow MAKE SURE THIS PLATFORM'S PCMCIA MEMORY
AREAS ARE SPECIFIED AS PHYSICAL
0x83b9cd44: CardMapWindow:Window 6 @ 4a0000 (phys = 40008000), size = 4096,
returning 4a03f6
0x83b9cd44: CardMapWindow succeeded
0x83b9cd44: ATADISK: pATARegAlt = 0x4a03f6. v_MemGran = 1
0x83b9cd44: ATADISK: Using 16 bit I/O
0x83b9cd44: ~CardRequestIRQ: succeeded
0x83b9cd44: ATADISK: CardRequestConfiguration 0x2 at 33 dV
0x83b9cd44: PCMCIA:CardRequestConfiguration entered
0x83b9cd44: PCMCIA:CardRequestConfiguration - assuming 16 bit I/O
0x83b9cd44: PCMCIA:CardModifyConfiguration entered
0x83b9cd44: PCMCIA:CardModifyConfiguration succeeded
0x83b9cd44: ConfigureLogSock: calling PDCardGetSocket/PDCardSetSocket
0x83b9cd44: PDCardSetSocket: NEW Power Settings Socket 0 to 2b7a904
0x83b9cd44: PDCardSetSocket: New Power Settings: VCC 1 VPP1 0 VPP2 0
0x83b9cd44: PDCardSetSocket: New Power Settings: VCC 1 VPP1 0 VPP2 0
0x83b9cd44: PDCardSetSocket: Powering Socket 0
0x83b9cd44: PDCardSetSocket: Powering Socket 0
0x83b9cd44: CardRequestConfiguration COR = 0x42, expected 0x42
0x83b9cd44: PCMCIA:CardRequestConfiguration succeeded
0x83b9cd44: ATADISK: CardRequestConfiguration succeded
0x83b9cd44: ATADISK:ATAInitController entered
0x83b9cd44: ATADISK:ATAInitController writing to ATA_REG_DRV_CTRL
0x83b9cd44: ATADISK:ATAWFD(WAIT_TYPE_READY)
0x83c63000: IREQThread: came out of wait
0x83b9cd44: ATADISK:ATAWaitForDisk - ATA_STATUS_READY 0x50
0x83c63000: IREQThread: calling PDCardGetSocket
0x83b9cd44: ATADISK:ATAInitController done
0x83c63000: IREQThread: going into wait
0x83b9cd44: ATDISK:ATAIssueIdentify entered
0x83b9cd44: ATDISK:ATAIssueIdentify waiting for DRQ
0x83b9cd44: ATADISK:ATAWFD(WAIT_TYPE_DRQ)
0x83b9cd44: ATDISK:ATAIssueIdentify reading data
0x83b9cd44: 8a 84 d4 3 0 0 10 0 0 0 40 2 20 0 7 0 ..........@. ...
0x83b9cd44: 0 a8 0 0 20 20 20 20 31 31 31 37 30 32 31 45 .... 1117021E
0x83b9cd44: 30 35 44 33 33 30 36 31 2 0 2 0 4 0 64 56 05D33061......dV
0x83b9cd44: 20 67 2e 38 31 32 61 53 44 6e 73 69 20 6b 44 53 g.812aSDnsi kDS
0x83b9cd44: 46 43 2d 42 35 32 20 36 20 20 20 20 20 20 20 20 FC-B52 6
0x83b9cd44: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 1 0 ..
0x83b9cd44: 0 0 0 2 0 0 0 1 0 0 1 0 d4 3 10 0 ................
0x83b9cd44: 20 0 0 a8 7 0 0 1 0 a8 7 0 0 0 0 0 ...............
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 20 ..............
0x83b9cd44: 20 20 20 20 20 20 31 31 31 37 30 32 31 45 30 35 1117021E05
0x83b9cd44: 44 33 33 30 36 31 0 0 0 0 0 0 0 0 0 0 D33061..........
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ................
0x83b9cd44: ATDISK: Identify Data -
0x83b9cd44: non-magnetic media
0x83b9cd44: disk transfer rate > 10Mbs
0x83b9cd44: removeable cartridge drive
0x83b9cd44: not MFM encoded
0x83b9cd44: hard sectored
0x83b9cd44: Number of Cylinders: 980
0x83b9cd44: Number of heads: 16
0x83b9cd44: Unformatted bytes per track: 0
0x83b9cd44: Unformatted bytes per sector: 576
0x83b9cd44: Sectors per track: 32
0x83b9cd44: Serial number: ....117120E1503D0316
0x83b9cd44: Buffer type dual port - simultaneous transfer capable
0x83b9cd44: Buffer size in sectors: 2
0x83b9cd44: Number of Ecc bytes or r/w long: 4
0x83b9cd44: Firmware revision: Vdg.8.21
0x83b9cd44: Model number: SanDisk.SDCFB-256.......................
0x83b9cd44: Maximum sectors/interrupt on read/write multiple: 1
0x83b9cd44: Can not perform double word IO
0x83b9cd44: LBA mode supported
0x83b9cd44: DMA NOT supported
0x83b9cd44: PIO cycle timing mode: 1
0x83b9cd44: DMA cycle timing mode: 0
0x83b9cd44: Current size fields ARE valid
0x83b9cd44: Current number of cylinders: 980
0x83b9cd44: Current number of heads: 16
0x83b9cd44: Current number of sectors/track: 32
0x83b9cd44: Current sector capacity: 501760
0x83b9cd44: Sectors per interrupt with r/w multiple: 0
0x83b9cd44: Multi sector setting valid
0x83b9cd44: Total user addressable sectors: 501760
0x83b9cd44: Single word dma modes supported: 0
0x83b9cd44: Single word transfer mode active: 0
0x83b9cd44: Multi word dma modes supported: 0
0x83b9cd44: Multi word transfer mode active: 0
0x83b9cd44: ATDISK:ATAIssueIdentify done
0x83b9cd44: ATADISK:UseCHSMode - RegQueryValueEx(CHSMode) returned 2
0x83b9cd44: ATADISK: DSK_Open(0x49950)
0x83b9cd44: Not loading FSD since StorageManager is active
0x83b9cd44: ATADISK: InitFSD succeeded
0x83b9cd44: ATADISK: DSK_Close
0x83b9cd44: PNP interface class
"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}","{A4E7EDDA-E575-4252-9D6B-4195D48BB
865}" (DSK1:) ATTACH
0x83b9cd44: PCMCIA:PcmciaPowerOff(0) -- Client window present, not powering
down
(It stops here and I wait for more than 30 seconds before plugging in the
USB device port and exploring via ActiveSync).
The applicable registry entries are:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCMCIA]
"IClass"=hex(7):\
7b,36,42,45,41,42,30,38,41,2d,38,39,31,34,2d,34,32,66,64,2d,42,33,33,46,2d,\
36,31,39,36,38,42,39,41,41,42,33,32,7d,3d,50,43,4d,43,49,41,20,43,61,72,64,\
20,53,65,72,76,69,63,65,73,00,00,00,00
"Order"=dword:00000000
"Dll"="PCMCIA.dll"
[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\ATADisk]
"FSD"="fatfsd.dll"
"Dll"="ATADISK.DLL"
"Prefix"="DSK"
"Ioctl"=dword:00000004
"Profile"="PCMCIA"
"IClass"=hex(7):\
22,7b,38,44,44,36,37,39,43,45,2d,38,41,42,34,2d,34,33,63,38,2d,41,31,34,41,\
2d,45,41,34,39,36,33,46,41,41,37,31,35,7d,22,2c,22,7b,41,34,45,37,45,44,44,\
41,2d,45,35,37,35,2d,34,32,35,32,2d,39,44,36,42,2d,34,31,39,35,44,34,38,42,\
42,38,36,35,7d,22,00,00,00,00
[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\50]
"Dll"="atadisk.dll"
"Entry"="DetectATADisk"
[HKEY_LOCAL_MACHINE\System\StorageManager]
"PNPUnloadDelay"=dword:00001000
"Dll"="fsdmgr.dll"
[HKEY_LOCAL_MACHINE\System\StorageManager\FATFS]
"EnableCache"=dword:00000001
"Util"="fatutil.dll"
"Paging"=dword:00000001
"Flags"=dword:00000024
"Dll"="fatfsd.dll"
"FriendlyName"="FAT FileSystem"
"CacheSize"=dword:00000000
[HKEY_LOCAL_MACHINE\System\StorageManager\PartitionTable]
"22"="XIP"
"21"="BINFS"
"20"="BOOT"
"0F"="FATFS"
"0E"="FATFS"
"0C"="FATFS"
"0B"="FATFS"
"07"="NTFS"
"06"="FATFS"
"04"="FATFS"
"01"="FATFS"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles]
"DefaultFileSystem"="FATFS"
"AutoPart"=dword:00000000
"Folder"="Mounted Volume"
"PartitionDriver"="mspart.dll"
"MountFlags"=dword:00000000
"AutoFormat"=dword:00000000
"AutoMount"=dword:00000001
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\PCMCIA]
"Folder"="Storage Card"
"Name"="PCMCIA/Compact Flash Device"
The Block driver seems to be loaded just fine as I have the following entry:
[HKEY_LOCAL_MACHINE\Drivers\Active\16]
"Hnd"=dword:000498e0
"Name"="DSK1:"
"Key"="Drivers\\PCMCIA\\ATADisk"
"Sckt"=dword:00850000
"PnpId"="SanDisk-SDP-0DBF"
"RegenumParms"=hex(7):\
53,63,6b,74,00,50,6e,70,49,64,00,52,65,67,65,6e,75,6d,50,61,72,6d,73,00,00,\
00,00,00,00,00,00
"InterfaceType"=dword:00000008
.
- Follow-Ups:
- Re: CF Storage Card Question (4.2 .Net / Sandgate)
- From: Andrew Worsley
- Re: CF Storage Card Question (4.2 .Net / Sandgate)
- Prev by Date: Re: Trying to build nk.lib and hal.lib
- Next by Date: Does PB 5.0 work with VS 2005 Beta 2 and WM 2005?
- Previous by thread: SMSC USB2228 - Via MSC issue
- Next by thread: Re: CF Storage Card Question (4.2 .Net / Sandgate)
- Index(es):