Skip to content

Conversation

@MaochenWang1
Copy link
Contributor

@MaochenWang1 MaochenWang1 commented Dec 23, 2025

DAT3-based card detection may fail for the first attempt on RT1060evkc + NXP_IW610x_v1 card, caused by transient signal states during initialization. Add a short retry loop (by default 10 attempts, 1 ms delay) to improve detection reliability.

DAT3-based card detection may fail for the first attempt on RT1060evkc
+ NXP_IW610x_v1 card, caused by transient signal states during
initialization. Add a short retry loop (by default 10 attempts, 1 ms
delay) to improve detection reliability.

Signed-off-by: Maochen Wang <[email protected]>
@MaochenWang1 MaochenWang1 force-pushed the main_mc_usdhc_dat3_retry branch from c6dcb7a to 7faeeca Compare December 23, 2025 10:30
@sonarqubecloud
Copy link

/* Default transfer timeout in ms for tuning */
#define IMX_USDHC_DEFAULT_TIMEOUT (5000U)
/* USDHC DAT3 detect attempts */
#define IMX_USDHC_DAT3_DETECT_RETRY_MAX (10U)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to make this a Kconfig, and only set it for boards that need it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, a Kconfig item for retry count, the default value could be 1, and could be changed by boards

/* Default transfer timeout in ms for tuning */
#define IMX_USDHC_DEFAULT_TIMEOUT (5000U)
/* USDHC DAT3 detect attempts */
#define IMX_USDHC_DAT3_DETECT_RETRY_MAX (10U)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, a Kconfig item for retry count, the default value could be 1, and could be changed by boards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants