26988|116

82

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

SD驱动开发问题:客户端驱动加载成功,但盘符显示不出来 [复制链接]

SD驱动开发问题:客户端驱动加载成功,但盘符显示不出来???

有哪位牛人做过SD驱动吗?帮忙分析一下,谢谢!
详细现象:
   1、 硬件平台是自己实验室研发的,OS为WINCE600;
   2、 总线驱动、主控制驱动都能成功加载
    ——SD命令发送也成功:
   CMD5-CMD0-CMD55+ACMD41-CMD0-CMD55+ACMD41-CMD2-CMD3-CMD9-CMD13-CMD7-CMD55+ACMD51-CMD55+ACMD42-CMD55+ACMD6。
   3、客户端驱动加载成功,并且,我感觉系统也识别到了SD卡,由如下两点可知:
   1>~_~_~_SDMemory: Idle Timeout Wakeup after 2000 MS //此行信息是idlethread线程中的信息,
   2>在内存管理器中,能看到有SD的内存空间,当然,此处也有一个问题,我的SD卡是1G的,而内存管理器中显示是512M的??
   4、分区驱动(partition Driver)组件也加了;;;;

希望有牛人帮忙指点,谢谢!!

最新回复

终于结帖可以了。。。呵呵!谢谢各位牛哥的指点、多谢朋友的关注,这几天终于将SD主控制驱动测试的差不多了,尽量稳定性,依然是个问题。。。但是,毕竟问题解决了:SD盘符出来了,热插拔实现了,读写也可以,在存储管理器中的加载卸载、格式化都可以用了。。。 谢谢大家,由于分值有限,,,只能大家一些分着点,希望朋友们见谅~~~ 问题总结如下: 1、DMA配置很关键,特别是CRC、完成位等,当然,我现在弄的中断模式来使用DMA,还是不怎么稳定,不过,扫描方式,还可以的; 2、时钟,开始时,尽量调低,几位朋友提到过,等问题解决后,SD1.1的话,调到20MHZ左右比较好些 3、这次硬件一出了点小问题,CD寄存器不可用,后来,自己测时,才知道,只能通过GPIO接口,显别电平来获知是否有卡在内; 4、特别得关注CMD51命令,因为是第一次用DMA传小量数据,再者,就是CMD18,是第一次,用DMA传大块数据; 5、在SD启动前,会扫描一次整个SD卡,这点,我一开始,不大理解。。。 6、我开始用的NK启动方式为NOR,成功很低,后来换成了SD启动方式,基本上能一直启动,这点希望有借鉴的价值; 7、再次感谢大家,同时感谢我师兄。。。谢谢你们的帮助,谢谢  详情 回复 发表于 2009-12-26 17:32
点赞 关注

回复
举报

65

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
我参考的主要是S3C2440A的代码,另外,小部分是参考了S3C6410的,谢谢
 
 

回复

67

帖子

0

TA的资源

一粒金砂(初级)

板凳
 
注册表设置呢?
 
 
 

回复

78

帖子

0

TA的资源

一粒金砂(初级)

4
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\HSMMC0]
    "InterfaceType"=dword:0     ; Internal
    "Order"=dword:21
    "Dll"="s3c2450_hsmmc_ch0.dll"
    "Prefix"="HSC"
    "ObjectCreationProc"="CreateHSMMCHCObject"
    "MemBase"=dword:4AC00000
    "MemLen"=dword:100
    "Irq"=dword:15                ; 21
    "BaseClockFrequency"=dword:5B8D800      
    "TimeoutClockFrequency"=dword:5B8D800   



; @CESYSGEN IF CE_MODULES_SDMEMORY
; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\System\StorageManager]
    "PNPUnloadDelay"=dword:600

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
    "Name"="SD Memory Card"
    "Folder"="sd card"
    ;"PartitionDriver"=""          ; removable storage cannot have partitions

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
    "Name"="MMC Card"
    "Folder"="MMC card"
    ;"PartitionDriver"=""          ; removable storage cannot have partitions
; END HIVE BOOT SECTION

; SD Memory Storage class driver
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
   "Dll"="SDMemory.dll"
   "Prefix"="DSK"
   "Index"=dword:2
   "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer
   "Profile"="SDMemory"
   "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
                     "{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"

; MMC Storage Class Driver
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]
   "Dll"="SDMemory.dll"
   "Prefix"="DSK"
   "Index"=dword:2
   "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer
   ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single    "Profile"="MMC"
   "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
                     "{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
