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.

RTOS/CC3220SF-LAUNCHXL: cc3220sf

Part Number: CC3220SF-LAUNCHXL


Tool/software: TI-RTOS

Hi,

i get different data after write to file.

i write to file with offset and read

what is the problem?

unsigned char Buf1[200];
unsigned char Buf2[200];
unsigned char Buf3[200];

memset( Buf1 , 0xAA, 200);
Buf1[0] = 0x66;

DeviceFileHandle = sl_FsOpen( (unsigned char *)DeviceFileName ,
SL_FS_WRITE | SL_FS_CREATE_MAX_SIZE( 200 ) ,
0 );
if( DeviceFileHandle < 0 ){
DeviceFileHandle = sl_FsOpen( (unsigned char *)DeviceFileName ,
SL_FS_CREATE | SL_FS_WRITE | SL_FS_CREATE_MAX_SIZE( 200 ) ,
0 );

if( DeviceFileHandle < 0 )while( 1 );
}

RetVal = sl_FsWrite( DeviceFileHandle, 10, &Buf1[10], 10 );
RetVal = sl_FsWrite( DeviceFileHandle, 0 , &Buf1[0] , 1 );
RetVal = sl_FsClose( DeviceFileHandle, 0, 0, 0 );


if( sl_FsOpen( (unsigned char *)DeviceFileName ,
SL_FS_READ ,
0 ) < 0 )while( 1 );

RetVal = sl_FsRead( DeviceFileHandle, 0 , Buf2 , 200 );

RetVal = sl_FsClose( DeviceFileHandle, 0, 0, 0 );