Texas Instruments TMS320DM644x Camera Accessories User Manual


 
www.ti.com
3ProceduresforCommonOperations
3.1CardIdentificationOperation
3.1.1MMCCardIdentificationProcedure
ProceduresforCommonOperations
BeforetheMMC/SDcontrollerstartsdatatransferstoorfrommemorycardsintheMMC/SDnativemode,
itmustfirstidentifyhowmanycardsarepresentonthebusandconfigurethem.Foreachcardthat
respondstotheALL_SEND_CIDbroadcastcommand,thecontrollerreadsthatcard’suniquecard
identificationaddress(CID)andthenassignsitarelativeaddress(RCA).Thisaddressismuchshorter
thantheCIDandtheMMC/SDcontrollerusesthisaddresstoidentifythecardinallfuturecommandsthat
involvethecard.
OnlyonecardcompletestheresponsetoALL_SEND_CIDatanyonetime.Theabsenceofanyresponse
toALL_SEND_CIDindicatesthatallcardshavebeenidentifiedandconfigured.
Note:ThefollowingstepsassumethattheMMC/SDcontrollerisconfiguredtooperateinMMC
orSDmode,andthememoryclockfrequencyontheCLKpinissetfor400kHzorless.
Theprocedureforacardidentificationoperationisissuedinopen-drainbusmodeforbothMMCandSD
cards.
TheMMCcardidentificationprocedureis:
1.UsetheMMCcommandregister(MMCCMD)toissuetheGO_IDLE_STATE(CMD0)commandtothe
MMCcards.UsingMMCCMDtoissuetheCMD0commandputsallcards(MMCandSD)intheidle
stateandnoresponsefromthecardsisexpected.
2.UseMMCCMDtoissuetheSEND_OP_CMD(CMD1)commandwiththevoltagerangesupported(R3
response,ifitissuccessful;R1bresponse,ifthecardisexpectedtobebusy).UsingMMCCMDto
issuetheCMD1commandallowsthehosttoidentifyandrejectcardsthatdonotmatchtheVDD
rangethatthehostsupports.
3.Iftheresponseinstep2isR1b(thatis,thecardisstillbusyduetopowerup),thengobacktostep2.
Ifthecardisnotbusy,continuetostep4.
4.UseMMCCMDtosendtheALL_SEND_CID(CMD2)command(R2responseisexpected)totheMMC
cards.UsingMMCCMDtosendtheCMD2commandnotifiesallcardstosendtheiruniquecard
identification(CID)number.ThereshouldonlybeonecardthatsuccessfullysendsitsfullCIDnumber
tothehost.Thesuccessfulcardgoesintotheidentificationstateanddoesnotrespondtothis
commandagain.
5.UseMMCMDtoissuetheSET_RELATIVE_ADDR(CMD3)command(R1responseisexpected)in
ordertoassignanaddressthatisshorterthantheCIDnumberthatwillbeusedinthefutureto
addressthecardinthefuturedatatransfermode.
Note:ThiscommandisonlyaddressedtothecardthatsuccessfullysentitsCIDnumberin
step4.Thiscardnowgoesintostandbymode.Thiscardalsochangesitsoutputdrivers
fromopen-draintopush-pull.ItstopsreplyingtotheCMD2command,allowingforthe
identificationofothercards.
6.Repeatstep4andstep5toidentifyandassignrelativeaddressestoallremainingcardsuntilnocard
respondstotheCMD1command.Nocardrespondingwithin5memoryclockcyclesindicatesthatall
cardshavebeenidentifiedandtheMMCcardidentificationprocedureterminates.
ThesequenceofeventsinthisoperationisshowninFigure12.
SPRUE30BSeptember2006MultimediaCard(MMC)/SecureDigital(SD)CardController29
SubmitDocumentationFeedback