【WinCE】SD card技术了解并WINCE下SDHC驱动开发(updated)

 

 

 

 

AuthorTitan.Song

      

Suumary:

       简单介绍了一下SD卡的历史和发展,同时结合MX31 ADS上的WINCE SDHC驱动更深入的了解该硬件的一些行为特点。

 

了解SD card

SDSecure Digital Card卡的简称,直译成汉语就是安全数字卡,是由日本松下公司、东芝公司和美国SANDISK公司共同开发研制的全新的存储卡产品。SD存储卡是一个完全开放的标准(系统),多用于MP3、数码摄像机、数码相机、电子图书、AV器材等等,尤其是被广泛应用在超薄数码相机上。SD卡在外形上同Multimedia Card卡保持一致,大小尺寸比MMC卡略厚,容量也大很多。并且兼容MMC卡接口规范。不由让人们怀疑SD卡是MMC升级版。另外,SD卡为9引脚,目的是通过把传输方式由串行变成并行,以提高传输速度。它的读写速度比MMC卡要快一些,同时,安全性也更高。SD卡最大的特点就是通过加密功能,可以保证数据资料的安全保密。它还具备版权保护技术,所采用的版权保护技术是DVD中使用的CPRM技术(可刻录介质内容保护)。

 

规格


主要特点:

1.精巧而且超薄

SD记忆卡的尺寸只有24毫米x 32毫米 x 2.1毫米。作为“桥梁媒体”的重要特征,它精致小巧,方便您在不同设备上使用。兼容SD记忆卡的设备可以采用解码器软件来播放音乐、影像短片以及更多其他类型的内容,无需像CD播放机或DVD播放机那样采用驱动装置。从而使设备的外形更加精巧,同时也赋予了产品设计者发挥自由创意的全新空间。由于消除了播放音乐时的跳音现象,提高了播放的稳定性。

2.大容量栽体

目前,SD记忆卡已经具备各种容量可供选择,同时,2GB4GB8GBSDHC也出现了。

3.高速数据传输

为了提供快速响应和容易处理数字内容,SD记忆卡可以用每秒10MB的速率写入和读取数据。当其能够用于远程通信终端,直接下载内容时,记忆卡的高速传送能力将可使存取时间和通信成本降至最低,同时可减轻网络压力。

4.拥有版权保护功能

先进的数码技术使高保真音乐和其他高质量内容的录制成为现实。日新月异的数码技术,借助因特网,实现了全球范围的信息快速共享。这一进步也带来了对原版内容的大量复制,因此,作为21世纪的一种切实可行的记忆载体就必须具备高水平的版权保护技术,这样才能保护大量高质的数码数据。SD记忆卡可以自由复制各种数码数据,并采用独特的内置CPRM技术保存和转移版权所有的内容,这也是建立一个全新的音乐及其他商业媒体的发布体系的关键所在。

 

硬件结构

 


(参看附录中
SD卡和其他卡的一个对比表)

 

SDIO

SDIO(输入/输出)卡是一种扩展带SD卡插孔设备之功能的接口。正在开发各种SDIO卡,如相机、Bluetooth GPS802.11b等。




如果编写以上设备的驱动,当然前提是有一个合格的SD Host Controller。如同编写USB STORAGE/HID设备的驱动一样,需要USB HCD支持。MX31ADS支持基于SDIOLP1070 SDIO WLAN Card(在Wince 5.0SD卡驱动模型里,这种驱动称为client driver)。

 

SD_SDIO_SPEC.PDF

SDIO features

l         Targeted for portable and stationary applications

l         Minimal or no modification to SD Physical bus is required

l         Minimal change to memory driver software

l         Extended physical form factor available for specialized applications

l         Plug and play (PnP) support

l         Multi-function support including multiple I/O and combined I/O and memory

l         Up to 7 I/O functions plus one memory supported on one card.

l         Allows card to interrupt host

l         Initialization Voltage: 2.0 to 3.6V

l         Operational Voltage range: 3.1 to 3.5V

 

 

 

 

  

 

WinCE 5.0SD Stack

       一共可以分为3个部分:a bus driver, host controller driver client drivers,现分别介绍:

1 Bus Driver

       顾名思义,总线,连接client driverhost controller driver之间的一个管理层。这部分代码微软已经写好了,也就是说定义好了clienthost之间的通讯接口。(是不是可以这么说:编写SD WIFI的程序员可以不用知道是什么SDHC,从而达到驱动的跨硬件性)

参考代码:

D:/WINCE500/PUBLIC/COMMON/OAK/DRIVERS/SDCARD/SDBUSDRIVER/

 

2 Host Controller

       控制硬件并且通过上述的BUS driver来和client进行通讯。

参考代码:

