SDIO fails on waiting for transfer state?
Posted: Sun Jan 06, 2013 11:34 pm
I am currently trying to get SDIO running on STM32F4 Discovery.
I have connected the SD conector with some wires (no pull-ups or series resistors) and cut the PC10/PC12 traces to the DAC. The DAC is now connected to other pins on Port B and still works fine
I am trying to use SDIO with FatFS. The sdcConnect-Function works. I have a 2GB microSD-Card that gets detected with correct capacity (SDCD1 capacity value is 3862528 blocks, cardmode is 1). With another 8GB SDHC cart the sdcConnect fails.
When FatFS tries to read the first block from SD-Card i get an error from "sdc_lld_send_cmd_short_crc" (sdc.c). Call sequence is like this:
f_getfree (ff.c) -> chk_mounted (ff.c) -> check_fs (ff.c) -> disk_read (fatfs_diskio.c) -> sdcRead (sdc.c) -> sdc_lld_read (sdc_lld.c) -> sdc_lld_read_aligned (sdc_lld.c) -> _sdc_wait_for_transfer_state (sdc.c) -> sdc_lld_send_cmd_short_crc (sdc_lld.c)
Here is the call to sdc_lld_send_cmd_short_crc:
"sdcp->rca" is "3861120288"
Don't really know what the rca value represents though.
Inside the "sdc_lld_send_cmd_short_crc" function it checks for errors and then calls the "sdc_lld_collect_errors function". The STA value is 0x4 - so this means the SDIO_STA_CTIMEOUT Bit is set. The RESP1 value is 2336.
If i disable the check for Timeout then it is going to fail in "sdc_lld_wait_transaction_end" (after setting up the DMA transfer) because the SDIO_STA_DATAEND bit is not set in STA (STA value reads 0x8 at this point - this mean Data timeout).
Any chance someone understands what is going on and can clear this up?
I have connected the SD conector with some wires (no pull-ups or series resistors) and cut the PC10/PC12 traces to the DAC. The DAC is now connected to other pins on Port B and still works fine
I am trying to use SDIO with FatFS. The sdcConnect-Function works. I have a 2GB microSD-Card that gets detected with correct capacity (SDCD1 capacity value is 3862528 blocks, cardmode is 1). With another 8GB SDHC cart the sdcConnect fails.
When FatFS tries to read the first block from SD-Card i get an error from "sdc_lld_send_cmd_short_crc" (sdc.c). Call sequence is like this:
f_getfree (ff.c) -> chk_mounted (ff.c) -> check_fs (ff.c) -> disk_read (fatfs_diskio.c) -> sdcRead (sdc.c) -> sdc_lld_read (sdc_lld.c) -> sdc_lld_read_aligned (sdc_lld.c) -> _sdc_wait_for_transfer_state (sdc.c) -> sdc_lld_send_cmd_short_crc (sdc_lld.c)
Here is the call to sdc_lld_send_cmd_short_crc:
Code: Select all
sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_SEND_STATUS,sdcp->rca, resp)"sdcp->rca" is "3861120288"
Don't really know what the rca value represents though.
Inside the "sdc_lld_send_cmd_short_crc" function it checks for errors and then calls the "sdc_lld_collect_errors function". The STA value is 0x4 - so this means the SDIO_STA_CTIMEOUT Bit is set. The RESP1 value is 2336.
If i disable the check for Timeout then it is going to fail in "sdc_lld_wait_transaction_end" (after setting up the DMA transfer) because the SDIO_STA_DATAEND bit is not set in STA (STA value reads 0x8 at this point - this mean Data timeout).
Any chance someone understands what is going on and can clear this up?