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.

MSP430FR5959: memory gets corrupt

Part Number: MSP430FR5959
Other Parts Discussed in Thread: MSP430WARE

hello sir 

 i am using MSP430FR5959 controller and my code is running fine but after some days it stop running .. only reprogram will work . so i have read out memory using FET-pro430 it shows all zero for 0x1800 to 0x13FFF. so what will be the reason for this ? i have attached file also for faulty and original file.. 

please guide us as this is very critical issue. original_file_txt.txtfaulty_txt.txt

  • Hello Anushka,

    Do you have any routines running in your application that write to variables that are stored in FRAM?

    Are you using a bootloader in your application?

  • hello sir

    yes we are using variables that writes FRAM but it is rare condition. At noramal application runing no variable to be writen in FRAM
    and no we are not using bootloader in my application


    routine to write variables is given below


    delaration of variable

    #pragma PERSISTENT(au16_config)

    unsigned short au16_config[WDOG_LOG_IN_16BIT] =
    {
    0
    };
    #endif


    To read from FRAM (this will execute at power On )

    memcpy(&un_RegHoldingBuf.st_config.u16_slaveId, &au16_config,
    sizeof(au16_config));

    where un_RegHoldingBuf.st_config is a configuration structure size is 85 bytes


    To write FRAM (this will only execute when user wants to change some paramertes )

    memcpy(&au16_config, &un_RegHoldingBuf.st_config.u16_slaveId,
    sizeof(au16_config));


    where un_RegHoldingBuf.st_config is a configuration structure size is 85 bytes
    /******************************************************************

    and pin no 21(TEST/SBWTCK) and pin no 22(RST/NMI/SBWTDIO) pin is open at hardware side no passive componets to be connected.
    this pin is connect directly to connectors for programing purpose

  • Clearly your program has a problem where at some point it writes over the FRAM leaving few traces behind. I suggest you enable the MPU to protect your code and the when the write violation happens, you can see what the system state was at that time.

  • Hi Anushka,

    I haven’t heard from you for a couple of days now, so I’m assuming you were able to resolve your issue.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

  • how to enable MPU to protect my code. 

  • And how to check and verify that this problem is been solved. because it is rare condition. how to enable MPU to protect code memory for corruption. please explain this with example.  

  • dear sir 

    please explain in details with examples about MPU and its usage to my existing code. 

  • Hello Anushka,

    There are a couple of example projects showing how use the MPU on the MSP430FR5959 in the TI Resource explorer (TIREX).  These will show you how to "trap" for errors so you know if and when they might happen.

    You can find TIREX either on the web or, if you are using code composer studio it is located in the menu Help>Getting Started.

    Once you have the TIREX open, navigate to the MSP430WARE_3.80.xx.xx directory, then Devices>MSP430FR5xx6xx>MSP430FR5959>Peripheral Examples>Register Level.  There are two demos, msp430fr59XX_mpu_01.c and *_02.c.

    Also, you can refer to MSP430FR58xx family user's guide, SLAU367, section 9.1 for detailed information regarding the MPU



**Attention** This is a public forum