From 4e6962864adcbe36fa8686581ba4796f7a9a7a95 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 27 Jul 2023 22:53:01 +0200 Subject: [PATCH] fix loading mifare keys to flash memory, forgot to wipe the new area which we extended to --- armsrc/appmain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 79b21c5bf..3c471191f 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -2516,6 +2516,9 @@ static void PacketReceived(PacketCommandNG *packet) { Flash_WriteEnable(); Flash_Erase4k(3, 0xC); } else if (payload->startidx == DEFAULT_MF_KEYS_OFFSET) { + Flash_CheckBusy(BUSY_TIMEOUT); + Flash_WriteEnable(); + Flash_Erase4k(3, 0x8); Flash_CheckBusy(BUSY_TIMEOUT); Flash_WriteEnable(); Flash_Erase4k(3, 0x9);