Hello-
I'm attempting to download a file from a server and save it on a SD card attached to the cc3200. I've found that the SD card driver library freezes when you write more the 2 complete blocks with a multi-sector write.
diskio.c hangs at line 625, the while loop, waiting for a multi block transfer to complete.
//
// Wait for transfer complete
//
while( !(MAP_SDHostIntStatus(SDHOST_BASE) & SDHOST_INT_TC) )
{
}
CardSendCmd(CMD_STOP_TRANS,0);
Res = RES_OK;
For example, modifying the sdhost_fatfs example code, to write files of varying sizes, a 600 byte write is works fine because fatfs creates 2 single sector writes. However, if you change the file write size from 600 to say 1400 the SD driver hangs because it cannot complete a multi-sector write, and hangs waiting for completion.
char test[600];
for (int y = 0; y < 600; ++y)
test[y] = 't';
Message("\n\n\rWriting system file...\n\r");
res = f_open(&fp,SYSFILE,FA_CREATE_ALWAYS|FA_WRITE);
if(res == FR_OK)
{
//f_write(&fp,SYSTEXT,sizeof(SYSTEXT),&Size);
f_write(&fp,test,sizeof(test),&Size);
Report("Wrote : %d Bytes",Size);
res = f_close(&fp);
}
else
{
Message("Failed to create a new file\n\r");
}
Please help me figure out how I can successfully write more than a single sector at a time using the cc3200 SDK.