Tech Support > Microsoft Windows > Drivers > SD-bus send CMD52 and CMD53 is wrong.
SD-bus send CMD52 and CMD53 is wrong.
Posted by iwub on June 8th, 2005


The SD bus need transmit block one by one.
I do not know what is the block size of each?
and what different between SDTT_SINGLE_BLOCK and SDTT_MULTI_BLOCK?


Posted by iwub on June 8th, 2005


How to send the image file down to the HW?
Idefine a function as below, but the return of the sdrp->ResponseData is
1000h
and the sdrp->ResponseLength is 4 all the time.

why?

THX,

SD_API_STATUS SdioCommand52(IN PMRVDRV_ADAPTER Adapter, int rw,
UCHAR fn, BOOLEAN raw, ULONG addr,
UCHAR *pValue, ULONG len);

PSDBUS_REQUEST_PACKET sdrp =NULL;
SD_RW_DIRECT_ARGUMENT sdIoArgument;
SDCMD_DESCRIPTOR IoDirectDesc={
SDCMD_IO_RW_DIRECT,//SD_COMMAND_CODE Cmd
SDCC_STANDARD, //SD_COMMAND_CLASS CmdClass
SDTD_READ, //SD_TRANSFER_DIRECTION TransferDirection
SDTT_CMD_ONLY, //SD_TRANSFER_TYPE TransferType
SDRT_5 }; //SD_RESPONSE_TYPE ResponseType
KdPrint(("SdioCommand52() ------>len = %x\n",len));
if(rw) //if write
IoDirectDesc.TransferDirection=SDTD_WRITE;
//addr +=0x80000000;
sdrp = ExAllocatePool(NonPagedPool,sizeof(SDBUS_REQUEST_P ACKET));

RtlZeroMemory(sdrp,sizeof(SDBUS_REQUEST_PACKET));
sdrp->RequestFunction = SDRF_DEVICE_COMMAND;
NdisMoveMemory(&(sdrp->Parameters.DeviceCommand.CmdDesc),
&IoDirectDesc,sizeof(SDCMD_DESCRIPTOR));
sdIoArgument.u.AsULONG = 0;
sdIoArgument.u.bits.Address = addr;//Offset;
sdIoArgument.u.bits.Function =
Adapter->FunctionNumber;//1;//pDevExt->FunctionNumber;
KdPrint(("SdioCommand52: FucntionNumber = %x
,sdrp->Parameters.DeviceCommand.Argument
=%x\n",Adapter->FunctionNumber,sdrp->Parameters.DeviceCommand.Argument));

/*
if(IoDirectDesc.TransferDirection==SDTD_READ)
sdIoArgument.u.bits.WriteToDevice = 0;
else
sdIoArgument.u.bits.WriteToDevice = 1;
*/ sdIoArgument.u.bits.WriteToDevice = rw;
sdrp->Parameters.DeviceCommand.Argument = sdIoArgument.u.AsULONG;
//sdIoArgument.u.bits.Address = addr;

Status = SdBusSubmitRequest(Adapter->SdBusIfStd.Context,sdrp);
//KdPrint(("SdioCommand52: SdBusSubmitRequest() 2 success
Information = %s\n",sdrp->Information));

"iwub" <iwub@etang.com> дÈëÏûÏ¢ÐÂÎÅ:urd8c$8aFHA.2420@TK2MSFTNGP12.phx.gbl ...


Posted by iwub on June 10th, 2005


Who knows difference in Response1 to Response5?
"iwub" <iwub@etang.com> дÈëÏûÏ¢ÐÂÎÅ:%239J2Q$$aFHA.2420@TK2MSFTNGP12.phx.g bl...



Similar Posts