I'm using the SimpleLink sl_FsOpen function on a CC3200 device to create and write to SFlash files, as demonstrated in the file operations example project, but am getting an error when writing beyond ~36400 bytes. The device has a 16MB Flash chip connected.
I'm using a call like this:
lRetVal = sl_FsOpen((_u8 *)pFile->deviceFileName,
FS_MODE_OPEN_CREATE(pFile->maxFileSize, _FS_FILE_OPEN_FLAG_COMMIT|_FS_FILE_PUBLIC_WRITE|_FS_FILE_PUBLIC_READ),
(_u32 *)&pFile->ulToken,
(_i32 *)&pFile->dataFileHandle);
where the maxFileSize argument is 2000x3584 (I read in another thread that the file size should be a multiple of 3584) which works out to about 7MB, but I've also tried it with the maxFileSize = 20x3584 (~70kB). In either case, if I try to write to the file using sl_FsWrite past ~36400 bytes I get error -15 (SL_FS_ERR_OFFSET_OUT_OF_RANGE). What could be causing this?