; @CESYSGEN ENDIF CE_MODULES_SDMEMORY

这个是可以的,自己对照着看下吧,我也不懂
 
 
 

回复

64

帖子

0

TA的资源

一粒金砂(初级)

5
 
也是移植的S3C2440的。。修改后如下:
;------------ SDHC Driver -------------------------------------------------
; @CESYSGEN IF CE_MODULES_SDBUS
IF BSP_NOSDHC !
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDHC_SEP0718]
    "Order"=dword:21
    "Dll"="SEP0718_sdhc.dll"
    "Prefix"="SDH"
   
    "DMAChannel"=dword:0          ; DMA channel to use.  Set to 0xffffffff to disable DMA
    "DMAIrq"=dword:20
    "DMA_IST_Priority"=dword:96

    "SDIOIrq"=dword:14
    "SDIO_IST_Priority"=dword:97
   
    "PollingTimeout"=dword:100      ; 100 ms
    "CardDetect_Thread_Priority"=dword:98
   
    "CardDetectGPIO"="I"            ; card detect on GPI6 091019_LYS
    "CardDetectMask"=dword:1   ;SD_CDETECT[0] card detect 091020_LYS
    "CardDetectFlag"=dword:0
    "CardDetectControlMask"=dword:40  ;PORTI_GPIOSEL[6] card detect 091020_LYS
    "CardDetectControlFlag"=dword:40    ;PORTI_GPIOSEL[6] card detect 091020_LYS
    "CardDetectPullupMask"=dword:fffffeff
    "CardDetectPullupFlag"=dword:100
   
    "CardReadWriteGPIO"="E"         ; card R/W on GPE2 091019_LYS
    "CardReadWriteMask"=dword:100
    "CardReadWriteFlag"=dword:100
    "CardReadWriteControlMask"=dword:fffcffff
    "CardReadWriteControlFlag"=dword:0
    "CardReadWritePullupMask"=dword:fffffeff
    "CardReadWritePullupFlag"=dword:100

    "HandleBusyFinishOnCommand38"=dword:1
    "DmaTransferTimeoutFactor"=dword:8
    "DmaTransferTimeoutConstant"=dword:3000
ENDIF BSP_NOSDHC !
; @CESYSGEN ENDIF CE_MODULES_SDBUS
;-------------------------------------------------------------------------
 
 
 

回复

78

帖子

0

TA的资源

一粒金砂(初级)

6
 
有人说是分区驱动的原因,不过,我加了分区。。。?
 
 
 

回复

78

帖子

0

TA的资源

一粒金砂(初级)

7
 
有没有相关的trace?打印出来看看
你在换换512M或者4G的sd卡分别试一下,把
trace贴出来
 
 
 

回复

80

帖子

0

TA的资源

一粒金砂(初级)

8
 
有的,我整理一下,一会帖出来
 
 
 

回复

60

帖子

0

TA的资源

一粒金砂(初级)

9
 
之的信息主要说明发送了如下命令:
CMD5-CMD0-CMD55+ACMD41-CMD0-CMD55+ACMD41-CMD2-CMD3-CMD9-CMD13-CMD7-CMD55+ACMD51-CMD55+ACMD42-CMD55+ACMD6。
由于比较长,所以,没法弄上来,

WaitForSingleObject--m_hResponseReceivedEvent is been treg
*(vm_pSDIReg->SDIRSP0) = 0x920
__IST___TransferIstThread_Here is TRANSFER_DONE
___STATUS___ SDIO_Interrupt_Disabled
-/-/-/SDHCB:Get_SDI_Bus_Width m_dwSDIBusWidth = 0x0
-/-/-/SDHCB:Stop_SDI_Clock
After clear SD_RINTSTS=0x       0
After clear SD_CTRL=0x      10
End of TransferIstThread SD_STATUS=0x    3106

