我用F930的开发板, 对Flash数据存储区读写数据, 读到的一直是0; 写不进去, 程序如下, 每次重起后, 读出来都是0 unsigned char xdata * data pwrite; // FLASH write pointer pwrite = (unsigned char xdata *) 0; PSCTL = 0x04; awake_time = ((uint)(pwrite[0]) << 8 + (pwrite[1]));
if (awake_time > 600 || awake_time < 60) { //PSCTL |= 0x04; //awake_time = 60; pwrite[0] = 0; pwrite[1] = 60;
} PSCTL &= ~0x07;
|