Hallo,
I am using the MSP430FR2633 with Version: 6.1.2.00015 and want to use the FRAM.
in the linker file I moved the .TI.noinit near to the .TI.persistent. Now it looks like this:
GROUP(ALL_FRAM)
{
GROUP(READ_WRITE_MEMORY)
{
.TI.persistent : {} /* For #pragma persistent */
.TI.noinit : {} //new by user /* For #pragma noinit */
}
GROUP(ALL_FRAM)
{
GROUP(READ_WRITE_MEMORY)
{
.TI.persistent : {} /* For #pragma persistent */
.TI.noinit : {} //new by user /* For #pragma noinit */
}
For testing I did the following:
uint8_t tmp1; uint8_t tmp2; uint8_t tmp3; uint8_t tmp4; #pragma PERSISTENT(testFR) uint8_t testFR=12; tmp1=testFR; testFR=34; __delay_cycles(1000); tmp2=testFR; testFR=44; // __delay_cycles(1000); tmp3=testFR; testFR=54; __delay_cycles(1000); tmp3=testFR;
It reads out the value 12 in all of the tmp variables. So it seems like there is no data written in the FRAM after allocation.
I also tried the #pragma NOINIT with the only difference of getting 255 instead of 12. Seems like this is the initial value but again no data written.
Do I have to unlock the FRAM first?
What am I missing?