cancel
Showing results for 
Search instead for 
Did you mean: 

SDMMC3 is not working on STM32MP157F-EV1 board.

TSens.1
Associate II

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, 

1 ACCEPTED SOLUTION

Accepted Solutions
TSens.1
Associate II

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

View solution in original post

4 REPLIES 4
TSens.1
Associate II

Sorry,

This issue has been resolved.

Kevin HUBER
ST Employee

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 'Accept as Solution' on the reply which solved your issue or answered your question.
TSens.1
Associate II

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

Hello @TSens.1​ ,

Thanks for the information ;)

Best regards,

Kevin

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