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.

new guy to FRAM

Other Parts Discussed in Thread: MSP430FR6989, MSP430FR5969

Hey everyone,

I am new to FRAM on any of TI's MSP430s. I'm currently using an MSP430FR5969 and an MSP430FR6989, and I would like to put everything into FRAM (just for testing purposes).

What is the best way to put things inside FRAM without having to set every single variable individually to FRAM with #pragma PERSISTENT? I would like to call one function or set a few registers and have almost everything inside of FRAM. I tried messing with the memory file (.cmd), but I'm even less experienced with that.

Thanks for any help/advice.

  • I came from the DEC-Tape days. To me, Flash memory is "weird", while FRAM is "nice", and PERSISTENT is "what the hell is that".

    Back to your question. It is very simple to do (the hell with PERSISTENT). Simply look and edit the Link Command file. Do not allocate any memory segment to the address range 0x01C00-0x023FF (SRAM). Squeeze and spread those memory segments to the address range 0x04400-0x13FFF (Flash in the FR5969 case) or address range 0x04400-0x23FFF (Flash in the FR6989 case).

  • Alright, I think that might have worked. I need to test it still, though. What is the easiest way of saving a variable through startups with FRAM? Like, a counter of how many times the MSP has been turned on and off?

  • In principle, the test you desired for FRAM is simple to do. However, all the tool we used are still geared to handle the old paradigm of volatile Primary memory and slow sequential Secondary memory (PDP-11 style). They are further jumbled with makeshift fixes to handle Flash and SRAM. They are not suitable for FRAM and you test is difficult to realize.

    First, you have to declare your counter as global or static so the it is statically allocated at a fixed address rather than dynamically allocated in the Stack.

    Second, you have defeat the c-startup from initializing or zeroing of count at each Reset.

    Third, you need to zero count at the very begin of its existence.

**Attention** This is a public forum