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: File Operations SDK sample example

Part Number: CC3200
Other Parts Discussed in Thread: UNIFLASH

Hi All,

I need to store the SSID and password and some brief information to be stored in serial flash of cc3200. I tried use and run the sample example

of file operation given in SDK.. but it was unsuccessful resulted in glowing red LED. It could not create a user file so it comes out of the WriteFileToDevice() function.

  1. What should I do to write/read to/from the serial flash....Do I need to format/erase the entire flash? and if I do that will the device loose any inherent important things?
  2. How to erase the previous contents on flash...do I need use uniflash or just by using some APIs will do the same thing . Please anyone know the procedure please share.

Thanks.

  • Hi

    1) You don't need to erase or format the sflash every time before writing.
    2) There is an API to delete a file: sl_FsDel. If you have been wrting many files to the device and you have lost track of them you may want to format since the sflash could be full or fragmented.

    -Aaron
  • Hi Aaron,

    I haven't written anything directly to the serial flash yet, so to use the API sl_FsDel (unsigned char * pFileName, unsigned long Token ),I should have known the file name and token to delete it, which I don't know.

    And if I use another API to get the file information sl_FsGetInfo (unsigned char * pFileName,
                                                                                                          unsigned long Token,
                                                                                                          SlFsFileInfo_t * pFsFileInfo 
                                                                                                          );
    I am getting an error that Token and SlFsFileInfo_t* are undefined though I 've included the file ' fs.h'.
    What parameters should I pass to these APIs like sl_FsDel, sl_FsGetInfo as a token ?

    Is there any other sample examples where these APIs are used and does any important info get erased if I format the entire flash as a last option?

    Thanks and Regards,
    Techinspired

  • You wont be able to format the flash through API, and you wont want to do so externally unless you are completely reprogramming
    -Aaron
  • Hi Aaron

    Thanks for your reply!

    If we can not format the serial flash through API, can we do it by using Uniflash - format/erase option?

    Best Regards,
    Techinspired