---FiveHandler--- SDHCDSlotOptionHandler starts
SDHCDSlotOptionHandler option=SDHCDSetSlotInterface
??????InterfaceMode = 0
-/-/-/SDHCB:Set_SDI_Bus_Width_1Bit
^=^=^=^=^Here enable SetClockRate in SlotOptionHandler,because SDCLOCK cannt reach 25MHZ.If set CLk 25Mhz,it will tell kernel error
-/-/-/SDHCB SetClockRate start, dwClockRate = 0xbebc20
In SetClockRate SD_APBCLKDIV = 0xe,
dwClockRate=12500000
******SetClockRate dwPrescale = 0x0; dwActualRate = 0x57316d
Before fClockIsRunning SD_CLKENA = 0x0
-/-/-/SDHCB:Is_SDI_Clock_Running SD_CLKENA = 0x0
After fClockIsRunning SD_CLKENA = 0x0
fClockIsRunning= 0
SDHCD:SetClockRate() - Clock rate set to 5714285 Hz
SDHCD:SetClockRate() -This is end
---FiveHandler---SDHCDSlotOptionHandler ends
~_~_~_~_~SDMemory: DLL_PROCESS_ATTACH
~_~_~_~_~SDMemory: +SMC_Init
~_~_~_SDMemCalcDataAccessClocks: Tpd:f ns, Asynch: f ns, AsyncClocks:0 , SyncClocks: 1080418304, ReadTotal: 0, Write Factor:
1094116192 WriteTotal: 8571
~_~_~_SDMemory: Power Management Setup complete
~_~_~_~_~SDMemory: -SMC_Init
~_~_~_~_~SDMemory: +-SMC_Open
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 3280896 =~_~_~**UNKNOWN**
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +-SMC_Open
~_~_~_~_~SDMemory: +-SMC_Close
~_~_~_~_~SDMemory: +-SMC_Open
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 1 =~_~_~DISK_IOCTL_GETINFO
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 464896 =~_~_~IOCTL_DISK_DEVICE_INFO
~_~_~_~_SDMemory: GetDeviceInfo - Profile = SDMemory, length = 18
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: ReceviSEP0718DISP::InitializeHardware
ed IOCTL 465956 =~_~_~IOCTL_DISK_GET_STORAGEID
~_~_~_~_SDMemory: +GetStorageID
~_~_~_~_~SDMem+OALIntrRequestSysIntr(1,ory: -SMC_IOControl returning 0
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: R 0xc0565090, 0x00000000)
-OALIntrRequestSysIntr(irq = 1, sysIntr = 19)
+OALIntrRequestSysIntrecevied IOCTL 465956 =~_~_~IOCTL_DISK_GET_STORAGEID
~_~_~_~_SDMemory: +GetStorageID
~_~_~_~_(1, 0xc0565094, 0x00000000)
-OALIntrRequestSysIntr(irq = 18, sysIntr = 20)
+OEMInterruptEnable(19, 0x0, 0)
+OALIntrEnableIrqs(1, 0x80a066f4)
+BSPIntrEnableIrq(1)
-BSPIntrEnableIrq(irq = 1)
-OALIntrEnableIrqs(rc = 1)
-OEMInterruptEnable(rc = 1)
+OEMInterruptEnable(20, 0x0, 0)
+OALIntrEnableIrqs(1, 0x80a066f8)
+BSPIntrEnableIrq(18)
-BSPIntrEnableIrq(irq = 18)
-OALIntrEnableIrqs(rc = 1)
-OEMInterruptEnable(rc = 1)
Maximum AlloweSDMemory: -GetStorageID
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemod Error 7:
ry: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 465920 =~_~_~IOCTL_DISK_GETINFO
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 482312 =~_~_~IOCTL_DISK_READ
~_~_~_SDMemory: +SDMemRead
~_~_~_SDMemRead: Reading blocks 0-0
BlockTransferSize = 30, NeedToTransfer = 1
~_~SDMemReadMultiple: Reading blocks 0-0
~_~SDMemDoBusRequest: CMD17 Arg 0x00000000 TransferClass 0 NumBlocks 1 BlockSize 512
////////////////////////////////////(CMD:17)//////////////////////////
---FiveHandler---BusRequestHandler starts (CMD:17)
-/-/-/SDHCB:Start_SDI_Clock
!!Alert!!!!!Alert!!! Here Set the Bus Width, move from SetupPollingXfer/SetupDmaXfer
-/-/-/SDHCB:Get_SDI_Bus_Width m_dwSDIBusWidth = 0x0
!!Alert!!!!!Alert!!! Here enable SetupDmaXfer,disable SetupPollingXfer/
pBlockBuffer=0xd0410008,m_dwNumBytesToTransfer=0x     200,
-/-/-/SDHCB SetupDmaXfer started
Here in case SD_READ
-/-/Stop_SDIO_DMA_Channel/-/!!!Alert!!!Alert!!! SEP0718 dont have such function,here use reset DMA instead
Last in SetupDmaXfer SD_CTRL =0x30
Last in SetupDmaXfer--DMACC0Control=0x  2024ad ,DMACC0Configuration=0x     38c
---CmdType---this is SD_WRITE or SD_READ
BLKSIZ = 0x200
|-|-|-|-SendCommand (0xd002c980,Cmd=      17, Arg=00000000, respType=0001, 0x1) starts
respType short response required,right now SD_CMD =0x    3200
SD_CMD =0x    3351
........SendCommand end
After SendCommand,SD_RINTSTS=0x      24
After SendCommand,SD_STATUS=0x80208d09
WaitForSingleObject--m_hResponseReceivedEvent is been treg
*(vm_pSDIReg->SDIRSP0) = 0x900
***0-1*****Most important DMACIntTCStatus0=0x       0
-/-/Enable_SDIO_DMA_Channel/-/--Here we only configure DMA0 Channel,DMACC0Control=0x  1c24ad ,DMACC0Configuration=0x     38d
***0-2*****Most important DMACIntTCStatus0=0x       0
Here after Enable_SDIO_DMA_Channel--DMACC0Control=0x    24ad ,DMACC0Configuration=0x     38c
-/-/-/SDHCB:Get_SDI_Bus_Width m_dwSDIBusWidth = 0x0
Before WaitForSingleObject DMACIntTCStatus0=0x       0
After WaitForSingleObject DMACIntTCStatus0=0x       0
OK OK OK we pass the DMA Intr
-/-/Stop_SDIO_DMA_Channel/-/!!!Alert!!!Alert!!! SEP0718 dont have such function,here use reset DMA instead
//////MemCopy SD_READ,Do it now,pBlockBuffer = 0xd0410008
***5*****Most important SD_RINTSTS=0x    45ac
m_pDMABuffer=0xd03d0000, m_pDMABufferPhys=0x3250e000
*********m_dwNumBytesToTransfer= 0x200,pBlockBuffer0= 0xeb,pBlockBuffer1= 0x58
eb 58 90 4d 53 44 4f 53 35 2e 30 0 2 8 24 0 2 0 0 0 0 f8 0 0 3f 0 ff 0 0 0 0 0 0 46 1e 0 8e 7 0 0 0 0 0 0 2 0 0 0 1 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52 f0 63 43 70 9c 9e 40 9c 82 9a 8a 40 40 40 40 8c 82 a8 66 64 40 40 40 67 93 1d a3 79 e8 f7 1d 83 1d b3 7a 0 f9 10 9c 5 14 ac 81 68 11 9a 26 e6 b 73 ff ff 15 e2 cc 1f 6d 8c 80 cc 1f 6d a3 1 c4 7f ef c5 d 9b 81 da c 82 cc 1f 6f 92 cd ef c2 cd 12 8d f1 6 fc 2c 0 ea 71 6 fc 54 0 ee 64 cd 16 8c 38 cd 7 80 19 76 1 1 72 2 1 d0 56 1 d2 90 7 41 f4 fb 68 fb 17 e1 59 9 80 e8 2e 79 fe e8 13 68 1d 76 e 1 9a 21 d7 dd 41 f6 fb d7 cb 41 f2 fb d7 c1 31 9a 2d 9a 32 cc c0 cc 76 8d f0 1f 4 94 0 cc d4 0 cc a0 c a6 cc d0 20 0 2 1 0 fc 4 0 1f a 40 1 68 83 77 54 ab 14 ac 81 9a 26 1f 4 38 1 3 f6 ab 54 1f a 28 1 ed 82 2 1f 8 1a 1 fc 8c 5 68 85 14 ac 81 17 e9 9a 27 61 f2 cc b0 cc b0 cc b0 cc b1 d6 54 cc 67 a4 cc 1f 6e 9c 30 cd ef e3 fd 85 15 94 cd 17 a0 cd 83 d4 21 ee ec 35 d ad 14 ac 81 15 d1 81 c8 c 15 99 70 2 5 9a 26 cc c2 1f 4 a9 ff 3 86 0 4 cc 80 92 1f a e3 ff 86 9c a8 98 88 a4 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1a 14 a4 ca da de ec ca 40 c8 d2 e6 d6 e6 40 de e4 40 de e8 d0 ca e4 40 da ca c8 d2 c2 5d fe 1a 14 88 d2 e6 d6 40 ca e4 e4 de e5 fe 1a 14 a0 e4 ca e6 e6 40 c2 dc f2 40 d6 ca f2 40 e8 de 40 e4 ca e6 e8 c2 e4 e8 1a 14 0 0 0 0 1 59 97 b0 0 0 ab 55
here is end of data__IST___TransferIstThread_Here is TRANSFER_DONE
___STATUS___ SDIO_Interrupt_Disabled
-/-/-/SDHCB:Get_SDI_Bus_Width m_dwSDIBusWidth = 0x0
-/-/-/SDHCB:Stop_SDI_Clock
After clear SD_RINTSTS=0x       0
After clear SD_CTRL=0x      10
End of TransferIstThread SD_STATUS=0x    8906
---FiveHandler---BusRequestHandler ends
~_~_~_SDMemory: -SDMemRead
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 482312 =~_~_~IOCTL_DISK_READ
~_~_~_SDMemory: +SDMemRead
~_~_~_SDMemRead: Reading blocks 0-0
BlockTransferSize = 30, NeedToTransfer = 1
~_~SDMemReadMultiple: Reading blocks 0-0
~_~SDMemDoBusRequest: CMD17 Arg 0x00000000 TransferClass 0 NumBlocks 1 BlockSize 512
 
 
 

