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.

CCSv5.2: MSP430 Erasing information memory although "Erase main memory only" is checked

Other Parts Discussed in Thread: MSP430F2272, MSP430F2013

Hi, I am programming  a msp430f2272 with an Olimex MSP430-JTAG-ISO.

The IDE is CCSv5.2. Everytime I am debugging the processor, the "information memory"

part of the flash is beeing erased. Who has an idea?

Best regards,

Markus

  • Markus Mehlan said:
    Who has an idea?

    Whether info memory is erased or just the main flash, depends on teh code snippet that is injected into the MSP during programming.

    This code is part of the msp430.dll/FET combo. It is possible that there is a bug in the Olimex version of the two, that uses the same code whether the IDE requests full or main only erase.

  • In addition, to rule out simply a tools issue with the memory view and to determine if INFO memory has really been erased, it would be good to read the info memory into a variable in the code instead of just using the memory view, or to toggle an LED if the INFO memory at the location matches the expected value you wrote in before the suspected erasure. This would be a way to confirm if INFO memory is actually being erased or if the tool is just unable to read/display that area.

    But Jens-Michael is right, it might be the tool you are using, which unfortunately I'm not very familiar with.

  • Using CCS 5.2.0.00069, an Olimex MSP430-JTAG-TINY with Olimex.dll v1.0.4.2 I tried different options with a MSP430F2013 device connected via SpyByWire:

    1) With "Erase main memory only" selected, as expected the calibration data in Information Segment A and some user data in Information Segment D were preserved.

    2) With "Erase main and information memory" selected, as expected the calibration data in Information Segment A was preserved, and some user data in Information Segment D was erased.

    3)  With "Erase main, information and protected information memory" selected, as  expected the calibration data in Information Segment A and some user data in Information Segment D were erased.

    Therefore, with the MSP430F2013 the Erase Options in CCS 5.2 and the  Olimex MSP430-JTAG-TINY work as expected (I don't have a MSP430F2272 to try).

    I used the Olimex MSP430 Programmer Version 1.3.0.3 which came with the Olimex MSP430-JTAG-TINY to:

    a) Save the contents of the Information Memory before the test.

    b) Read the contents of the Information Memory after each test to check which Segments had been erased.

    c) Restore the calibration data in Information Segment A at the end of the tests.

    Can you also read the Information Memory using the Olimex MSP430 Programmer to see if the Information Memory has actually been erased?

  • If I use the Olimex MSP Programmer, everything works as expected. I can skip the data memory and my data in the "information memory" keeps untouched.

    Only the "Quick & easy"-Button is buggy. It erases the data memory although I haven't checked the controls. My main problem is the debugging with CCS5 as I wrote before.

  • Now I have got a TI MSP-FET430UIF and I get the same problems as with the Olimex. The "information memory" is erased

    and overwritten although i have checked "erase main memory only". Could the memory map respectively the renaming of the sections INFOB-INFOD be a cause

    of the trouble?

    Here is my memory map:

    ******************************************************************************
                      MSP430 Linker PC v4.1.0                      
    ******************************************************************************
    >> Linked Mon Jul 09 10:36:18 2012

    OUTPUT FILE NAME:   <amb8426-rs1-dbg.out>
    ENTRY POINT SYMBOL: "_c_int00"  address: 0000ae12


    MEMORY CONFIGURATION

             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      SFR                   00000000   00000010  00000000  00000010  RWIX
      PERIPHERALS_8BIT      00000010   000000f0  00000000  000000f0  RWIX
      PERIPHERALS_16BIT     00000100   00000100  00000000  00000100  RWIX
      RAM                   00000200   00000400  00000284  0000017c  RWIX
      FACTORY_SETTINGS      00001000   00000040  00000000  00000040  RWIX
      USER_SETTINGS         00001040   00000080  0000007e  00000002  RWIX
      INFOA                 000010c0   00000040  00000000  00000040  RWIX
      FLASH                 00008000   00007a00  00003196  0000486a  RWIX
      ASL                   0000fa00   00000400  00000362  0000009e  RWIX
      PRODUCT_DESCRIPTOR    0000ff80   00000060  00000060  00000000  RWIX
      INT00                 0000ffe0   00000002  00000000  00000002  RWIX
      INT01                 0000ffe2   00000002  00000000  00000002  RWIX
      INT02                 0000ffe4   00000002  00000002  00000000  RWIX
      INT03                 0000ffe6   00000002  00000000  00000002  RWIX
      INT04                 0000ffe8   00000002  00000000  00000002  RWIX
      INT05                 0000ffea   00000002  00000002  00000000  RWIX
      INT06                 0000ffec   00000002  00000000  00000002  RWIX
      INT07                 0000ffee   00000002  00000002  00000000  RWIX
      INT08                 0000fff0   00000002  00000002  00000000  RWIX
      INT09                 0000fff2   00000002  00000002  00000000  RWIX
      INT10                 0000fff4   00000002  00000000  00000002  RWIX
      INT11                 0000fff6   00000002  00000000  00000002  RWIX
      INT12                 0000fff8   00000002  00000000  00000002  RWIX
      INT13                 0000fffa   00000002  00000002  00000000  RWIX
      INT14                 0000fffc   00000002  00000000  00000002  RWIX
      RESET                 0000fffe   00000002  00000002  00000000  RWIX

    ...

  • Markus Mehlan said:
    Could the memory map respectively the renaming of the sections INFOB-INFOD be a cause of the trouble?

    I renamed the sections in my MSP430F2013 example to be same names as in your linker map:

    ******************************************************************************
    MSP430 Linker PC v4.1.1
    ******************************************************************************
    >> Linked Tue Jul 10 22:49:39 2012

    OUTPUT FILE NAME: <delay_cycles_wdt.out>
    ENTRY POINT SYMBOL: "_c_int00" address: 0000f914


    MEMORY CONFIGURATION

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    SFR 00000000 00000010 00000000 00000010 RWIX
    PERIPHERALS_8BIT 00000010 000000f0 00000000 000000f0 RWIX
    PERIPHERALS_16BIT 00000100 00000100 00000000 00000100 RWIX
    RAM 00000200 00000080 00000032 0000004e RWIX
    FACTORY_SETTINGS 00001000 00000040 00000000 00000040 RWIX
    USER_SETTINGS 00001040 00000080 00000000 00000080 RWIX
    INFOA 000010c0 00000040 00000000 00000040 RWIX
      FLASH 0000f800 000007e0 00000146 0000069a RWIX

    With CCS 5.2.0.00069, an Olimex MSP430-JTAG-TINY with Olimex.dll v1.0.4.2 the information memory was still preserved with "Erase main memory only" selected. i.e. the names used in the linker map don't appear to be the cause of your problem.

  • Markus Mehlan said:
    Now I have got a TI MSP-FET430UIF and I get the same problems as with the Olimex. The "information memory" is erased and overwritten although i have checked "erase main memory only"

    If you can generate a Debug Server log and post it here, it might help (Go to help-> CCS Support, enable the debug server log, perform the load, zip the log and post it here). The Debug Server log should record:

    a) The "MSP430DownloadOptions" property which should match the "Erase main memory only" option set in the project properties.

    b) The calls CCS is making to MSP430_Erase and MSP430_Memory, which indicates which areas of flash is being erased and programmed.

    Hopefully that should highlight if the problem is in CCS or the MSP-FET430UIF.

     

  • I have attached my "Debug Server log" 2275.msp430.log

    I hope someone can recognize if the debugger or ccs5 makes the trouble.

  • Looking at your debug server log shows CCS writing to the information memory with:

    0x00000E88 112871 3 MSP430 MSP C: MSP430_Memory( 0x1040, 0x37160BA0, 0x7E, 0 )
    0x00000E88 113152 3 MSP430 MSP R: MSP430_Memory( 0x1040, 0x37160BA0, 0x7E, 0 ) = 0

    This ties in with the USER_SETTINGS in your linker memory map.

    Is your intention to either:

    1) When downloading the program to initialize the USER_SETTINGS of information flash with "defaults" contained in your program at the USER_SETTINGS address, but leave the rest of information memory unchanged?

    In which case try setting the CCS Erase Options to "Replace written memory locations, retain unwritten memory locations".

    2)  When downloading the program to leave information memory completely unchanged, but have some way of writing "default" user settings to information memory upon command?

     In which case change the program not to place the default user settings directly in information memory.

    3) Or something else? 

  • Chester Gillon said:

    Is your intention to either:

    1) When downloading the program to initialize the USER_SETTINGS of information flash with "defaults" contained in your program at the USER_SETTINGS address, but leave the rest of information memory unchanged?

    In which case try setting the CCS Erase Options to "Replace written memory locations, retain unwritten memory locations".

    2)  When downloading the program to leave information memory completely unchanged, but have some way of writing "default" user settings to information memory upon command?

     In which case change the program not to place the default user settings directly in information memory.

    3) Or something else? 

    We are developing a wireless solution. Each module contains some data in the "information memory" like serial number, calibration data, and so on. During an initial operation these parameters are written by an external application. When I am debugging one of the modules, the parameters in the "information memory" should keep untouched. So I need a solution for writing the default values and a solution for debugging.

    Now I can prevent the overwriting of the "information memory" by choosing "Load symbols" in the debug configuration. But it is no solution for updating the main memory only (e.g. performing a firmware upgrade). Then I have to use an external tool like "Lite FET-Pro430" from Elprotronic where I can choose the sectors.

    Best regards,

    Markus

**Attention** This is a public forum