fix loading mifare keys to flash memory, forgot to wipe the new area which we extended to

This commit is contained in:
iceman1001 2023-07-27 22:53:01 +02:00
parent 58f9ba0abf
commit 4e6962864a

View file

@ -2516,6 +2516,9 @@ static void PacketReceived(PacketCommandNG *packet) {
Flash_WriteEnable(); Flash_WriteEnable();
Flash_Erase4k(3, 0xC); Flash_Erase4k(3, 0xC);
} else if (payload->startidx == DEFAULT_MF_KEYS_OFFSET) { } else if (payload->startidx == DEFAULT_MF_KEYS_OFFSET) {
Flash_CheckBusy(BUSY_TIMEOUT);
Flash_WriteEnable();
Flash_Erase4k(3, 0x8);
Flash_CheckBusy(BUSY_TIMEOUT); Flash_CheckBusy(BUSY_TIMEOUT);
Flash_WriteEnable(); Flash_WriteEnable();
Flash_Erase4k(3, 0x9); Flash_Erase4k(3, 0x9);