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.

MSP430FR6928: FRAM usage as RAM, increasing RAM area problem

Part Number: MSP430FR6928

Hi,

I need more ram space for a project. I applied the methodology that is described in document “slaa628b.pdf” however somethings is wrong.

RAM2 is defined in linker like below;

MEMORY

{

    TINYRAM                 : origin = 0x0006, length = 0x001A

    PERIPHERALS_8BIT        : origin = 0x0020, length = 0x00E0

    PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100

    RAM                     : origin = 0x1C00, length = 0x0800

    RAM2                    : origin = 0x2400, length = 0x0800

    INFOA                   : origin = 0x1980, length = 0x0080

    INFOB                   : origin = 0x1900, length = 0x0080

    INFOC                   : origin = 0x1880, length = 0x0080

    INFOD                   : origin = 0x1800, length = 0x0080

    FRAM                    : origin = 0x4400, length = 0xBB80

 

. . .

}

 

And after building, every thing seems to be normal, memory configuration is given from map file below;

 

MEMORY CONFIGURATION

 

         name            origin    length      used     unused   attr    fill

----------------------  --------  ---------  --------  --------  ----  --------

  TINYRAM               00000006   0000001a  00000000  0000001a  RWIX

  PERIPHERALS_8BIT      00000020   000000e0  00000000  000000e0  RWIX

  PERIPHERALS_16BIT     00000100   00000100  00000000  00000100  RWIX

  INFOD                 00001800   00000080  00000000  00000080  RWIX

  INFOC                 00001880   00000080  00000000  00000080  RWIX

  INFOB                 00001900   00000080  00000000  00000080  RWIX

  INFOA                 00001980   00000080  00000000  00000080  RWIX

  RAM                   00001c00   00000800  00000638  000001c8  RWIX

  RAM2                  00002400   00000800  00000236  000005ca  RWIX

  FRAM                  00004400   0000bb80  000068b2  000052ce  RWIX

 . . .

However, the code is crashed, jumps an address that is not in code range. I debugged my code and investigate RAM2 address in memory browser, I saw these new address range (0x2400-0x2C00) is filled by 3FFF’s (jump’s) so the code is jumped from these address to out of range addresses.

 

What did I miss? Why does this situation happen?

  • 0x3fff is what you get when you read from an address where there is nothing. Which is confirmed by the device memory map.

    There is only so much SRAM available and you can't wave your arms and create more. Perhaps you should be trying to use FRAM.

  • I realized my mistake. many thanks. If I configure the memory like below, it works. I  assumed previous address range (0x2400-0x2C00) as FRAM. This was my mistake.

    MEMORY
    {
    TINYRAM : origin = 0x0006, length = 0x001A
    PERIPHERALS_8BIT : origin = 0x0020, length = 0x00E0
    PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
    RAM : origin = 0x1C00, length = 0x0800
    RAM2 : origin = 0x4400, length = 0x0800
    INFOA : origin = 0x1980, length = 0x0080
    INFOB : origin = 0x1900, length = 0x0080
    INFOC : origin = 0x1880, length = 0x0080
    INFOD : origin = 0x1800, length = 0x0080
    FRAM : origin = 0x4C00, length = 0xB380

**Attention** This is a public forum