D:/WINCE500/PLATFORM/Mx31/Src/Drivers/Sdhc

D:/WINCE500/PUBLIC/COMMON/OAK/CSP/ARM/FREESCALE/Mxarm11/Drivers/Sdhc

 

3 Client Driver

       通过BUS driverSD设备进行通讯。

 

Windows CE 5.0中的SDIO支持如下:

l         动态插入和拔出

l         DMA方式 (平台相关)

l         SDIO 中断

l         动态的时钟控制

l         错误恢复

l         唤醒

l         v1.0 多功能和组合设备

l         CE Power Manager来处理电源管理

l         MMC

 

下图可以清晰的表达基于WINCE5.0的一个SD STACK模型:

 

 

安全性

SDA 中的SD Memory specification 有种机制可以在特定机器上锁定卡里面的内容。WINCE 5里并没有显示的支持该机制。但是可以自己来做,比如一个文件系统的FILTER等。

 

Bus Driver

主要功能如下:

l         枚举板上的卡,并决定他们的类型(MMC, SD Memory or SDIO

l         配置合适的电流给卡。

l         根据注册表的值加载clients

l         把总线要求入队列

l         把来自host controller的异步通知入队列

l         总线要求完成,SDIO 中断,设备插入/拔出

l         出错时重试

 

参考代码:

D:/WINCE500/PUBLIC/COMMON/OAK/DRIVERS/SDCARD/SDBUSDRIVER

貌似此部分代码非微软原创:

// Copyright (c) 2002 BSQUARE Corporation.  All rights reserved.

// DO NOT REMOVE --- BEGIN EXTERNALLY DEVELOPED SOURCE CODE ID 40973--- DO NOT REMOVE

 

Host Controller Driver

主要功能:

l         HCD通知总线驱动卡的插入和拔出

l         给卡上电,SD定义了可接受的初时电压范围。

l         在总线驱动何客户端设置完时钟速度后,打开客户端卡的时钟(80个周期)

l         初始,把总线宽度设置成1。如果有需要的话(4-bit mode),把总线宽度设成4bit

l         传输SD 命令和数据到/来自卡上。

l         负责给槽上电,关电。

l         IST 在这里存在

l         可选的)唤醒支持(插入,拔出,SDIO中断)

 

初始化

1.         调用HCD’s XXX_Init

2.         调用 SDHCDAllocateContext() 来分配一段HC的上下文

a)         Context 是总线驱动和HCD共享的

3.         HCD 使用SDHCDSetXxx宏来填充这个上下文结构

a)         这个步骤是把HC向总线驱动描述一下

b)        包括函数指针,支持的电流,最大时钟,槽数目,SDIO的支持等等。

4.         调用 SDHCDRegisterHostController() 来把自己向总线驱动注册一下

5.         当总线驱动准备处理SD事件时,它会调用 HCDinit 函数(pContext->pInitHandler) (见SDHCDRegisterHostController__X函数)

6.         在初始化里,HCD还应该完成硬件和资源的初始化(IST等)

 

下面代码抄自MX31 BSPSDHC驱动的SDH_Init函数中:

DWORD SDH_Init(DWORD dwContext)

