|
发表于 2018-5-14 20:32:01
|
显示全部楼层
我手上现在没有MCU可以测试,你可以试着吧
#define PM_ROW __attribute__((space(prog), aligned(128)))
改为
#define PM_ROW __attribute__((space(prog), aligned(1024)))
把
const int PM_ROW MyRowDataInFlash[]
改为
const int PM_ROW MyRowDataInFlash[1024]
这个因为数据手册上说到:
RTSP allows the user application to erase a page of memory, which consists of eight rows (512 instructions) at a time, and to program one row or one word at a time.
flash一次擦除的是512 ,对于保存在flash中的数据,编译器的处理是,只使用其低16位.
修改flash中的数据要先把flash中的数据全部读出来,然后擦除,再写入. |
|