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.

cc2540 flash 读写问题



我用下面的方法测试了flash的读写,但是读出来的是全1,这应该是没写进去,为什么?代码如下

uint8 my_flash_data[5] = {'\0'};
HalFlashErase(SCENE_DATA_PAGE);//写的页面是77页

while( FCTL & 0x80 );
HalFlashWrite(0x9A00, "SELF",STORE_DATA_LENGTH);
while( FCTL & 0x80 );
HalFlashRead(SCENE_DATA_PAGE, 0x0000,my_flash_data,STORE_DATA_LENGTH);