Our application is utilizing a FTP client to download user file updates when we want to update our system. To do this, we connect the CC3100 to a WLAN, and then connect to a FTP server and download each file that needs to be updated. The FTP client will read 512 bytes at a time from the FTP data socket, and write the contents to a file in the CC3100's file system. We have noticed that occasionally it looks like some of the file writes aren't completing, because after each write to the file, we read the same location in the file back to verify that the contents were successfully written. Every time we see a failure, it looks like the last 8 bytes of the write aren't completing, because those 8 bytes are always 0xFF. We have captured the SPI traffic between the host and CC3100, and have verified that the sl_FsWrite() command contains the correct data, so we think the write at least looks successful. I have attached the sl_FsWrite() and subsequent sl_FsRead() transfer to show all SPI data leading up to the failure. It should be noted that whenever the failure occurs, even though we attempt to read 512 bytes from the socket, we get back a much smaller amount of data (40 bytes in this case). There are other cases where we get back a smaller amount of data and the file write works, so it doesn't fail every time that happens.
Any idea what could be happening?