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.

CC2640R2F: Prevent overwriting SNV memory

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640

Hi Team,

My customer is using the SNV interface that writes data into the flash dedicated location of 0x0001D000 to 0x0001E000 of the CC2640R2F. Only one SNV 4k page is allocated. 

During flash updates, there is a lot of calibration data that is usually overwritten when a new firmware version loads. Is there a linker flag or memory configuration flag that generates the application hex file so that it will not load any data into this flash memory section? Perhaps some type of 'NO_LOAD" flag so that a specific address of memory is not written into during programming?

Thanks in advance for your help.

Thanks,
Mitchell

  • Hi Mitchell,

    It is possible to exclude sections using the HEX Utility. For debugging, you will need download this HEX file and then load the symbols of the project.

    Maybe there is a linker option that could simplify things. Let me discuss this with the tools team and I'll get back to you.

    Best regards,

    David
  • Hi David,

    Thank you for the help on this. Do you have any update on a linker option?

    Regards,
    Mitchell
  • Hi Mitchell,

     After discussing this internally, there isn't a way to do that within the linker file. There is a NOLOAD type that it can be used, but it is not what your are looking:

    A NOLOAD section differs from a normal output section in one respect: the section's contents,

    relocation information, and line number information are not placed in the output module. The linker

    allocates space for the section, and it appears in the memory map listing

    For more information you can look in here http://processors.wiki.ti.com/index.php/Linker_Special_Section_Types or in the ARM Assembly Language Tools User's Guide.

    Also, they pointed out another way to prevent any flash programming from overwriting certain areas of the memory.

    In CCS, > Project Properties > Debug > Flash Settings, you can set what is written and what is excluded from being written during a program load.

      Hopefully this helps.

        David

  • Hi David,

    Thanks for the help.  I have attached the dialog in CCS 8 defining flash areas to specify no-load Flash memory areas that you mentioned above.

    We are having a tough time mapping these "sector numbers" in this IDE dialog to flash memory addresses of the CC2640. We are using default memory configurations concerning stack and application space.  Perhaps this is an abstraction as CCS supports so many different TI processors and their memory maps.

    According to the TI CC2640 documentation, the flash memory spans from bus address 0x0000 0000 to 0x0001 FFFF where the SNV is 0x0001 D000 to 0x0001 E000.  

    Question is what memory address does the "sector 0" of this IDE dialog start at in the CC2640 memory map?  

    Also, how big is each "sector" in bytes? Is a "sector" is equivalent to a single 4096 byte flash page?

    Thanks,

    Mitchell

  • Hi Mitchell,

    What situations does the SNV get's written? If your programming using SmartRF Flash Programmer the SNV will get erased if you select Erase and Program. At debug it will get erased. However, there is an option to load symbols only. I have done this using IAR.

    -kel