{

// allocate the context

 status = SDHCDAllocateContext(SDH_SLOTS,  &pHostContext);

。。。。。。

    //Set a unique name for each host controller

    if (pController->ControllerIndex == 1)

    {

        SDHCDSetHCName(pHostContext, TEXT("MXARM11_1"));

    }

    else

    {

        SDHCDSetHCName(pHostContext, TEXT("MXARM11_2"));

    }

// set init handler

    SDHCDSetControllerInitHandler(pHostContext,SDInitialize); 

    // set deinit handler   

    SDHCDSetControllerDeinitHandler(pHostContext, SDDeinitialize);

    // set the bus request handler

    SDHCDSetBusRequestHandler(pHostContext,SDHBusRequestHandler);  

    // set the cancel I/O handler

    SDHCDSetCancelIOHandler(pHostContext, SDHCancelIoHandler);  

    // set the slot option handler

    SDHCDSetSlotOptionHandler(pHostContext, SDHSlotOptionHandler);

    // now register the host controller

    status = SDHCDRegisterHostController(pHostContext);

 

Slot Option Handler

l         总线驱动调用HCD SlotOptionHandler

n         SDHCDSetSlotPower设置电压

n         SDHCDSetSlotInterface设置时钟和总线宽度

n         SDHCDEnableSDIOInterrupts

n         SDHCDAckSDIOInterrupt

n         SDHCDDisableSDIOInterrupts

l         SDHCDGetWriteProtectStatus – HCD 必须查看SD存储卡是否开启写保护

l         SDHCDQueryBlockCapability返回HCD的最大和最小块长度

 

总线要求

l         总线驱动把总线要求放入队列然后把它们传入HCD BusRequestHandler 函数

l         HCD根据要求来做相应的动作—command/read/write, multi-block, .

l         HCD 使用某种方式(DMA, PIO, busy-waiting等)来发送命令和数据

l         HCD 调用SDHCDIndicateBusRequestComplete() 来通知总线驱动完成

l         总线驱动把完成事件入队列并提交下一个要求给HCD

l         总线驱动的调度线程将会通知产生要求的起始源事件完成了。

 

标准的WINCE SDHC驱动支持

l         Standard Host Controller v1.0

n         Tokyo Electron Devices – Ellen

n         Toshiba - Pegasus

n         TI PCI 7x21

n         Ricoh R5C811 and R5C841

l         Non-standard hosts

n         Intel PXA-27x SOC (Mainstone II)

n         Samsung SMDK-2410

n         Freescale MX series

关于Standard Host Controller

SDA Host Working Group (MSFT executive member)

Defined Standard Host Register Specification to standardize the hardware interface from bus to controller

Currently ratified to v1.0 by SDA executive committee

MSFT strongly advocating this standard to all IHVs, ODMs, OEMs and Silicons

 

中断

l         HCD包括IST

l         IST 决定哪个槽中断

l         IST evaluates interrupt

比如现在拔出SD

IST 会调用Bus Driver’s SDHCIndicateSlotStateChange() with DeviceEjected parameter

l         Bus Driver calls client’s SlotEventCallBack routine with SDCardEjected.  (Provides async notification about changes in the slot state.)

l         Client performs its deinitialization

 

如何让镜像支持SD STACK

SYSGEN_SDBUS – SD bus driver (sdbus.dll)

SYSGEN_SDHC_STANDARD – Standard host controller (sdhc.dll)

SYSGEN_SD_MEMORY – SD Memory client (sdmemory.dll)

SYSGEN_BTH or SYSGEN_BTH_SDIO_ONLY – SDIO Bluetooth client (bthsdio.dll)

BSP variables will be added for CSP-specific host controllers

 

Client Driver

目前,WINCE5.0所支持的client driver如下:

l         SD Memory Class

l         SDIO Bluetooth Class - Type A

l         SDIO WiFi (vendor specific)

如果需要自己写client驱动的话可以参考D:/WINCE500/PUBLIC/COMMON/OAK/DRIVERS/SDCARD/SDCLIENTDRIVERS目录下的微软自带的SD client驱动来写。

 

example1: SD MEMORY DRIVER UNDER WINCE 5.0

Wince自带的SD存储卡client驱动,代码路径为:

D:/WINCE500/PUBLIC/COMMON/OAK/DRIVERS/SDCARD/SDCLIENTDRIVERS/SDMEMORY

 

一个SD存储卡在WINCE里的驱动架构如下图所示:
[图无法插入]

 

 

1注册表和启动

在注册表里告诉Storage Manager

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/SDMemory]

    "Name"="SD Memory Card"

    "Folder"="Storage Card"

    ;"PartitionDriver"=""          ; removable storage cannot have partitions

 

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/MMC]

    "Name"="MMC Card"

    "Folder"="Storage Card"

    ;"PartitionDriver"=""          ; removable storage cannot have partitions

 

; SD Memory Storage class driver

[HKEY_LOCAL_MACHINE/Drivers/SDCARD/ClientDrivers/Class/SDMemory_Class]

   "Dll"="SDMemory.dll"

   "Prefix"="DSK"

   "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer

   ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single block access

   ;"IdleTimeout"=dword:7D0      ; 2000 milliseconds

   ;"IdlePowerState"=dword:2     ; 0 == D0, 1 == D1, etc.

   ;"DisablePowerManagement"=""  ; if value present, then disable (remove value to enable)

 

   "Profile"="SDMemory"

   "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",

                     "{A32942B7-920C-486b-B0E6-92A702A99B35}"

 

; MMC Storage Class Driver

[HKEY_LOCAL_MACHINE/Drivers/SDCARD/ClientDrivers/Class/MMC_Class]

   "Dll"="SDMemory.dll"

   "Prefix"="DSK"

   "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer

   ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single block access

   ;"IdleTimeout"=dword:7D0      ; milliseconds

   ;"IdlePowerState"=dword:2     ; 0 == D0, 1 == D1, etc.

   ;"DisablePowerManagement"=""  ; if value present, then disable (remove value to enable)

 

   "Profile"="MMC"

   "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",

                     "{A32942B7-920C-486b-B0E6-92A702A99B35}"

 

2 SD命令和总线要求

将所有磁盘的操作转换成SD的命令和总线要求

