Hi,
I am facing some problem using the mmcsd_fatfs sample file to access the mmcsd card on my board.
My board uses the MMCSD port 1 instead of port 0.
BIOSPSP: http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/index.html
I tried changing the following. It is able to detect the card but fail at the f_mkfs function. Can anyone help?
Thanks
#define PSP_MMCSD_SAMPLE_DRIVE 1U
/* This is the driver number associated with MMCSD drive */
#define MMC_INST_ID 1U <--- change from 0U to 1U
/*Instance no of mmcsd */
/*#define NUM_SECTORS 6144U*/
#define NUM_SECTORS 6144U
/*No of Bytes in drive to format */
#define FILESYS_BYTE_COUNT (NUM_SECTORS * 512U)
/*No of sectors read or written */
#define WRITE_SECTORS 10
/* No of bytes to write or read */
#define BYTE_COUNT (WRITE_SECTORS * 512U)
#define INCLUDE_MEDIA_WP_TEST 0
/*This will enable the WP test on the media. */
#define INCLUDE_ACTUAL_CARD_FREQ_IOCTL 0
/*This will actually alter the freq of the card.
Please note that the further operation of the card takes place at this freq*/
#define BUFFER_ALINED_CACHE_LENGTH
/* Enable this if user want to pass cache length aligned buffer, In polled mode
buffer must be 4 byte aligned */
#define DATA_ALIGN 128
#define MMCSD_SAMPLE_PRINT printf
.
.
.
.
.
/* Format the Nand drive */
retVal = f_mkfs(PSP_MMCSD_SAMPLE_DRIVE, 1, FILESYS_BYTE_COUNT); <--- fail at this part
if(retVal == 0)
{
MMCSD_SAMPLE_PRINT("MMCSD_SAMPLE: create partition successful\n");
}else {
MMCSD_SAMPLE_PRINT("MMCSD_SAMPLE: partition creation failed errno: %d\n",retVal);
}