Skip to main content
TSens.1
Associate
Oct 7, 2022 01:54 UTC
Solved

SDMMC3 is not working on STM32MP157F-EV1 board.

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.
TSens.1
TSens.1Best answer
Associate
Oct 10, 2022 23:45 UTC

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,​

4 replies

TSens.1
TSens.1Author
Associate
Oct 7, 2022 06:50 UTC

Sorry,

This issue has been resolved.

Kevin HUBER
ST Employee
Oct 7, 2022 15:24 UTC

Hello @TSens.1​ ,

Please can you explain how you solved your issue?

This can maybe help someone else,

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
TSens.1
TSens.1AuthorBest answer
Associate
Oct 10, 2022 23:45 UTC

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,​

Kevin HUBER
ST Employee
Oct 11, 2022 08:41 UTC

Hello @TSens.1​ ,

Thanks for the information ;)

Best regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.