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.

CC3220SF: Yet Another Question on FS Max File Size

Part Number: CC3220SF

Is TI planning on making an application accessible macro anytime soon that allows the checking/setting of file size pre-file system control API calls? Based on actual SPI flash memory size would be even better.  I will have to create a few functions/macros to do this for the time being, but it would be good if SimpleLink could support and manage this natively.

section 6.6.1 of document SWAS035B
... The maximum file size is 1MB...

Section 7.3 of document SWRU455E
... File size is unlimited. ...

Based off reading the code for sl_FsOpen() in SimpleLink version 2.40.02.00,
It looks like the actual max attempted settable size is:
0x1FFFF * 0x100 = 0x1FFFF00
based off of the one application accesible sizing macro SL_FS_CREATE_MAX_SIZE()

However, there is a limit in sl_FsOpen() that will return a failure code if the size exceeds 0xFF0000.
So, 16 MBYtes is the real limit, which is the largest size flash that the CC3220 supports according to
documentation...I believe.

So, I assume the extra 0x100FF00 space which you could try to set from the application level is
for future expansion? It would be nice if there was a built in macro to calculate size in bytes
instead of creating a macro at the app level that multiplies by 256/0x100 and checks the 0xFF0000 limit. This is decimal ~16 MBytes, which wouldn't actually work for my application at the flash control layer as I have a 4 MByte flash IC.  Just a suggestion, it seems like the code and documentation could do with a little clean up to make it more robust and user friendly.

  • Hi Trevor,

    The max file size is constrained by the size of the external serial flash. It is unlimited up to the free space on the serial flash. We will need to correct the statement in the datasheet to reflect this.
    The macro SL_FS_CREATE_MAX_SIZE is used for file size conversions from bytes to blocks. The limit in sl_FsOpen() is indeed there as a sanity check as 0xFF0000 is the max size of the external flash.
    How did you get 0x1FFFF00? I'm unsure how you got 0x1FFFF in the first place.

    Regards,
    Michael
  • 0x1FFFF is the bit mack used to set the number of blocks through the SL_FS_CREATE_MAX_SIZE() macro. 0x1FFFF00 is the max size in bytes that may be set 'under the hood' of the sl_FsOpen() function. Search for the following in fs.c:
    MaxSizeInBytes = (ModeAndMaxSize & SL_FS_OPEN_MAXSIZE_BIT_MASK) * 256;