Texas Instruments TMS320DM644x Camera Accessories User Manual


 
www.ti.com
2.8ResetConsiderations
2.8.1SoftwareResetConsiderations
2.8.2HardwareResetConsiderations
2.9Initialization
2.9.1MMC/SDControllerInitialization
2.9.2InitializingtheMMCControlRegister(MMCCTL)
PeripheralArchitecture
TheMMC/SDperipheralhastworesetsources:hardwareresetandsoftwarereset.
Asoftwarereset(suchasaresetthattheemulatorgenerates)doesnotcausetheMMC/SDcontroller
registerstoalter.Afterasoftwarereset,theMMC/SDcontrollercontinuestooperateasitwasconfigured
priortothereset.
AhardwareresetoftheprocessorcausestheMMC/SDcontrollerregisterstoreturntotheirdefaultvalues
afterreset.
ThegeneralprocedureforinitializingtheMMC/SDcontrollerisgiveninthefollowingsteps.Detailsabout
theregistersorregisterbitfieldstobeconfiguredintheMMC/SDmodeareinthesubsequent
subsections.
1.PlacetheMMC/SDcontrollerinitsresetstatebysettingtheCMDRSTbitandDATRSTbitintheMMC
controlregister(MMCCTL).YoucansetotherbitsinMMCCTLafterreset.
2.WritetherequiredvaluestootherregisterstocompletetheMMC/SDcontrollerconfiguration.
3.CleartheCMDRSTbitandtheDATRSTbitinMMCCTLtoreleasetheMMC/SDcontrollerfromits
resetstate.ItisrecommendednottorewritethevaluesthatarewrittentotheotherbitsofMMCCTLin
Step1.
4.EnabletheSD_CLKpinsothatthememoryclockissenttothememorycardbysettingtheCLKENbit
intheMMCmemoryclockcontrolregister(MMCCLK).
Note:TheMMC/SDcardsrequireaclockfrequencyof400kHzorlessforthecardinitialization
procedure.Makesurethatthememoryclockconfirmsthisrequirement.Oncecard
initializationcompletes,youcanadjustthememoryclockuptothelowerofthecard
capabilitiesorthemaximumfrequencythatissupported.
ThebitsintheMMCcontrolregister(MMCCTL)affecttheoperationoftheMMC/SDcontroller.The
subsectionsthatfollowhelpyoudecidehowtoinitializeeachofcontrolregisterbits.
IntheMMC/SDmode,theMMC/SDcontrollermustknowhowwidethedatabusmustbeforthememory
cardthatisconnected.IfanMMCcardisconnected,specifya1-bitdatabus(WIDTH=0inMMCCTL);if
anSDcardisconnected,specifya4-bitdatabus(WIDTH=1inMMCCTL).
ToplacetheMMC/SDcontrollerinitsresetstateanddisableit,settheCMDRSTbitandDATRSTbitin
MMCCTL.ThefirststepoftheMMC/SDcontrollerinitializationprocessistodisablebothsetsoflogic.
Wheninitializationiscomplete,butbeforeyouenabletheSD_CLKpin,cleartheCMDRSTbitand
DATRSTbitinMMCCTLtoenabletheMMC/SDcontroller.
SPRUE30BSeptember2006MultimediaCard(MMC)/SecureDigital(SD)CardController23
SubmitDocumentationFeedback