NAME SDMEMORY.DLL

 

EXPORTS

DSK_Close=SMC_Close

DSK_Deinit=SMC_Deinit

DSK_Init=SMC_Init

DSK_IOControl=SMC_IOControl

DSK_Open=SMC_Open

DSK_PowerDown=SMC_PowerDown

DSK_PowerUp=SMC_PowerUp

DSK_Read=SMC_Read

DSK_Seek=SMC_Seek

DSK_Write=SMC_Write

下面为具体的DISK I/O操作函数和CARD I/O操作函数,详细实现见sdmemdiskio.cppsdmemcardio.cpp

//

// SDDiskIO

//

//  SDMemCardConfig    - Initialise the memcard structure and card itself

DWORD SDMemCardConfig( PSD_MEMCARD_INFO pMemCard );

 

    //  SDMemRead          - Read data from card into pSG scatter gather buffers

DWORD SDMemRead( PSD_MEMCARD_INFO pMemCard, PSG_REQ pSG );

 

    //  SDMemWrite         - Write data to card from pSG scatter gather buffers

DWORD SDMemWrite( PSD_MEMCARD_INFO pMemCard, PSG_REQ pSG );

 

    //  SDMemErase         - Erase a contiguous set of blocks

DWORD SDMemErase( PSD_MEMCARD_INFO pMemCard, PDELETE_SECTOR_INFO pDSI );

 

    //  SDMemEraseAll      - Erase all blocks

DWORD SDMemEraseAll( PSD_MEMCARD_INFO pMemCard );

 

//

// SDCardIO

//

 

    //  SDMemDoBusRequest  - Perform a bus request, returns Windows Status

DWORD SDMemDoBusRequest( PSD_MEMCARD_INFO  pMemcard,

                         UCHAR             Command,

                         DWORD             Argument,

                         SD_TRANSFER_CLASS TransferClass,

                         SD_RESPONSE_TYPE  ResponseType,

                         ULONG             NumBlocks,

                         ULONG             BlockSize,

                         PUCHAR            pBuffer,

                         DWORD             Flags);

 

    //  SDMemSetBlockLen   - Sets read/write block length for SD memory card

DWORD SDMemSetBlockLen( PSD_MEMCARD_INFO pMemcard,

                        DWORD            BlockLen );

 

    //  SDMemReadMultiple  - Read multiple 512 byte blocks of data from card

DWORD SDMemReadMultiple( PSD_MEMCARD_INFO pHandle,

                         ULONG            StartBlock,

                         ULONG            NumBlocks,

                         PUCHAR           pBuffer );

 

    //  SDMemWriteMultiple - Write multiple 512 byte blocks of data to card

DWORD SDMemWriteMultiple( PSD_MEMCARD_INFO pHandle,

                          LONG             StartBlock,

                          LONG             NumBlocks,

                          PUCHAR           pBuffer );

 

    //  SDMemWriteUsingSingleBlocks - Write using single block writes

DWORD SDMemWriteUsingSingleBlocks( PSD_MEMCARD_INFO pHandle,

                                   LONG             StartBlock,

                                   LONG             NumBlocks,

                                   PUCHAR           pBuffer );

 

    //  SDMemDoErase - Erase a contiguous set of blocks

DWORD SDMemDoErase( PSD_MEMCARD_INFO pHandle,

                    LONG             StartBlock,

                    LONG             NumBlocks );

 

DWORD SDAPIStatusToErrorCode( SD_API_STATUS Status );

 

DWORD SDGetCardStatus(PSD_MEMCARD_INFO pMemCard , SD_CARD_STATUS *pCardStatus);

 

VOID HandleIoctlPowerSet(PSD_MEMCARD_INFO       pMemCard,

                         PCEDEVICE_POWER_STATE  pDevicePowerState);

VOID InitializePowerManagement(PSD_MEMCARD_INFO pMemCard);

VOID DeinitializePowerManagement(PSD_MEMCARD_INFO pMemCard);

SD_API_STATUS IssueCardSelectDeSelect(PSD_MEMCARD_INFO pMemCard, BOOL Select);

VOID RequestEnd(PSD_MEMCARD_INFO pMemCard);

 

SD_API_STATUS RequestPrologue(PSD_MEMCARD_INFO pMemCard, DWORD DeviceIoControl);

 

 

 

SD on MX31 ADS

Secure Digital Host Controller

The Secure Digital Host Controller (SDHC) 模块支持MMCSDSecure Digital I/O and Combo Cards (SDIO)三种。MX31一共有2SDHC硬件模块。一个host controller 只支持连接上的一个卡。

SDHC.DLL由以下源代码组成

『――――

