This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem in CSL MMC module.



Hi Coders,

I found some problems in the CSL MMC module so I am gonna post it here & hope it can save somebody's hair & effort.

1. In function:
CSL_Status SD_sendRca(
               CSL_MmcsdHandle     hMmcsd,
               CSL_MMCCardObj      *pSdCardObj,
               Uint16              *pRCardAddr    )
   
Instruction:   
              *pRCardAddr = hMmcsd->mmcRegs->MMCRSP7;
             
This instruction reset the IER0 (Interrupt Enable). After you calling this function (to initialize MMC/SD), none of the maskable interrupts can be served as a result.
I am not sure how to fix it. I try to change it to:
                pRCardAddr = (Uint16*)hMmcsd->mmcRegs->MMCRSP7;
and it works.
               
2. In function:               
CSL_Status MMC_init (void)

Instruction:
    /* 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);
   
It configures DSP pins for both MMC0 & MMC1. If you just need MMC0 & dedicated MMC1's pins for other purpose, you'll get into trouble.
To fix the problem, just comment the second line out if you don't need MMC1.

Please correct me if I am wrong. Thanks,

HTH



Joe