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/MSP430FR6972: msp430fr6972

Part Number: MSP430FR6972
Other Parts Discussed in Thread: MSP430FR2433

Tool/software: Code Composer Studio

Hello,

I am using MSP430FR6972,

I want store my "Data in Memory Location 0x1800".

For that I am using FRAM Program.

But t is not storing in FRAM Memory Location.

(I am testing in MSP430FR2433, it is working).

Can you please check it.

void FRAMWrite(void);

unsigned char count = 0;
unsigned long *FRAM_write_ptr;
unsigned long data = 0x22222222;

#define FRAM_TEST_START 0x1840


int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;               // Stop WDT

            PJSEL0 = BIT4 | BIT5 ;                   // For LFXT
       //     PJSEL0 |= BIT6 | BIT7;                   // For LFXT

          PM5CTL0 &= ~LOCKLPM5;

             // XT1 Setup
             CSCTL0_H = CSKEY >> 8;                    // Unlock CS registers
             CSCTL1 = DCOFSEL_0;                       // Set DCO to 1MHz
             CSCTL2 = SELA__LFXTCLK | SELS__DCOCLK | SELM__DCOCLK;
             CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1;     // Set all dividers to 1
             CSCTL4 &= ~LFXTOFF;                       // Enable LFXT1
             do
             {
               CSCTL5 &= ~LFXTOFFG;                    // Clear XT1 fault flag
               SFRIFG1 &= ~OFIFG;
             }while (SFRIFG1&OFIFG);                   // Test oscillator fault flag
             CSCTL0_H = 0;                             // Lock CS registers

  while(1)
  {

      FRAM_write_ptr = (unsigned long *)FRAM_TEST_START;
      FRAMWrite();

  }
}

void FRAMWrite (void)
{
    *FRAM_write_ptr = data;
}

# I took the reference from MSP430FR2433 & MSP430FR6972  programs.

PLEASE REPLY

Regards,

Srijit

  • HI,

    Sorry for my Mistake.

    I am storing in MEMORY LOCATION 1840 (NOT 1800).

    regards

  • To make Information Memory writable on the FR6 series, you use the MPU rather than the DFWP bit.

    You can configure the MPU in CCS using the "Build Settings->CCS General->MPU" tab. Set the "w" bit for "Info Memory". While you're there, make sure the "x" bits for the other (code) segments are all set.

  • Hi Bruce,

    Thank you for your help.

    It is working.

    But I have another problem :

     1) DO I NEED  TO CONFIGURE EVERY TIME(SWITCHED OFF MY SYSTEM/ CLOSE CCS, AND THEN SWITCHED ON)?

    Because what I realized that : I have to change the properties every time 

    (Build Settings->CCS General->MPU" tab. Set the "w" bit for "Info Memory". While you're there, make sure the "x" bits for the other (code) segments are all set.)

    Can you give me a permanent solution please, that I need to change only once(not every time).

    regards,

    Srijit

  • The MPU settings are tied to the Project, and are retained over stopping/starting CCS. (I have CCSv8.3, but it's hard to imagine that this has changed in later versions.)

    Are you fairly certain you're working with the Project you think you are? I personally have trouble keeping track of what Eclipse thinks is the Active project, so I usually right-click the Project name (in the Project Explorer pane) and "Show Build Settings" from there.

**Attention** This is a public forum