看了,没有找到任何一个地方说明,,FLASH擦除后是0x00还是0xFF。。。
//Erase the sector(total 16 pages)
HAL_FLASH_Unlock();
EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;
EraseInitStruct.PageAddress = USER_DATA_ADDRESS_SECTOR1 + (CurSector-1)*0x1000;
EraseInitStruct.NbPages = 16;
HAL_FLASHEx_Erase(&EraseInitStruct, &PAGEError);
HAL_FLASH_Lock(); |