Hello,
I wan't to use the MMC/SD1-Interface of the TMS320DM8148 for a bare metal program.
I have already implemented a solution for AM335x. The MMC/SD-Interface of both cpu
looks very similar.
The first thing I have done is the Pinmuxing for MMC/SD1-Interface according to the datasheet of the TMS320DM8148.
REG(PINCNTL1) = 0x00060000 | MUXMODE_SD1_CLK; REG(PINCNTL2) = 0x000E0000 | MUXMODE_SD1_CMD; REG(PINCNTL3) = 0x000E0000 | MUXMODE_SD1_DAT0; REG(PINCNTL4) = 0x000E0000 | MUXMODE_SD1_DAT1; REG(PINCNTL5) = 0x000E0000 | MUXMODE_SD1_DAT2; REG(PINCNTL6) = 0x000E0000 | MUXMODE_SD1_DAT3; REG(PINCNTL10) = 0x000E0000 | MUXMODE_SD1_DAT4; REG(PINCNTL11) = 0x000E0000 | MUXMODE_SD1_DAT5; REG(PINCNTL12) = 0x000E0000 | MUXMODE_SD1_DAT6; REG(PINCNTL13) = 0x000E0000 | MUXMODE_SD1_DAT7; REG(PINCNTL80) = 0x00060000 | MUXMODE_SD1_SDCD; REG(PINCNTL74) = 0x000E0000 | MUXMODE_SD1_POW;
After that enabled the clock CM_ALWON_MMCHS_1_CLKCTRL. But the registers of the MMC/SD1-Interface were not accesible.
So I enable all clocks in CM_ALWON.
Now the access to the MMC/SD1-Interface was possible.
Now I reuse the code for the AM335x to enable the MMC/SD1-Interface. This initialisation begins with the following steps
1. Set the SOFTRESET-Bit in SD_SYSCONFIG
2. Poll for RESETDONE in SD_SYSSTATUS
here RESETDONE are always zero.
The question is what causes RESETDONE to never goes ready. Is there any other prerequisiste of this interface.
Is there any StarterWare-like software for the TMS320DM8148 where i can see some examples.