微软代码

    c:/macallan/private/winceos/coreos/ceosutil/utiltree.cxx

    c:/macallan/public/common/sdk/inc/svsutil.hxx

    c:/macallan/private/winceos/coreos/ceosutil/utilmemf.cxx

    c:/macallan/public/common/sdk/inc/svsutil.hxx

    c:/macallan/private/winceos/coreos/ceosutil/utilmem.cxx

    c:/macallan/private/winceos/coreos/ceosutil/svsutil.cxx

    c:/macallan/public/common/oak/drivers/sdcard/sdcardlib/sdcardapistubs.cpp

    c:/macallan/public/common/oak/drivers/sdcard/sdcardlib/sddebug.cpp

    c:/macallan/public/common/oak/drivers/sdcard/sdcardlib/sdmemapi.cpp

    c:/macallan/public/common/oak/inc/block_allocator.hxx

c:/macallan/public/common/oak/drivers/sdcard/sdhclib/sdhclib.cpp

―――――』

d:/wince500/platform/mx31/src/drivers/sdhc/bspsdhc.c

    d:/wince500/public/common/oak/csp/arm/freescale/mxarm11/drivers/sdhc/main.cpp

    d:/wince500/public/common/oak/csp/arm/freescale/mxarm11/drivers/sdhc/sdcontrol.cpp

d:/wince500/public/common/sdk/inc/kfuncs.h

 

 

SDHC的注册表设置

#if (defined BSP_SDHC1 || defined BSP_SDHC2)

[HKEY_LOCAL_MACHINE/Drivers/SDCARD/ClientDrivers/Class/SDMemory_Class]

"BlockTransferSize"=dword:100 ; Overwrite from default 64 blocks.

; "SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block

access

[HKEY_LOCAL_MACHINE/Drivers/SDCARD/ClientDrivers/Class/MMC_Class]

"BlockTransferSize"=dword:100 ; Overwrite from default 64 blocks.

; "SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block

access

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/MMC]

"Name"="MMC Card"

"Folder"="MMC"

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/SDMemory]

"Name"="SD Memory Card"

"Folder"="SD Memory"

#endif

IF BSP_SDHC1

[HKEY_LOCAL_MACHINE/Drivers/BuiltIn/SDHC_ARM11_1]

"Order"=dword:21

"Dll"="sdhc.dll"

"Prefix"="SDH"

"ControllerISTPriority"=dword:64

"Index"=dword:1

ENDIF ;BSP_SDHC1

IF BSP_SDHC2

[HKEY_LOCAL_MACHINE/Drivers/BuiltIn/SDHC_ARM11_2]

"Order"=dword:21

"Dll"="sdhc.dll"

"Prefix"="SDH"

"ControllerISTPriority"=dword:64

"Index"=dword:2

ENDIF ;BSP_SDHC

 

SDHC和DMA

SDHC驱动支持DMA 和非DMA 2种数据传输模式,默认是DMAFor every request submitted to it, the driver attempts to build a DMA Scatter Gather Buffer Descriptor list for the buffer passed to it by the upper layer. For cases where this list cannot be built, the driver falls back to the non-DMA mode of transfer. The default configuration is maintained in the file bsp_cfg.h using the parameters BSP_SDMA_SUPPORT_SDHC1 and BSP_SDMA_SUPPORT_SDHC2. A value of TRUE means DMA is the default mode, and for cases where DMA cannot be used, the driver falls back to a non-DMA mode. A value of FALSE means non-DMA mode is the default and DMA mode will not be attempted. For the driver to attempt to build the Scatter Gather DMA Buffer Descriptors, the upper layer should ensure that the buffer meets the following criteria.

Start of the buffer should be a word aligned address.

Number of bytes to transfer should be word aligned.

Due to cache coherency issues arising due to processor and SDMA access of the memory, the above criteria is further stringent for the read or receive operation (it is not applicable for write or transmit):

Start of the buffer should be a cache line size (32 bytes) aligned address.

Number of bytes to transfer should be cache line size (32 bytes) aligned.

 

电源管理

The primary methods for limiting power in SDHC module is to gate off all clocks to the controllers and to

cut off power to the card slot when no cards are inserted. When a card is inserted to any of the slots, that

slot alone is powered and the clocks to that controller alone are gated on. While using memory cards, the

clock to the host controller and the clock to memory cards are gated off when ever the controller is idle.

For SDIO cards, both the clocks stay on all the time.

SDHC driver supports the full power on and full power off states. In full power off state, the clocks to the

controllers and the power to the inserted cards are turned off. When powered on, all cards inserted before

and after the power down will be detected and mounted.

PowerUp

This function is implemented to support resuming a memory card operation that was previously terminated

by calling PowerDown() API. Power to the card is restored, clocks to the pertaining controller is restarted.

