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.

How exactly do you configure FRAM as RAM

Other Parts Discussed in Thread: MSP430FR5969, ENERGIA

Hi All,

From what I understand, the FRAM in the MSP430FR series can be used as RAM if necessary. What exactly is the procedure for doing that?

For example, the MSP430FR5969 has 2kB of SRAM and 64 kB of FRAM. If I was to use a large library that required more than 2kB of RAM so the SRAM would be full, how would I configure some of the FRAM to run as RAM?

I'm sorry if this is a basic question but the information I found online wasn't clear to me. I would be grateful for any clarification.

Thanks in advance!

Nipun

  • This certainly is a confusing topic because the solution isn't straightforward to someone who hasn't diverged from the "straight and narrow" development flow of a typical MCU.

    The key is in the Linker Script.  RAM is used for several different "segments", such as BSS, DATA, STACK, etc. which are typically defined by an MCU project's linker script to point to the location of the SRAM.  Since CCS makes a copy of the default linker script and includes it in each project you create, you have the option to edit that .lnk file and move those sections around.

    Local variables and other uses of the STACK can be kept inside SRAM, for example, but you could move the BSS and/or DATA segments to a portion of FRAM's address space in order to make big arrays, for instance, live inside FRAM instead.  Be sure you check other entries in the linker script to ensure they don't overlap the FRAM addresses that you're using for RAM.

    I don't have any hard examples to give here with CCS, my personal experience messing with this is grounded more in Energia / msp430-gcc land where it's a bit wonky since there isn't a local "copy" of the linker script included in every project.

  • http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/224008.aspx

    Good luck - Mich

  • Guys, thank you for the help. I'll read more about and play with the linker script. Until I mess that up, I'm marking this post as solved.

    Thanks again!

**Attention** This is a public forum