Re: SD Card Experts
- From: "Joe Welfeld" <jwelfeldnospam@xxxxxxxxxxxxx>
- Date: Tue, 25 Mar 2008 09:20:59 -0400
Hi,
I am supposedly using Standard SDIO and I see those handlers getting set in
the init function in sdhc.cpp I thought that if my device is "standard"
I should be able to use the SDIO Standard host controller and SDMemory
without modification ?
Joe W.
<vishal.g.shah@xxxxxxxxx> wrote in message
news:f22dda15-395b-4c21-bd73-e82cebdb17bd@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hi joe ,
In your host controller driver before calling
SDHCDRegisterHostController you should have defined certain handlers
for bus driver such as
// set the slot option handler
SDHCDSetSlotOptionHandler(m_pHCContext,CSDIOControllerBase::SDHCDSlotOptionHandler);
// set the Send packet handler
SDHCDSetBusRequestHandler(m_pHCContext,CSDIOControllerBase::SDHCDBusRequestHandler);
and so on ....
here SDHCDBusRequestHandler is the funtion which gets called in
response to calls like SendSDCommand from busdriver
SDHCDBusRequestHandler should be implemeted in your hcd and should
send the requested commands to the card and the response from the
card needs to be updated in PSD_BUS_REQUEST pRequest structure and
once the busrequest is completed by sdhcdbusrequesthandler it informs
the busdriver of completion of command by calling
SDHCDIndicateBusRequestComplete(m_pHCContext, pRequest, status);
In the similar way busdriver will keep on sending commands
like cmd2 cmd3 cmd9 cmd13 and so on and retrieves card info like
CID, RCA ,OEM ID,SCR ........ and later loads client driver i.e
sdmemory.dll
On Mar 24, 6:50 pm, "Joe Welfeld" <jwelfeldnos...@xxxxxxxxxxxxx>
wrote:
Hi Vishal,
I commented out MMC loop and I am detecting its an SD card, but I still
count down in that loop to 0 with card not ready, so it appears I am
sending the command but the card is not getting it ? can you elaborate on
your Item 2 below a bit more ?
Thanks,
Joe
<vishal.g.s...@xxxxxxxxx> wrote in message
news:53b1a580-872d-47f7-a9aa-879a0e144c33@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hi joe ,
i too faced similar problem earlier while writing driver
for sd memory card
1) if you are writing code for sdmemory card and not for mmc card then
try to comment out entire mmc checking part present in
sdhceventhandlers.cpp
as given below this will ensure that yr bus driver does not enter
into unnecessary loop to check fr mmc card and directly jumps for
checking sd memory card
/*
// check for MMC if we did not previously detect a combo device
if (Device_SD_Combo != deviceType) {
.......
}*/
2) when bus driver sends these commands to your hcd the
busrequesthandler will get called and in this function u need to send
commands to the sd card and send the appropriate respone to
busdriver ...........- Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: SD Card Experts
- From: vishal.g.shah@xxxxxxxxx
- Re: SD Card Experts
- References:
- SD Card Experts
- From: Joe Welfeld
- Re: SD Card Experts
- From: vishal.g.shah@xxxxxxxxx
- Re: SD Card Experts
- From: Joe Welfeld
- Re: SD Card Experts
- From: vishal.g.shah@xxxxxxxxx
- SD Card Experts
- Prev by Date: Re: kitl debug question
- Next by Date: usb function mass storage driver
- Previous by thread: Re: SD Card Experts
- Next by thread: Re: SD Card Experts
- Index(es):
Relevant Pages
|