36.7.25 Host Control 2 Register: SD/SDIO

Note: The content of the HC2R register is depending on the mode. This description is for SD/SDIO mode. For e.MMC mode, see HC2R - EMMC36.7.24 Host Control 2 Register: e.MMC.
Name: HC2R - DEFAULT
Offset: 0x3E
Reset: 0x0000
Property: -

Bit 15141312111098 
 PVALENASINTEN       
Access R/WR/W 
Reset 00 
Bit 76543210 
 SCLKSELEXTUNDRVSEL[1:0]VS18ENUHSMS[2:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 

Bit 15 – PVALEN Preset Value Enable

As the operating SDCLK frequency depends on the system implementation, it is difficult to determine these parameters in the standard host driver. When Preset Value Enable (PVALEN) is set to 1, automatic SDCLK frequency generation is performed without considering system-specific conditions. This bit enables the functions defined in PVR.

If this bit is written to 0, the Clock Generator Select bit (CCR.CLKGSEL) and the SDCLK Frequency Select bit (CCR.SDCLKFSEL) in the Clock Control Register (CCR) are selected by the user.

If this bit is set to 1, CCR.SDCLKFSEL and .CLKGSEL and HC2R.DRVSEL are set by the peripheral as specified in the Preset Value Register (PVR).

ValueDescription
0

CCR.SDCLK, CCR.SDCLKFSEL controlled by the user.

1

Automatic selection by Preset Value is enabled.

Bit 14 – ASINTEN Asynchronous Interrupt Enable

This bit can be set to 1 if a card support asynchronous interrupts and Asynchronous Interrupt Support (ASINTSUP) is set to 1 in CA0R. Asynchronous interrupt is effective when DAT[1] interrupt is used in 4-bit SD mode. If this bit is set to 1, the user can stop the SDCLK during the asynchronous interrupt period to save power. During this period, the peripheral continues to deliver the Card Interrupt to the host when it is asserted by the card.

ValueDescription
0

Disabled

1

Enabled

Bit 7 – SCLKSEL Sampling Clock Select

The peripheral uses this bit to select the sampling clock to receive CMD and DAT.

This bit is set by the tuning procedure and is valid after completion of tuning (when EXTUN is cleared). Setting 1 means that tuning is completed successfully and setting 0 means that tuning has failed.

Writing 1 to this bit is meaningless and ignored. A tuning circuit is reset by writing to 0. This bit can be cleared by setting EXTUN to 1. Once the tuning circuit is reset, it takes time to complete the tuning sequence. Therefore, the user should keep this bit to 1 to perform a re-tuning sequence to complete a re-tuning sequence in a short time. Changing this bit is not allowed while the peripheral is receiving a response or a read data block. Refer to Figure 2.29 in the “SD Host Controller Simplified Specification V3.00” .

ValueDescription
0

The fixed clock is used to sample data.

1

The tuned clock is used to sample data.

Bit 6 – EXTUN Execute Tuning

This bit is set to 1 to start the tuning procedure and is automatically cleared when the tuning procedure is completed. The result of tuning is indicated to Sampling Clock Select (SCLKSEL). The tuning procedure is aborted by writing 0. Refer to Figure 2.29 in the “SD Host Controller Simplified Specification V3.00” .

ValueDescription
0

Not tuned or tuning completed

1

Execute tuning

Bits 5:4 – DRVSEL[1:0] Driver Strength Select

The peripheral output driver in 1.8V signaling is selected by this bit. In 3.3V signaling, this field is not effective. This field can be set according to the Driver Type A, C and D support bits in CA1R.

This field depends on setting of Preset Value Enable (PVALEN):
  • PVALEN=0 - This field is set by the user.
  • PVALEN=1 - This field is automatically set by a value specified in one of the PVRx.
ValueNameDescription
0 TYPEB

Driver Type B is selected (Default)

1 TYPEA

Driver Type A is selected

2 TYPEC

Driver Type C is selected

3 TYPED

Driver Type D is selected

Bit 3 – VS18EN 1.8V Signaling Enable

This bit controls the voltage regulator for the I/O cell. 3.3V is supplied to the card regardless of the signaling voltage.

Setting this bit from 0 to 1 starts changing the signal voltage from 3.3V to 1.8V. The 1.8V regulator output must be stable within 5 ms.

Clearing this bit from 1 to 0 starts changing the signal voltage from 1.8V to 3.3V. The 3.3V regulator output must be stable within 5ms.

The user can set this bit to 1 when the peripheral supports 1.8V signaling (one of the support bits is set to 1: SDR50SUP, SDR104SUP or DDR50SUP in CA1R) and the card or device supports UHS-I (S18A = 1. Refer to “Bus Switch Voltage Switch Sequence in the “Physical Layer Simplified Specification V3.01” ).

ValueDescription
0

3.3V signaling

1

1.8V signaling

Bits 2:0 – UHSMS[2:0] UHS Mode Select

This field is used to select one of the UHS-I modes and is effective when 1.8V Signal Enable (VS18EN) is set to 1.

If Preset Value Enable is set to 1, the peripheral sets SDCLK Frequency Select (SDCLKFSEL), Clock Generator Select (CLKGSEL) in CCR and Driver Strength Select (DRVSEL) according to PVR. In this case, one of the preset value registers is selected by this field. The user needs to reset SD Clock Enable (SDCLKEN) before changing this field to avoid generating a clock glitch. After setting this field, the user sets SDCLKEN to 1 again.

ValueNameDescription
0 SDR12

UHS SDR12 Mode

1 SDR25

UHS SDR25 Mode

2 SDR50

UHS SDR50 Mode

3 SDR104

UHS SDR104 Mode

4 DDR50

UHS DDR50 Mode

Note: This field is effective only if MC1R.DDR is set to 0.