Lately there have been a lot of questions about SD and MMC in the newsgroups, especially about what is supported by the Microsoft SD bus driver. SYNCHRONIZEBLOCK=1TARGETNAME=sdbusTARGETDEFNAME=SDBus2DEFFILE=$(TARGETDEFNAME).defTARGETTYPE=DYNLINKRELEASETYPE=PLATFORMDLLENTRY=DllEntryCRTStartupSOURCES = sdbusreq.cpp sddevice.cpp sdbus.cpp sdslot.cpp sdclient.cpp sddevinf.cpp sdiofeat.cpp sdworki.cpp sddebug.cpp TARGETLIBS= $(SYSGENOAKROOT)lib$(CPUINDPATH)defbuslib.lib $(SYSGENSDKROOT)lib$(CPUINDPATH)coredll.lib $(SYSGENOAKROOT)lib$(CPUINDPATH)ceddk.libNote that I added SYNCHRONIZEBLOCK=1 to make sure any other component that will link to the sdbus library will be able to find it. SYNCHRONIZEBLOCK=1 makes sure this folder is built before any other folder in the DRIVERS folder is built. Try to build the SDBUS2 driver; it should build without errors.
Sygic Wince 2018
If it doesn’t, make sure you selected the SD Bus Driver in the catalog and performed a sysgen on your OSDesign. And add the SDBUS2 folder to the dirs file in the DRIVERS folder.
Don't forget to change any BSP component that links to $(COMMONOAKROOT)lib$(CPUINDPATH)sdbus.lib to use the cloned SDBUS library, located at $(TARGETPLATROOT)lib$(CPUINDPATH)sdbus.libNow change StringCchCopy to StringCchCat in line 1394 of sddevice.cpp (in your cloned folder of course!). This will append the ' HighCapacity' string to the Client driver registry entry instead of replacing it (which leads to not finding the correct registry path for the profile because 'HKLM HighCapacity' is not a valid registry path). Even with this fix it won’t find that path because Microsoft did not provide registry settings for High Capacity MMC.
Let’s fix that by adding the following to platform.reg. Hi,thank you very much for that very good article.However I do have some questions.In our setup we use the SD 3.0 spec compatible bus driver, i.e. Catalog item 'SD Bus Driver' (SYSGENSDBUS, IMGSDBUS2).I have followed your steps and I am able to build the dll.But none of my changes make it into the final image.Looking into CE.Bib and COMMON.BIB I noticed that SDBUS.DLL can either be 'SDBUS2.DLL' or 'SDBUS.DLL' depending on IMGSDBUS2 being set or not.My assumption is that my freshly build SDBUS.dll is excluded in favour of the SDBUS2.DLL.Question: using your approach, do I have to select 'Legacy SD BUS Driver' from the catalog to include my cloned version?Maybe I am missing something here.TIA,Bjoern. It looks like you have the same situation as Salim.So just to verify; We are talking about MMC card which implements version 4.0 or higher right?It depends in which state your are when issuing a CMD7 to which state you end up.
Whenever you want to read the CSD register make sure your'e in the Stand-by state. When in the Stand-by State you can issue the CMD7 state which will transist you into the Transfer-State. When your'e in the Transfer-State you can issue CMD8 to receive the CSD register.When issuing a CMD7 when you're in the Programming-State you will go to the Disconnect-State. I suspect thats what going on in your case, but to verify that make sure you read in which state you are before sending CMD7.Check the state diagram in the MMC spec (JESD84-A43.pdf) Figure 22 — MultiMediaCard state diagram (data transfer mode) and the note below it.Let me know it this is the case,.