AnsweredAssumed Answered

stm32f7 SDIO not initializing

Question asked by Mathieu Frohlich on Oct 3, 2017
Latest reply on Dec 29, 2017 by Abhishek Kumar

Hi,

 

I'm having trouble getting SDIO to work on a STM32F767 based project. I used the exemple provided in the CubeMX repo to try a dummy read/write, but the initialization process stall in the SD_PowerON() function.

After some debugging, i found out that I get random error messages :

SDMMC_ERROR_CMD_RSP_TIMEOUT

SDMMC_ERROR_COM_CRC_FAILED

SDMMC_ERROR_UNSUPPORTED_FEATURE

 

I tried dozens of clock configurations with no success, so I went on to inspect the CMD pin during initialization. Clearly there's a problem, but I have no idea what could be the reason.

 

Here is the whole frame from the start of the initialization process until it returns to the error. We can clearly see that the CMD function from the host is clean (at the beginning at least). But the SD Card as trouble bringing the line down when it answer. There is some sort of capacitive effect going on ...

pic1

 

And here I zoomed to the CMD55 frame, I saw a screenshot of it in another post and apparently the line should be brought low by the card immediatly after the end of the CMD, but I can see that it doesn't, not until after the first high state.

pic2

 

(Note that the yellow channel is totally unrelated, and I didn't probe the clock because I need another pair of hand, if it would be helpful I can try !).

 

It's only a guess but it looks like a hardware problem ... Could it be a bad positioning of the pull up resistor ? Or some sort of EMC problem ? Grounding ? Note that I have 3 prototypes of the board, I tried on every board and the problem is always the same.

 

If you need some code snippet I'll be happy to provide it !

 

Thanks a lot for your help !

 

Cheers,

Mathieu

Outcomes