回复

57

帖子

0

TA的资源

一粒金砂(初级)

10
 
还有其他的debug信息么?
1. 看起来你打印的信息挺多的,能不能把后面的信息也给打印出来?
2. 你的sd卡能够在pc上识别么?
 
 
 

回复

83

帖子

0

TA的资源

一粒金砂(初级)

11
 
引用 9 楼 guopeixin 的回复:
还有其他的debug信息么?
1. 看起来你打印的信息挺多的,能不能把后面的信息也给打印出来?
2. 你的sd卡能够在pc上识别么?

另外,从log信息上看没有看到不正常的情况,能不能把你的分区和fs的注册表也给粘贴出来
 
 
 

回复

94

帖子

0

TA的资源

一粒金砂(初级)

12
 
楼主找一个没有分区的小容量SD卡,做一次实验,看看测试结果如何,
如果能显示图标,就说明是分区驱动的问题
 
 
 

回复

73

帖子

0

TA的资源

一粒金砂(初级)

13
 
引用 9 楼 guopeixin 的回复:
还有其他的debug信息么?
1. 看起来你打印的信息挺多的,能不能把后面的信息也给打印出来?
2. 你的sd卡能够在pc上识别么?

SD卡在PC上是好的。。。
打印信息确实比较多,没法全贴上来,所以,将前面那部分去掉了,
去掉的那部分打印信息主要是总线驱动、主控制驱动的,主要是发送如下一串命令:
CMD5-CMD0-CMD55+ACMD41-CMD0-CMD55+ACMD41-CMD2-CMD3-CMD9-CMD13-CMD7-CMD55+ACMD51-CMD55+ACMD42-CMD55+ACMD6。
据打印信息来看,命令是发送成功了。。。。
 
 
 

