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.

Example_Flash2833x_API Flash Sector allocation and SARAM configuration



I'm using Example_Flash2833x_API as a base for my program. Per description of Example_Flash2833x_API, user's code (.text) is located in Sector A of the flash.

1. If it grows close to 32K, is there a chance that it will overwrite memory location 0x33FFF8 - 0x33FFFF where security password is? I'm not planning to use code protection in my design. Is there a way to opt out accidental access to security password bits?

2. Is there a way to estimate the code size?

3. If my code is small enough, can it be placed along with flash API (currently located in sector D) into sector A to maximally utilize remaining flash for data storage?

4. I need to load a fairly large amount of data through serial port into flash. Can I assign a whole SARAM sector to one variable?. Is there a way to join four 4Kx16 SARAM sectors into one 16K to do this operation only twice per flash sector that is 32K.

  • Arsen N. said:
    1. If it grows close to 32K, is there a chance that it will overwrite memory location 0x33FFF8 - 0x33FFFF where security password is? I'm not planning to use code protection in my design. Is there a way to opt out accidental access to security password bits?

    Arsen,

    In the linker command file the memory description of Sector A is broke up such that "FLASHA" doesn't include the password locations.  The password is defined as CSM_PWL.  The linker will tell you if the .text does not fit in the memory defined as FLASHA and the build will fail. 

    i.e. the linker command file has:

    memory
    {
     
       ...
      
       FLASHA      : origin = 0x338000, length = 0x007F80     /* on-chip FLASH */
       CSM_RSVD    : origin = 0x33FF80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use.
       BEGIN       : origin = 0x33FFF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode.
       CSM_PWL     : origin = 0x33FFF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
       ...

    Arsen N. said:
    2. Is there a way to estimate the code size?

    The linker generates a file with a ".map" extension when you build the code.  This file has the code size listed.

    Arsen N. said:
    3. If my code is small enough, can it be placed along with flash API (currently located in sector D) into sector A to maximally utilize remaining flash for data storage?

    Yes.

    Arsen N. said:
    4. I need to load a fairly large amount of data through serial port into flash. Can I assign a whole SARAM sector to one variable?. Is there a way to join four 4Kx16 SARAM sectors into one 16K to do this operation only twice per flash sector that is 32K.

    You can join contiguous memory blocks into one section in the linker command file.  Also see:

    http://processors.wiki.ti.com/index.php/C28x_Compiler_-_Understanding_Linking

    Lori