Skip to main content
Visitor II
October 7, 2022
Solved

SDMMC3 is not working on STM32MP157F-EV1 board.

  • October 7, 2022
  • 3 replies
  • 2154 views

Hi, Community,

SDMMC3 is not working on STM32MP157F-EV1 board.

I'm not sure what's wrong.

I can confirm that SDMMC3_CK/CMD/D0 signals are input and output by osilloscope,

but SDMMC_FIFO is empty.

The following code is part of the SD_SendSDStatus function in stm32mp1xx_hal_sd.c

static uint32_t SD_SendSDStatus(SD_HandleTypeDef *hsd, uint32_t *pSDstatus)
{
 :
 :
 :
 
 /* Send ACMD13 (SD_APP_STAUS) with argument as card's RCA */
 errorstate = SDMMC_CmdStatusRegister(hsd->Instance);
 if(errorstate != HAL_SD_ERROR_NONE)
 {
 hsd->ErrorCode |= HAL_SD_ERROR_NONE;
 return errorstate;
 }
 
 /* Get status data */
 while(!__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXOVERR | SDMMC_FLAG_DCRCFAIL | SDMMC_FLAG_DTIMEOUT | SDMMC_FLAG_DATAEND))
 {
 if(__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXFIFOHF))
 {
 for(count = 0U; count < 8U; count++)
 {
 *pData = SDMMC_ReadFIFO(hsd->Instance); ★★★NOT REACHABLE!!!★★★
 pData++;
 }
 }
 
 if((HAL_GetTick() - tickstart) >= SDMMC_DATATIMEOUT)
 {
 return HAL_SD_ERROR_TIMEOUT;
 }
 }
 
 :
 :
 :
 
 return HAL_SD_ERROR_NONE;
}

These are the SDMMC terminals used.

 - PF0 :SDMMC3_D0  (modified)

 - PF1 :SDMMC3_CMD (default)

 - PG15:SDMMC3_CK  (default)

[note]

STM32CubeMX auto generated

 - PD1 :SDMMC3_D0

 - PF1 :SDMMC3_CMD

 - PG15:SDMMC3_CK

Regards, 

    This topic has been closed for replies.
    Best answer by TSens.1

    Hello,

    I'm ashamed to say this�?but..

    As a matter of fact, the signal line connecting the board to the SD card module was disconnected.

    I was so ashamed that I wanted to crawl under the rug.

    Regards,​

    3 replies

    TSens.1Author
    Visitor II
    October 7, 2022

    Sorry,

    This issue has been resolved.

    Technical Moderator
    October 7, 2022

    Hello @TSens.1​ ,

    Please can you explain how you solved your issue?

    This can maybe help someone else,

    Best Regards,

    Kevin

    TSens.1AuthorAnswer
    Visitor II
    October 10, 2022

    Hello,

    I'm ashamed to say this�?but..

    As a matter of fact, the signal line connecting the board to the SD card module was disconnected.

    I was so ashamed that I wanted to crawl under the rug.

    Regards,​

    Technical Moderator
    October 11, 2022

    Hello @TSens.1​ ,

    Thanks for the information ;)

    Best regards,

    Kevin