I just received a newly manufactured card based on a SAM4E16C, and with eMMC instead of the microSD we've been using for the last few years. Im trying to test if the eMMC is working properly, but running in to some troubles.
I'm using the sd_mmc driver from the ASF library. The power to the eMMC is turned on, and all the pins for communication with the eMMC is initialized as follows:
This has been working well with the eval board and a SD-card. From what I gather, pretty much the same should be able to be used with the eMMC, since the driver supports both MMC and SD.
However, when I try to init the card, a few strange things are happening, and I'm trying to figure out at which level things are going on. I would like to basically first issue a simple command and read the response just to see if the electrical stuff is working properly.
The first thing the driver does is to send a CMD0. The hsmci_send_cmd function returns true, which means success. But the odd thing is that it returns true even if the eMMC is powered off. The next command, mmc_mci_op_cond, fails with the debug output "hsmci_send_cmd_execute: CMD 0x00004501 sr 0x0c10c1e5 error".
I haven't really dived too deep into HSMCI and the MMC protocol, so I'm somewhat lost.
Any tips in where to start? Maybe I've missed some initialization or basic thing related to the driver.