SDHC driver is notified of a device status change. This results in signaling the SD bus driver of a card

removal followed by a card insertion. The card is re-initialized and is mounted so that the all operations

scheduled during a power down resumes. SDIO cards will be initialized on resume.

The details of this architecture and its operation can be found in the Platform Builder Help under the

heading “Power On and Off Notifications for Secure Digital Card Drivers”, or in the online Microsoft

documentation at the following URL:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk5/html/wce50conpoweronoffnot

ificationsforsecuredigitalcarddrivers.asp

Note that this function is intended to be called only by the Power Manager.

PowerDown

This function has been implemented to support suspending all currently active SD operations just before

the entire system enters the low power state. Note that this function is intended to be called only by the

Power Manager. This function gates off all clocks to the controllers and powers down all the card slots.

 

LP1070 Secure Digital I/O Wi-Fi Driver

SDIO Wi-Fi 驱动是通过Freescale LP1070 SDIO Wi-Fi 卡来连接到一个IEEE 802.11b/g 无限局域网(WLAN) 。驱动支持以54 Mbps的速率和WLAN通讯。

注意:

The LP1070 SDIO Wi-Fi driver is an NDIS 5.0 compliant miniport driver.

LP1070 SDIO Wi-Fi card needs a 3.1~3.3V power supply from on-board Secure Digital Slot.

 

[HKEY_LOCAL_MACHINE/Drivers/SDCARD/ClientDrivers/Custom/MANF-0325-CARDID-0217-FUNC-1]

"Instance0"="FSL1070NdisSD:FSL1070NdisSD1"

"Prefix"="NDL"

"Dll"="FSL1070NdisSD.dll"

[HKEY_LOCAL_MACHINE/Comm/FSL1070NdisSD]

"ImagePath"="FSL1070NdisSD.dll"

"Group"="NDIS"

"DisplayName"="WaveBlaster 802.11 SDIO Adapter"

[HKEY_LOCAL_MACHINE/Comm/FSL1070NdisSD/Linkage]

"Route"=hex(7):/

46,53,4c,31,30,37,30,4e,64,69,73,53,44,31,00,00,00,00

[HKEY_LOCAL_MACHINE/Comm/FSL1070NdisSD1]

"ImagePath"="FSL1070NdisSD.dll"

"Group"="NDIS"

"DisplayName"="WaveBlaster 802.11 SDIO Adapter"

[HKEY_LOCAL_MACHINE/Comm/FSL1070NdisSD1/Parms]

"SDIOMaxClockFreq"=dword:017d7840

"SDIOMaxByteNumber"=dword:000003e8

"SDIOMaxBlockNumber"=dword:000003e8

"SDIOBlockSize"=dword:00000040

"SDIOSupportBlockMode"=dword:00000001

"SDIOSupport4BitMode"=dword:00000001

"BluetoothCoexCapability"=dword:00000000

"CcxCapability"=dword:00000000

"RadioMeasurementCapability"=dword:00000000

"MultiDomainCapability"=dword:00000000

"RoamRssiHysteresis80211bg"=dword:0000000a

"RoamRssiThreshold80211bg"=dword:ffffff9d

"ListenInterval"=dword:00000000

"BufferConfig"=dword:00000000

"DbgMaxFileSize"=dword:00019000

"WMMEnabled"=dword:00000000

"ResetEnable"=dword:00000001

"UWASensitivityLockout"=dword:00000000

"ShortPreamble"=dword:00000001

"RTSCTSThreshold"=dword:0000092b/

"FragmentThreshold"=dword:0000092a

"DefaultKey3"="0x0000000000"

"DefaultKey2"="0x0000000000"

"DefaultKey1"="0x0000000000"

"DefaultKey0"="0x0000000000"

"LongKeys"=dword:00000000

"Auth"=dword:00000000

"WEP"=dword:00000000

"PowerSaving"=dword:00000000

"RateSelect"=dword:00000000

"MACID"="0x000000000000"

"IbssChannel"=dword:00000000

"Ibss54g"=dword:00000000

"RestrictedChannel"=dword:00000000

"BSSID"="0x000000000000"

"Manual"=dword:00000000

"ESSID"=""

"Domain"=dword:00000010

"ProtocolType"=dword:00000003

"NetworkType"=dword:00000000

"STAuwa"="uwa_airoha.bin"

"STAupper"="mac_airoha_STA.bin"

"NetworkAddress"=""

"BusType"=dword:00000000

"BusNumber"=dword:00000000

[HKEY_LOCAL_MACHINE/Comm/FSL1070NdisSD1/Parms/Tcpip]

"Subnetmask"=hex(7):/

32,35,35,2e,32,35,35,2e,32,35,35,2e,30,00,00,00,00

