2022-10-06 06:54 PM
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,
Solved! Go to Solution.
2022-10-10 04:45 PM
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,
2022-10-06 11:50 PM
Sorry,
This issue has been resolved.
2022-10-07 08:24 AM
Hello @TSens.1 ,
Please can you explain how you solved your issue?
This can maybe help someone else,
Best Regards,
Kevin
2022-10-10 04:45 PM
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,
2022-10-11 01:41 AM
Hello @TSens.1 ,
Thanks for the information ;)
Best regards,
Kevin