2022-10-22 03:54 AM
I have a strange issue. I used the SDIO Interface on a F2 and a F429 without issues. But on the first usage with the F446 i run into a strange problem.
With the Logic Analyzer i am observing the communication.
Card Init:
Requesting Card Type, CSD and CID works well over the CLK and CMD Line.
While Switching to the 4Bit Mode i'm getting wrong feedback via the Data line. In detail there is a problem with the FindSCR function still in 1Bit Mode. SDMMC_CmdSendSCR is send out correctly. The DPSM is reacting correct to the Data0 lines response. Flags a set correct for 2 32Bit words but SDIO_ReadFIFO() will only give zero as feedback.
Log Sending SCR:
Response:
static uint32_t SD_FindSCR(SD_HandleTypeDef *hsd, uint32_t *pSCR)
{
....
if(__HAL_SD_GET_FLAG(hsd, SDIO_FLAG_RXDAVL))
{
uint32_t data = SDIO_ReadFIFO(hsd->Instance);
printf("copy tmp[%u] = %u\n\r", index,data);
tempscr[index] =data;
index++;
}
else if(!__HAL_SD_GET_FLAG(hsd, SDIO_FLAG_RXACT))
{
printf("SD_FindSCR SDIO_FLAG_RXACT %u", HAL_GetTick());
break;
}
.....
}
Used is the CubeMx Lib F4 V1.27.0
All Data[0:3] and CMD line have 10k Pullups and a serial resistance of 33Ohm. On the logic analyzer signals a OK to the pins of the MCU. In my opinion is look like some "internal" stuff.
Also what should be the EGDE for SDIO CLockin for Dephasing? RISING or FALLING. I did't get the point what is the advantage inside the MCU. Because transitions according the Physical Layer of the SDIO is not affected.
As anybody some hints? After some days of debugging i'm missing some ideas and what still can be wrong?
Solved! Go to Solution.
2022-10-25 01:19 AM
Thank you for your response. I finally got it to work and it was a really stupid error.
I used port C for debugging leds and the SDIO interface.
Finally no issue at all with the lib.
2022-10-22 06:38 AM
i had similar problems ... now running fine. just some to try:
i set sdmmc clk to 100MHz. + div 1 :
and meduim or high speed on gpio: (to reduce reflections)
2022-10-25 01:19 AM
Thank you for your response. I finally got it to work and it was a really stupid error.
I used port C for debugging leds and the SDIO interface.
Finally no issue at all with the lib.