Hello,
Is it okay to set the uSDHC2_VEND_SPEC2 register to only target CMD and DATA[0] immediately before setting EXECUTE_TUNING in the uSDHC2_AUTOCMD12_ERR_STATUS register?
--> It is generally safe to set the uSDHC2_VEND_SPEC2 register immediately before setting EXECUTE_TUNING in the uSDHC2_AUTOCMD12_ERR_STATUS register. There are no specific restrictions requiring it to be set before other register settings.
Here's what the internal team responded to on a similar question:
The BSP default value for uSDHCx_VEND_SPEC2 means autotuning uses DATA[3:0]:
- TUNING_CMD_EN = 0
- TUNING_1bit_EN = 0
- TUNING_8bit_EN = 0
When SDIO interrupts are enabled, the async nature of the SDIO interrupts on DATA1 will confuse the auto tuning (it seems that the uSDHC module IP does not properlly comprehend SDIO DATA1 interrupts while autotuning is enabled on the 4 data lines).
Recommend setting TUNING_1bit_EN to use only DATA0 line for autotuning. This should be ok, since line lengths on PCB are well matched.
For bit 15 of uSDHC2_INT_STATUS
-->
-->Or You can try to clear these bits to check if this issue can be resolved.
uSDHCx_AUTOCMD12_ERR_STATUS[SMP_CLK_SEL]
uSDHCx_MIX_CTRL[FBCLK_SEL]
uSDHCx_MIX_CTRL[AUTO_TUNE_EN]
Best Regards,
Zhiming