STM32F407 SDIO/SDCard
I am trying to get the STM407VET to communicate to an SD Card using the SDIO interface and drivers. Code base was generated from CubeMX and Eclipse is the IDE. Debugging with Open OCD. Hardware is custom.
I have tracked my problem down to the ability to just read back a response from the card.
Starting with the HAL_SD_INIT function and digging down, I get to the HAL_SD_InitCard() and then to __HAL_SD_ENAB:E where the interface comes up and I have a 400KHz clock. After a delay I then proceed to SD_PowerOn where I send the first command to the SD card.
I am using a 1 bit interface. On the Oscope I see that the Command goes out on the CMD line, the clock is 400KHz and a response comes back on the DAT0 line as expected. However I get an error 0X04 back from the SDMMC_GetCmdResp7 call which is a response timeout. On the Oscope I see that the response is coming back about 30usec from the end of the command.
At this point I don't understand why I can't at least get to the point where the responses can be processed.
The signal quality and the timing all look good. There is plenty of setup and hold time and no ringing on the signals. At 400KHz the clock speed is very low. The response appears to complete within 140usec.
Any advice you can offer to get me over this hump so that I can even begin to debug the FatFS would be helpful.
Thanks