回复

91

帖子

0

TA的资源

一粒金砂(初级)

14
 
引用 10 楼 guopeixin 的回复:
引用 9 楼 guopeixin 的回复:
还有其他的debug信息么?
1. 看起来你打印的信息挺多的,能不能把后面的信息也给打印出来?
2. 你的sd卡能够在pc上识别么?

另外,从log信息上看没有看到不正常的情况,能不能把你的分区和fs的注册表也给粘贴出来

分区和fs的注册表:我都是用的默认的,即:自己没修改过,只在Catalog Itams View中将分区组件Partition Driver选上,用的是VS2005工具。。。
分区和fs的注册表:还需要在别的地方另外再添加或修改吗?请指点!
 
 
 

回复

69

帖子

0

TA的资源

一粒金砂(初级)

15
 
如下信息是开始加载客户端驱动的信息:
显示不了盘符会不会加载不完全,请帮我看看问题出在什么地方,致谢


~_~_~_~_~SDMemory: DLL_PROCESS_ATTACH
~_~_~_~_~SDMemory: +SMC_Init
~_~_~_SDMemCalcDataAccessClocks: Tpd:f ns, Asynch: f ns, AsyncClocks:0 , SyncClocks: 1080418304, ReadTotal: 0, Write Factor:
1094116192 WriteTotal: 8571
~_~_~_SDMemory: Power Management Setup complete
~_~_~_~_~SDMemory: -SMC_Init
~_~_~_~_~SDMemory: +-SMC_Open
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 3280896 =~_~_~**UNKNOWN**
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +-SMC_Open
~_~_~_~_~SDMemory: +-SMC_Close
~_~_~_~_~SDMemory: +-SMC_Open
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 1 =~_~_~DISK_IOCTL_GETINFO
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 464896 =~_~_~IOCTL_DISK_DEVICE_INFO
~_~_~_~_SDMemory: GetDeviceInfo - Profile = SDMemory, length = 18
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: ReceviSEP0718DISP::InitializeHardware
ed IOCTL 465956 =~_~_~IOCTL_DISK_GET_STORAGEID
~_~_~_~_SDMemory: +GetStorageID
~_~_~_~_~SDMem+OALIntrRequestSysIntr(1,ory: -SMC_IOControl returning 0
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: R 0xc0565090, 0x00000000)
-OALIntrRequestSysIntr(irq = 1, sysIntr = 19)
+OALIntrRequestSysIntrecevied IOCTL 465956 =~_~_~IOCTL_DISK_GET_STORAGEID
~_~_~_~_SDMemory: +GetStorageID
~_~_~_~_(1, 0xc0565094, 0x00000000)
-OALIntrRequestSysIntr(irq = 18, sysIntr = 20)
+OEMInterruptEnable(19, 0x0, 0)
+OALIntrEnableIrqs(1, 0x80a066f4)
+BSPIntrEnableIrq(1)
-BSPIntrEnableIrq(irq = 1)
-OALIntrEnableIrqs(rc = 1)
-OEMInterruptEnable(rc = 1)
+OEMInterruptEnable(20, 0x0, 0)
+OALIntrEnableIrqs(1, 0x80a066f8)
+BSPIntrEnableIrq(18)
-BSPIntrEnableIrq(irq = 18)
-OALIntrEnableIrqs(rc = 1)
-OEMInterruptEnable(rc = 1)
Maximum AlloweSDMemory: -GetStorageID
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemod Error 7:
ry: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 465920 =~_~_~IOCTL_DISK_GETINFO
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 482312 =~_~_~IOCTL_DISK_READ
~_~_~_SDMemory: +SDMemRead
~_~_~_SDMemRead: Reading blocks 0-0
BlockTransferSize = 30, NeedToTransfer = 1
~_~SDMemReadMultiple: Reading blocks 0-0
~_~SDMemDoBusRequest: CMD17 Arg 0x00000000 TransferClass 0 NumBlocks 1 BlockSize 512
////////////////////////////////////(CMD:17)//////////////////////////
---FiveHandler---BusRequestHandler starts (CMD:17)
-/-/-/SDHCB:Start_SDI_Clock
!!Alert!!!!!Alert!!! Here Set the Bus Width, move from SetupPollingXfer/SetupDmaXfer
-/-/-/SDHCB:Get_SDI_Bus_Width m_dwSDIBusWidth = 0x0
!!Alert!!!!!Alert!!! Here enable SetupDmaXfer,disable SetupPollingXfer/
pBlockBuffer=0xd0410008,m_dwNumBytesToTransfer=0x     200,
-/-/-/SDHCB SetupDmaXfer started
Here in case SD_READ
-/-/Stop_SDIO_DMA_Channel/-/!!!Alert!!!Alert!!! SEP0718 dont have such function,here use reset DMA instead
Last in SetupDmaXfer SD_CTRL =0x30
Last in SetupDmaXfer--DMACC0Control=0x  2024ad ,DMACC0Configuration=0x     38c
---CmdType---this is SD_WRITE or SD_READ
BLKSIZ = 0x200
|-|-|-|-SendCommand (0xd002c980,Cmd=      17, Arg=00000000, respType=0001, 0x1) starts
respType short response required,right now SD_CMD =0x    3200
SD_CMD =0x    3351
........SendCommand end
After SendCommand,SD_RINTSTS=0x      24
After SendCommand,SD_STATUS=0x80208d09
WaitForSingleObject--m_hResponseReceivedEvent is been treg
*(vm_pSDIReg->SDIRSP0) = 0x900
***0-1*****Most important DMACIntTCStatus0=0x       0
-/-/Enable_SDIO_DMA_Channel/-/--Here we only configure DMA0 Channel,DMACC0Control=0x  1c24ad ,DMACC0Configuration=0x     38d
***0-2*****Most important DMACIntTCStatus0=0x       0
Here after Enable_SDIO_DMA_Channel--DMACC0Control=0x    24ad ,DMACC0Configuration=0x     38c
-/-/-/SDHCB:Get_SDI_Bus_Width m_dwSDIBusWidth = 0x0
Before WaitForSingleObject DMACIntTCStatus0=0x       0
After WaitForSingleObject DMACIntTCStatus0=0x       0
OK OK OK we pass the DMA Intr
-/-/Stop_SDIO_DMA_Channel/-/!!!Alert!!!Alert!!! SEP0718 dont have such function,here use reset DMA instead
//////MemCopy SD_READ,Do it now,pBlockBuffer = 0xd0410008
***5*****Most important SD_RINTSTS=0x    45ac
m_pDMABuffer=0xd03d0000, m_pDMABufferPhys=0x3250e000
*********m_dwNumBytesToTransfer= 0x200,pBlockBuffer0= 0xeb,pBlockBuffer1= 0x58
eb 58 90 4d 53 44 4f 53 35 2e 30 0 2 8 24 0 2 0 0 0 0 f8 0 0 3f 0 ff 0 0 0 0 0 0 46 1e 0 8e 7 0 0 0 0 0 0 2 0 0 0 1 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52 f0 63 43 70 9c 9e 40 9c 82 9a 8a 40 40 40 40 8c 82 a8 66 64 40 40 40 67 93 1d a3 79 e8 f7 1d 83 1d b3 7a 0 f9 10 9c 5 14 ac 81 68 11 9a 26 e6 b 73 ff ff 15 e2 cc 1f 6d 8c 80 cc 1f 6d a3 1 c4 7f ef c5 d 9b 81 da c 82 cc 1f 6f 92 cd ef c2 cd 12 8d f1 6 fc 2c 0 ea 71 6 fc 54 0 ee 64 cd 16 8c 38 cd 7 80 19 76 1 1 72 2 1 d0 56 1 d2 90 7 41 f4 fb 68 fb 17 e1 59 9 80 e8 2e 79 fe e8 13 68 1d 76 e 1 9a 21 d7 dd 41 f6 fb d7 cb 41 f2 fb d7 c1 31 9a 2d 9a 32 cc c0 cc 76 8d f0 1f 4 94 0 cc d4 0 cc a0 c a6 cc d0 20 0 2 1 0 fc 4 0 1f a 40 1 68 83 77 54 ab 14 ac 81 9a 26 1f 4 38 1 3 f6 ab 54 1f a 28 1 ed 82 2 1f 8 1a 1 fc 8c 5 68 85 14 ac 81 17 e9 9a 27 61 f2 cc b0 cc b0 cc b0 cc b1 d6 54 cc 67 a4 cc 1f 6e 9c 30 cd ef e3 fd 85 15 94 cd 17 a0 cd 83 d4 21 ee ec 35 d ad 14 ac 81 15 d1 81 c8 c 15 99 70 2 5 9a 26 cc c2 1f 4 a9 ff 3 86 0 4 cc 80 92 1f a e3 ff 86 9c a8 98 88 a4 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1a 14 a4 ca da de ec ca 40 c8 d2 e6 d6 e6 40 de e4 40 de e8 d0 ca e4 40 da ca c8 d2 c2 5d fe 1a 14 88 d2 e6 d6 40 ca e4 e4 de e5 fe 1a 14 a0 e4 ca e6 e6 40 c2 dc f2 40 d6 ca f2 40 e8 de 40 e4 ca e6 e8 c2 e4 e8 1a 14 0 0 0 0 1 59 97 b0 0 0 ab 55
here is end of data__IST___TransferIstThread_Here is TRANSFER_DONE
___STATUS___ SDIO_Interrupt_Disabled
-/-/-/SDHCB:Get_SDI_Bus_Width m_dwSDIBusWidth = 0x0
-/-/-/SDHCB:Stop_SDI_Clock
After clear SD_RINTSTS=0x       0
After clear SD_CTRL=0x      10
End of TransferIstThread SD_STATUS=0x    8906
---FiveHandler---BusRequestHandler ends
~_~_~_SDMemory: -SDMemRead
~_~_~_~_~SDMemory: -SMC_IOControl returning 1
~_~_~_~_~SDMemory: +SMC_IOControl
~_~_~_~_~SMC_IOControl: Recevied IOCTL 482312 =~_~_~IOCTL_DISK_READ
~_~_~_SDMemory: +SDMemRead
~_~_~_SDMemRead: Reading blocks 0-0
BlockTransferSize = 30, NeedToTransfer = 1
~_~SDMemReadMultiple: Reading blocks 0-0
~_~SDMemDoBusRequest: CMD17 Arg 0x00000000 TransferClass 0 NumBlocks 1 BlockSize 512
 
 
 

