Hello,
I'd like to take advantage of the FRAM on my FR5739 to store some arrays that would be initialized during the debug session but then would be unitialized whatever happens to the MCU (Reset or else ...)
I've read on the wiki and in the CCS Help that this can be achieved through modifying the linker file :
- So I've mapped my memory as follow :
RAM : origin = 0x1C00, length = 0x0400
INFOA : origin = 0x1880, length = 0x0080
INFOB : origin = 0x1800, length = 0x0080
FRAM : origin = 0xC200, length = 0x1FFF
FRAM_DATA : origin = 0xE1FF, length = 0x1D80
SIGNATURE : origin = 0xFF88, length = 0x0008
- And then I allocated a section :
.fram_data : {} > FRAM_DATA type=NOINIT
- And finally in my main source file I declare the variables between two #pragma :
#pragma SET_DATA_SECTION(".fram_data")
unsigned int buffer[5][10];
#pragma SET_DATA_SECTION()
But all this is not working, to test it I declared a variable in the section , write to it. Unplug the Dev Board (MSP-EXP430FR5739) run debug again witht the same code, and I expect my memory to be as when I unplugged it, but when I place a breakpoint on the first instruction in the main, go check the value in the memory there all my available memory is initialized with '1' for every bit...
Source :
http://processors.wiki.ti.com/index.php/Creating_MSP430_FRAM_Variables_Using_CCS