"IpAddress"=hex(7):/

30,2e,30,2e,30,2e,30,00,00,00,00

"UseZeroBroadcast"=dword:00000000

"EnableDHCP"=dword:00000001

 

SD on EVT

目前在EVT板上,对于SD的代码更改如下:

1         *****************************************

2         ***********************************************

 

附录

SD卡与其他卡的对比

 

 

 

SDHC

 


Compatibility

 

* SDHC Host Products can use both SD and SDHC Memory Cards.
* SD Host Products can use only SD Memory Card 2GB or less.

Capacity (4GB SDHC Memory Card)

Still image JPEG
1,880 x 2,160 pixels, 6 Megapixels

Approx. 1,240 images

MPEG-2 Video
704 x 480 pixels, 5 Mbps, 30 fps

Approx. 1 hr 40 min

MPEG-4 Video
QVGA (320 x 240 pixels), 384 kbps, 15 fps

Approx. 19 hrs

Music (SD-Audio/AAC)
128 kbps

Approx. 68 hrs
(About 1,000 songs)

 

常用网站:

http://www.sdcard.com/

http://www.sdcard.org/

 

posted on 2007-02-11 10:09 Titan 阅读(17472) 评论(29)  编辑 收藏 网摘 所属分类: Windows CE

#2楼    回复  引用    

哥们儿
太专业了!我想问一下那里有SD WiFi 在Windows XP下的驱动。请赐教!多谢!急!!!
2007-04-17 00:09 | weekend [未注册用户]

#3楼    回复  引用    

太牛比了,我要常来
2007-05-04 19:26 | 杨 [未注册用户]

#4楼    回复  引用    

非常感谢你的发表!我正好发愁要怎样写一个CLIENT DRIVER用在mx31上, 你的发表让我了解许多。
2007-08-01 14:34 | 黄 [未注册用户]

#5楼    回复  引用    

有一个请求。我的imx31ADS bsp 里没有LP1070 Secure Digital I/O Wi-Fi Driver, 可不可以发给我呢?



2007-08-01 18:35 | 黄 [未注册用户]

#6楼    回复  引用    

WinCE5下SDIO接口的性能比较差,WinCE6(Mobile5)里对bus层和SDHC作了些改进,增加了fast-path机制,性能有所改进。不过像WLAN设备最好还是用monolithic的SDIO driver,优点是吞吐率有很大提高,缺点是移植起来比较麻烦。
博主是做memory卡的还是做WiFi设备的,以后多交流啊
2007-08-02 16:33 | nosuchid [未注册用户]

#7楼    回复  引用    

你有msn吗,可否一起探讨一下sd card drvier
2007-08-14 22:41 | danny [未注册用户]

#8楼    回复  引用    

谢谢您。您的文章让我受益匪浅,我前些天买了一个4G的SDHC卡,结果不能和我的机器兼容(Acer N300 BW,WM5.0系统,S3C2410的CPU),想看看能不能自己驱动。
2007-08-22 00:37 | 刘弘毅 [未注册用户]

#9楼    回复  引用    

谢谢
2007-10-22 21:30 | Passion [未注册用户]

#10楼    回复  引用    

I am going to develop a product based on SDHC card(both hardware and software,embeded). Will you please e-mail a copy of SDHC specification to raysys@126.com? Thanks a lot.
2007-10-23 22:23 | friend [未注册用户]

#11楼    回复  引用    

我现在的系统为ARM9+CE50,支持SD接口,以支持SD卡的读写。我希望能找到提供CE driver的SD WLAN卡,若有相关信息,请通知我x10@emtronix.com.cn。谢谢!
2007-12-05 18:12 | x10 [未注册用户]

#12楼    回复  引用    

我有问题请教,我现在使用的S3C3445单片机,想使用wince自带的SD卡驱动,修改后使用。我的硬件接口和寄存器配置应该在哪里添加上去,我没有找到相应的文件,麻烦您能给我一些帮助
2007-12-17 14:26 | potato [未注册用户]

#13楼    回复  引用    

我有问题要请教 请问买数码相机带内存卡吗?
2008-01-18 12:15 | 杨俊 [未注册用户]

#14楼    回复  引用    

不错
2008-01-23 16:45 | 叶小龙 [未注册用户]

#15楼    回复  引用    

有个问题想问:
我目前使用的是PXA270的板子
之前我在改注册表中关于SD的ORDER的数值时候发现
当ORDER的数值改为小于15的时候,系统启动后找不到SD的图标(感觉像是没有被加载)但是当将ORDER的数值改为大于15时候就ok。(DMA的ORDER的数值是为5)
希望楼主不惜赐教
谢谢
2008-01-23 16:50 | 叶小龙 [未注册用户]

