SPRUIU1D July 2020 – December 2024 DRA821U , DRA821U-Q1
This procedure is invoked by the Card Insertion interrupt. Figure 1-1 and Table 12-4337 show a card interface detection sequence.
Figure 12-2246 Card Interface Detection Sequence| Step | Description |
|---|---|
| 1 | Set Internal Clock Enable to 1 in the MMCSD0_CLOCK_CONTROL register. |
| 2 | Wait until Internal Clock Stable is set to 1 in the MMCSD0_CLOCK_CONTROL register. |
| 3 | If Host Supports UHS-II, go to step (4) else go to step (12). |
| 4 | Try to initialize a card to UHS-II mode. Set UHS-II Interface Enable to 1 in the MMCSD0_HOST_CONTROL2 register, set SD Bus Power for VDD1 and SD Bus Power for VDD2 to 1 in the MMCSD0_POWER_CONTROL register, and set UHS Mode Select to 111b in the MMCSD0_HOST_CONTROL2 register. |
| 5 | Wait power ramp up time. It is dependent on a Host System. |
| 6 | Set SD Clock Enable to 1 in the MMCSD0_CLOCK_CONTROL register. |
| 7 | Wait 200 µs to check a card supports UHS-II mode. |
| 8 | Check STB.L Detection in the MMCSD0_PRESENTSTATE register. If UHS-II IF is detected, go to step (9). If UHS-II IF is not detected, go to step (11). |
| 9 | Wait until Lane Synchronization in the MMCSD0_PRESENTSTATE register is set to 1 (PHY Initialization is completed). |
| 10 | Perform UHS-II initialization. |
| 11 | Perform card power cycle. |
| 12 | Try to initialize a card to SD 4-bit mode. Set UHS-II Interface Enable to 0 in the MMCSD0_HOST_CONTROL2 register, set SD Bus Power for VDD1 to 1 in the MMCSD0_POWER_CONTROL register, and set UHS Mode Select to 000b in the MMCSD0_HOST_CONTROL2 register. |
| 13 | Wait power ramp up time. It is dependent on a Host System. |
| 14 | Set SD Clock Enable to 1 in the MMCSD0_CLOCK_CONTROL register. |
| 15 | Perform SD 4-bit mode initialization. Refer to Section 12.3.6.5.1.6, Card Initialization and Identification (for SD I/F). |