Texas Instruments TMS320DM644x Camera Accessories User Manual


 
www.ti.com
2.9.7MonitoringActivityintheMMC/SDMode
2.9.7.1DeterminingWhetherNewDataisAvailableinMMCDRR
2.9.7.2VerifyingthatMMCDXRisReadytoAcceptNewData
2.9.7.3CheckingforCRCErrors
2.9.7.4CheckingforTime-OutEvents
2.9.7.5DeterminingWhenaResponse/CommandisDone
2.9.7.6DeterminingWhethertheMemoryCardisBusy
2.9.7.7DeterminingWhetheraDataTransferisDone
PeripheralArchitecture
Thissectiondescribesregistersandspecificregisterbitsthatyoucanusetoobtainthestatusofthe
MMC/SDcontrollerintheMMC/SDmode.YoucandeterminethestatusoftheMMC/SDcontrollerby
readingthebitsintheMMCstatusregister0(MMCST0)andMMCstatusregister1(MMCST1).
TheMMC/SDcontrollersetstheDRRDYbitinMMCST0whenthedataintheFIFOisgreaterthanthe
thresholdsetintheMMCFIFOcontrolregister(MMCFIFOCTL).Iftheinterruptrequestisenabled
(EDRRDY=1inMMCIM),theARMisnotifiedoftheeventbyaninterrupt.AreadoftheMMCdata
receiveregister(MMCDDR)clearstheDRRDYflag.
TheMMC/SDcontrollersetstheDXRDYbitinMMCST0whentheamountofdataintheFIFOislessthan
thethresholdsetintheMMCFIFOcontrolregister(MMCFIFOCTL).Iftheinterruptrequestisenabled
(EDXRDY=1inMMCIM),theARMisnotifiedoftheeventbyaninterrupt.
TheMMC/SDcontrollersetstheCRCRS,CRCRD,andCRCWRbitsinMMCST0inresponsetothe
correspondingCRCerrorsofcommandresponse,dataread,anddatawrite.Iftheinterruptrequestis
enabled(ECRCRS/ECRCRD/ECRCWR=1inMMCIM),theARMisnotifiedoftheCRCerrorbyan
interrupt.
TheMMC/SDcontrollersetstheTOUTRSandTOUTRDbitsinMMCST0inresponsetothe
correspondingcommandresponseordatareadtime-outevent.Iftheinterruptrequestisenabled
(ETOUTRS/ETOUTRD=1inMMCIM),theARMisnotifiedoftheeventbyaninterrupt.
TheMMC/SDcontrollersetstheRSPDNEbitinMMCST0whentheresponseisdone;orinthecaseof
commandsthatdonotrequirearesponse,whenthecommandisdone.Iftheinterruptrequestisenabled
(ERSPDNE=1inMMCIM),theARMisalsonotified.
ThecardsendsabusysignaleitherwhenwaitingforanR1b-typeresponseorwhenprogrammingthelast
writedataintoitsflashmemory.TheMMC/SDcontrollerhastwoflagstonotifyyouwhetherthememory
cardissendingabusysignal.Thetwoflagsarecomplementsofeachother:
TheBSYDNEflaginMMCST0issetifthecarddidnotsendorisnotsendingabusysignalwhenthe
MMC/SDcontrollerisexpectingabusysignal(BSYEXP=1inMMCCMD).Theinterruptbythisbitis
enabledbyacorrespondinginterruptenablebit(EBSYDNE=1inMMCIM).
TheBUSYflaginMMCST1issetwhenabusysignalisreceivedfromthecard.
TheMMC/SDcontrollersetstheDATDNEbitinMMCST0whenallofthebytesofadatatransferhave
beentransmitted/received.TheDATDNEbitispolledtodeterminewhentostopwritingtothedata
transmitregister(forawriteoperation)orwhentostopreadingfromthedatareceiveregister(foraread
operation).TheARMisalsonotifiedofthetime-outeventbyaninterruptiftheinterruptrequestisenabled
(EDATDNE=1inMMCIM).
SPRUE30BSeptember2006MultimediaCard(MMC)/SecureDigital(SD)CardController25
SubmitDocumentationFeedback