2014-01-16 04:56 PM
i use fatfs with sdio
but i have problem with this SD_Init(); return 0 good disk_initialize(0); return 0 good disk_status(0) ; return 2 error disk_read(0,inbuf,0,1); return 3 error2014-01-16 05:13 PM
Looks to be throwing a not ready error, have you set up the pin for the Card Detect (CD) input that is tested by SD_Detect().
Presumably you have the source, and could track this down?2014-01-17 01:49 AM
Hi
Silly question.... Is the SD card formatted (FAT16 or FAT32)?2014-01-17 06:13 AM
SD_Detect(); return 1 error
uint8_t SD_Detect(void) { __IO uint8_t status = SD_PRESENT; /*!< Check GPIO to detect SD */ if (GPIO_ReadInputDataBit(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) != Bit_RESET) { status = SD_NOT_PRESENT; } return 0; // i modified this to return 0 } now SD_Detect(); return 0 good SD_Init(); return 0 good disk_initialize(0); return 0 good disk_status(0) ; return 2 error disk_read(0,inbuf,0,1); return 3 error2014-01-17 07:17 AM
Then you'll need to do some debugging of your code, and hardware attachment. I have nothing to work with here.
Validate that your SDIO code is functioning outside of FatFs properly.2014-01-17 08:54 AM
2014-01-17 09:40 AM
thank you clive1 no fatfs work with me my mistake i make SD_Detect returnt with zero
but i make it return with 1 no it work thank you. uint8_t SD_Detect(void) { __IO uint8_t status = SD_PRESENT; return 1; }