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.

CCS/MSP-EXP430FR2433: MSP430 Persistent Array not writable by software

Part Number: MSP-EXP430FR2433

Tool/software: Code Composer Studio

I am having some trouble with MSP430 FRAM persistence in CCS 10. I created the following in a new CCS project for the MSP-EXP430FR2433. What I expect to see is on every reset of the board, the LED0/1 combination on the board will change, per my persistent table. However, it does not. The LEDs never light up. In the debugger, while watching pData in the Memory Browser, I see that writes to pData[k] never update the values. I can however manually change the values in the Memory Browser, and these changes are in fact persistent. I have not edited the .cmd file from the default, so .TI.persistent is defined.

#include <msp430.h>

#define P_DAT_LEN (8)
#pragma PERSISTENT(pData)
unsigned char pData[P_DAT_LEN] = {0,1,2,3,3,2,1,0};

int main(void)
{
    unsigned char x;
    int k;
    WDTCTL = WDTPW | WDTHOLD;    // stop watchdog timer

    // configure LEDs
    P1DIR  |=  0x03;
    P1SEL0 &= ~0x03;
    P1SEL1 &= ~0x03;

    PM5CTL0 &= ~LOCKLPM5;

    // clear the LEDs
    P1OUT &= ~0x03;

    // save off the first value in the sequence to "x"
    x = pData[0];

    // rotate the vector left by 1 position
    for(k=0; k<(P_DAT_LEN-1); k++)
    {
        pData[k] = pData[k+1];
    }
    pData[P_DAT_LEN-1] = x;

    // use the value saved in "x" to light the LEDs
    P1OUT |= x;

    // loop forever
    while(1);

    
    return 0;
}

**Attention** This is a public forum