回复

70

帖子

0

TA的资源

一粒金砂(初级)

16
 
LZ你抓到的这段信息是什么东西?是MBR?
eb 58 90 4d 53 44 4f 53 35 2e 30 0 2 8 24 0 2 0 0 0 0 f8 0 0 3f 0 ff 0 0 0 0 0 0 46 1e 0 8e 7 0 0 0 0 0 0 2 0 0 0 1 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52 f0 63 43 70 9c 9e 40 9c 82 9a 8a 40 40 40 40 8c 82 a8 66 64 40 40 40 67 93 1d a3 79 e8 f7 1d 83 1d b3 7a 0 f9 10 9c 5 14 ac 81 68 11 9a 26 e6 b 73 ff ff 15 e2 cc 1f 6d 8c 80 cc 1f 6d a3 1 c4 7f ef c5 d 9b 81 da c 82 cc 1f 6f 92 cd ef c2 cd 12 8d f1 6 fc 2c 0 ea 71 6 fc 54 0 ee 64 cd 16 8c 38 cd 7 80 19 76 1 1 72 2 1 d0 56 1 d2 90 7 41 f4 fb 68 fb 17 e1 59 9 80 e8 2e 79 fe e8 13 68 1d 76 e 1 9a 21 d7 dd 41 f6 fb d7 cb 41 f2 fb d7 c1 31 9a 2d 9a 32 cc c0 cc 76 8d f0 1f 4 94 0 cc d4 0 cc a0 c a6 cc d0 20 0 2 1 0 fc 4 0 1f a 40 1 68 83 77 54 ab 14 ac 81 9a 26 1f 4 38 1 3 f6 ab 54 1f a 28 1 ed 82 2 1f 8 1a 1 fc 8c 5 68 85 14 ac 81 17 e9 9a 27 61 f2 cc b0 cc b0 cc b0 cc b1 d6 54 cc 67 a4 cc 1f 6e 9c 30 cd ef e3 fd 85 15 94 cd 17 a0 cd 83 d4 21 ee ec 35 d ad 14 ac 81 15 d1 81 c8 c 15 99 70 2 5 9a 26 cc c2 1f 4 a9 ff 3 86 0 4 cc 80 92 1f a e3 ff 86 9c a8 98 88 a4 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1a 14 a4 ca da de ec ca 40 c8 d2 e6 d6 e6 40 de e4 40 de e8 d0 ca e4 40 da ca c8 d2 c2 5d fe 1a 14 88 d2 e6 d6 40 ca e4 e4 de e5 fe 1a 14 a0 e4 ca e6 e6 40 c2 dc f2 40 d6 ca f2 40 e8 de 40 e4 ca e6 e8 c2 e4 e8 1a 14 0 0 0 0 1 59 97 b0 0 0 ab 55
 
 
 

回复

75

帖子

0

TA的资源

一粒金砂(初级)

17
 
看上去比较像DBR啊,可是最后不是0x55AA。
 
 
 

回复

78

帖子

0

TA的资源

一粒金砂(初级)

18
 
上面那些0x进度的数字吗?
我真没太注意是什么。。。

我只知道是发送ACMD51号命令时,会通过DMA传输一些数据,就是这些

盘符出不来,是不是和这个有关呢?
 
 
 

回复

67

帖子

0

TA的资源

一粒金砂(初级)

19
 
好像应该是MBR,我在word中统计了一下,总共512B(字节),而SD的第0块大小也是512B(字节)。。。

这些数字该怎么去用?如何识别?
 
 
 

回复

69

帖子

0

TA的资源

一粒金砂(初级)

20
 
引用 18 楼 liuysheng 的回复:
好像应该是MBR,我在word中统计了一下,总共512B(字节),而SD的第0块大小也是512B(字节)。。。

这些数字该怎么去用?如何识别?


刚才说错了,是512组数据,而这些是十六进制的,所以,512*4=2K字节。。。SD的第0块大小也是2K(字节)。。。
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/10 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表