Hello,
I'm working on a new design based on the Cortex-M4 LPC4337 (NXP) On my board, there is a e-MMC Memory (MTFC4GMDEA-1M WT) with 8-bit data interface. My µVision version is 4.74 and I'm using the driver SDIO_LPC43xx.c. I'm selecting the Memory Card Drive 0 with the SD-Native Bus Mode. But the finit() function is always failing.
Any suggestions? is the 8-bit interface the problem ?
regards, Jean-Marc
Check the value returned by finit(), this tell you what's wrong.
Georg
The return value is 1 (IO Error. IO/driver initialization failed, or there is no media, or media initialization failed).
How many bits wide a your interface, per dafault driver set it to 4 bit, must force to 1 bit.
My interface is 8-bit wide. How can I do to force the driver to work to 8-bit?
Where can I find the list of commands sended by the driver SD/MMC? It would be a way for me to know where is a problem.
Driver is supplied in source form, debug it.
All the commands finished in timeout!
For information, I'm a software developer and I debug this problem without my hardware colleague (in holidays). Do you have an idea to guide me in a possible hardware problem ? Thank you.
Well you should still be able to read a schematic, and walk through the connectivity.
Ensure all the pins are connected to the right/equivalent connections on the card. Confirm the pin designations on the LPC match the documentation for the chip. Confirm all the pins are configured correctly on the software side, that GPIO bank clocks are enabled, and pin modes/peripheral association are right. Check pull-up/down settings, or if external resistors are present, and of the correct value.
Stick a scope or logic analyzer on the pins, review the signals.
Download an SD/MMC specification, review that with respect to the commands / signals used.
Evaluate on hardware where the interface works (dev board).
I ckecked everything I could. Without my HW colleague, it's difficult. The HW seems to be correct.
Here is the results of the finit() command: - Cmd:8 Argument:0x1aa -> timeout - Cmd:55 Argument:0x0 -> timeout (repeated many times) - Cmd:1 Argument:0xFF8000 -> command done. Answer = 0xFF8080 (repeated many times)
Exit with return value of finit() = 1
Any idea?
Is the SD/MMC driver of the µVision4 (version 4.74) compatible with the JEDEC eMMC 4.41 standard?
No answer ?
Wouldn't Keil support be a better channel for your question?
See the top or bottom of every web page.
Update on this issue: There is no eMMC support in our middleware for MDK 4.x. However, you can update to MDK version 5.12 or later and either install the corresponding legacy pack or convert/setup your project based on a device family pack (DFP).