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.

MSP430FR FRAM读写

Expert 2115 points
Other Parts Discussed in Thread: MSP430FR5994

使用#pragma PERSISTENT命令可以定义变量到FRAM,并且正常读写,代码如下:
#pragma PERSISTENT(data);
uint16_t data[1024] = {0};

如果再加上#pragma LOCATION指定地址后,编译没问题,但是程序运行后无法正常读写变量,为什么?

#pragma LOCATION(data, 0x10000);

#pragma PERSISTENT(data);

uint16_t data[1024] = {0};