Hello,
I noticed that in the MMC_Init function following happens:
/* Enable Serial port 0 pin for mmcsd0 */
CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_SP0MODE, MODE0);
/* Enable Serial port 1 pin for mmcsd1 */
CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_SP1MODE, MODE0);
EBSR is set to enable mmcsd0 and mmcsd1. Since I only use mmcsd0 and have other stuff on port #2 I have to call MMC_Init() and then reset the EBSR register in the code manually after that. This seams illogical to me (and looks ugly in the code) and prone to errors. I had trouble figuring out what was wrong with my code until I realized that this function is messing up the registers. I would suggest to parametrize the function to accept which port should be initialized. For example:
MMC_Init (MMC_SD0);
Cheers,