STM32F439 SDMMC Command Timeout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-25 04:09 AM
Hello all,
I access SDMMC directly through the APIs: HAL_MMC_WriteBlocks() and HAL_MMC_ReadBlocks().
Sometimes the access to SDMMC does not does not succeed with Timeout error.
Can you please advise me?
Thanks in advance.
Yacob.
- Labels:
-
SDIO-SDMMC
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-25 06:10 AM
One possibility out of many is that noise on the signal lines is causing the message to be discarded. Slow your clock down and try again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-04 11:58 PM
I added more disable interrupts, especially in SDMMC_CmdWriteSingleBlock and SDMMC_CmdReadSingleBlock and it seems it solved the problem.
I changed the above functions as the following:
__set_PRIMASK(1); // disable interrupts (I added)
SDIO_SendCommand(SDIOx, &sdmmc_cmdinit);
/* Check for error conditions */
errorstate = SDMMC_GetCmdResp1(SDIOx, SDMMC_CMD_READ_SINGLE_BLOCK, SDIO_CMDTIMEOUT);
__set_PRIMASK(0); // enable interrupts (I added)
Thanks anyway.
Yacob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-17 02:27 AM
Hello all,
Unfortunately the disable interrupts does not help always.
Sometimes the SDMMC stuck and I receive timeout error.
I use FreeRTOS and access to SDMMC from number of tasks.
The access to SDMMC is protected by semaphore.
Can any one advise?
Yacob.
