2012-02-29 01:19 PM
2013-03-15 10:53 AM
Has anyone gotten this to work? I pulled down Clive's FATFS-DBG project and that gives exactly the same behavior at CMD55.
2013-03-15 12:10 PM
Has anyone gotten this to work? I pulled down Clive's FATFS-DBG project and that gives exactly the same behavior at CMD55.
While it's possible I messed up something in the release, I do have SDIO running on multiple platforms, a custom F2/F4 board, and the STM32F4-Discovery board. The pull ups are critical to the interface, and I have very short and even wiring (about 1'' or 30 mm at most), the PCB implementation is perhaps half that. I am using MicroSD (mainly SDHC, some SDXC) cards, and have used 128 MB to 64 GB cards. Other things that are important are the correct HSE_VALUE, and a 48 MHz setting for the SDIO. The 48 MHz is important for USB interfacing, but I have over clocked this, and it can go faster. You'll need to state very clearly what hardware, sockets, cards, etc you're using, and how it's all wired up.
2013-03-15 02:14 PM
I hate to look stupid, but I am admitting it here.
Without thinking or checking I used the pin assignments for the SD card socket listed in the stm32f4_discovery_sdio_sd.c file. They are for a Micro SD card and I'm using a full size card which has a different pinout. I shuffled wires around on my prototype and it ''just works''. My wires are 1 to 1.5 inches long. I do have caps on the power pins of the socket also. -Bill P.S. Clive, the help you provide this community is amazing!2013-03-15 04:13 PM
Thanks, I'm glad you managed to pin point what was going on.
2013-03-23 11:31 AM
I have a new problem with the SDIO example code.
stm32f4_discovery_sdio_sd.h defines: static uint8_t SDSTATUS_Tab[16]; stm32f4_discovery_sdio_sd.c has this function: SD_Error SD_SendSDStatus(uint32_t *psdstatus) The function is called with: errorstatus = SD_SendSDStatus((uint32_t *)SDSTATUS_Tab); Inside the function is a doubly nested loop that fills in the table: *(psdstatus + count) = SDIO_ReadData(); That overwrites the space allocated for the status buffer. The code writes 64 bytes as might be expected since it thinks the entries are uint32. Has anyone else run into this? -Bill2013-03-23 06:06 PM
Not sure if it iterates around the 8 loop, or the latter while loop, but yes it doesn't look quite right.
2013-03-25 02:17 PM
Definitely problematic, but does anyone call SD_GetCardStatus() ?