This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

請教如何一直下載更新CC3200 flash裡面的file?

Other Parts Discussed in Thread: CC3200, CC3200SDK

Hi TI:

我利用網路上範例(e2echina.ti.com/.../115081)來下載file到CC3200上

當我第一次下載file可以成功,但是在呼叫一次去下載file卻會在寫入時候error(-15),請問要怎麼解這個問題?

while(1)
{
len = HTTPCli_readResponseBody(cli, (char *)g_buff, sizeof(g_buff) - 1, &moreFlag);
if(len < 0)
{
// Close file without saving
lRetVal = sl_FsClose(fileHandle, 0, (unsigned char*) "A", 1);
return lRetVal;
}

lRetVal = sl_FsWrite(fileHandle, bytesReceived,(unsigned char *)g_buff, len);

if(lRetVal < len)
{
UART_PRINT("Failed during writing the file, Error-code: %d\r\n", \
FILE_WRITE_ERROR);
// Close file without saving
lRetVal = sl_FsClose(fileHandle, 0, (unsigned char*) "A", 1);
return lRetVal;
}

....

}