#16楼    回复  引用    

今天又来看,收获不小,谢谢楼主
2008-02-04 14:21 | passion [未注册用户]

#17楼    回复  引用    

continuous up!
2008-03-01 21:56 | moonduke [未注册用户]

#18楼    回复  引用    

博主,你还真专业,顶你,网络上多几个想你这样的人,我们就方便多了
2008-04-03 22:38 | 豆芽小子 [未注册用户]

#19楼    回复  引用    

本人新買的東芝SDHC Memory Card 4GB,在電腦WIN XP未能顯示,是否要裝驅動程式,請指教,多謝.

#20楼    回复  引用    

我想知道怎么才能读到SD HC的卡,因为我现在的读卡器没有读到呢
2008-05-12 13:27 | ALEX80 [未注册用户]

#21楼 [楼主]   回复  引用  查看    

@ALEX80
SD 2.0的协议里通过CMD8这个命令是否有返回来决定当前的SD设备是V2.0,即SDHC.
2008-05-12 14:16 | Titan       

#22楼    回复  引用  查看    

很全面的介绍,不错~
2008-05-16 12:35 | fox23       

#23楼    回复  引用    



我在作linux sdio, 你的wince 参考代码发给我一份好吗?谢谢!
sun.xueqin75@gmail.com
2008-08-18 21:35 | sun xueqin [未注册用户]

#24楼    回复  引用    

请求:各位DX能否提供一个装在SD卡上,插入设备直接运行即可实现支持大容量SD卡的程序吗?

原因:本人购买的一个导航盒现在只能支持2G以下的SD卡,远远不能满足我安装多个导航软件的需求,我希望能它能支持4G、8G的卡。

设备的参数是:主频400MHZ,主芯片型号SANSUNG S3C2440A-40,操作系统WINCE5.0,软件编译类型ARMV4I,内存64MB,存储卡SD卡。

联系方式:antee@163.com

不胜感激!!!!
2008-11-02 12:37 | 广东刘生 [未注册用户]

#25楼    回复  引用    

请问在WM系统上的 设置-》系统-》关于 中 扩展槽 的使用情况接口是在哪设置啊? 比如插入T卡就显示,扩展槽已使用,没插入T卡就显示扩展槽未使用。谢谢!
2008-12-24 16:34 | 漂泊浪子 [未注册用户]

#26楼 [楼主]   回复  引用  查看    

这个信息是通过一个注册表值来设定的。
你在文档里搜SCKT.
Mobile的问题不好公开讨论,如果有不理解请发到我邮箱:songtitan@msn.com
2008-12-24 16:39 | Titan       

#27楼    回复  引用    

我现在也在开发SDIO Client驱动,碰到了很多问题,能否向各位请教一下,谢谢了。
我在开发时,使用SDRegisterClient函数时,总是返回错误,各位碰到过这样的问题吗?
还有能否在pocket pc 2003下开发SDIO的Client驱动,看了很多的函数都说是WINCE 5.0以后
才支持的,那么在2003下具有SD接口的POCKET PC如何开发SD驱动。
在这上面隔了很久了,那位能指点一下啊,谢谢了。
我的邮箱:siguoc@yahoo.com.cn qq:46236863 msn:siguoc@hotmail.com 希望能够收到各位的回信,非常谢谢。
2009-01-09 01:09 | csg [未注册用户]

#28楼    回复  引用    

请求:各位DX能否提供一个装在SD卡上,插入设备直接运行即可实现支持大容量SD卡的程序吗?

原因:本人购买的一个导航盒现在只能支持2G以下的SD卡,远远不能满足我安装多个导航软件的需求,我希望能它能支持4G、8G的卡。

设备的参数是:主频400MHZ,主芯片型号SANSUNG S3C2440A-40,操作系统WINCE5.0,软件编译类型ARMV4I,内存64MB,存储卡SD卡。

联系方式:nxycfb@126.com

不胜感激!!!!
2009-04-21 09:04 | 宁夏银川 [未注册用户]

#29楼    回复  引用    

求:各位DX能否提供一个装在SD卡上,插入设备直接运行即可实现支持大容量SD卡的程序吗?

原因:本人购买的一个导航盒现在只能支持2G以下的SD卡,远远不能满足我安装多个导航软件的需求,我希望能它能支持4G、8G的卡。

设备的参数是:主频400MHZ,主芯片型号SANSUNG S3C2440A-40,操作系统WINCE5.0,软件编译类型ARMV4I,内存64MB,存储卡SD卡。

联系方式:nut3721@163.com

不胜感激!!!!
2009-05-05 00:44 | hanchuze [未注册用户]
#1楼     回复   引用     
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值