I'm trying to use SDIO with STM32F4Discovery board and a patchboard. After I got the SD card to initialize correctly. sdcConnect returns 0. I can't get it to display the contents of the card (in a listing sort of). It returns a FS_DISKERR error code.
ChibiOS used is 2.6.0, the one bundled with ChibiStudio by default.
The microSD Card I have currently is a Class 4 Transcend 8 GB Card [SDHC].
When I try with an unbranded 1 GB microSD card, and increased the STM32_SDIO_DIV_HS to 1, it works.
But no effect with the 8 GB card, same error.
When I stepped into the code, The problem seems to appear at sdc_lld.c, line 170 where:
Code: Select all
Thread [1] (Suspended)
8 sdc_lld_wait_transaction_end() sdc_lld.c:171 0x0800269c
7 sdc_lld_read_aligned() sdc_lld.c:603 0x08002812
6 sdcRead() sdc.c:399 0x08001732
5 sdcRead() sdc.c:384 0x08001732
4 check_fs() ff.c:1986 0x080057c2
3 chk_mounted() ff.c:2059 0x080058e6
2 f_opendir() ff.c:2966 0x08006334
1 main() main.c:390 0x080002e4
and the
Code: Select all
if ((SDIO->STA & SDIO_STA_DATAEND) == 0)From my debugging, it seems that commands are sent all right, and reception is also OK, but this flag being raised is mysterious.
Any hints on how to proceed further will be greatly appreciated.
Best Regards
Abhishek.