From 779cc61c56dca623b110e738bbe4451bd9a428b5 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 3 Nov 2022 12:31:22 +0800 Subject: [PATCH] emulation: spinor: implement erasesector4byte Implement this command, which is used by the system for bulk erases. Signed-off-by: Sean Cross --- emulation/peripherals/MXIC_MX66UM1G45G.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/emulation/peripherals/MXIC_MX66UM1G45G.cs b/emulation/peripherals/MXIC_MX66UM1G45G.cs index 43d08bed9..6ef9975f7 100644 --- a/emulation/peripherals/MXIC_MX66UM1G45G.cs +++ b/emulation/peripherals/MXIC_MX66UM1G45G.cs @@ -276,6 +276,13 @@ namespace Antmicro.Renode.Peripherals.SPI.Betrusted enable.Value = false; return; //return to prevent further logging + case (byte)Commands.SectorErase4byte: + currentOperation.Operation = DecodedOperation.OperationType.Erase; + currentOperation.EraseSize = DecodedOperation.OperationEraseSize.Sector; + currentOperation.AddressLength = 4; + currentOperation.State = DecodedOperation.OperationState.AccumulateNoDataCommandAddressBytes; + break; + case (byte)Commands.SubsectorErase4byte4kb: currentOperation.Operation = DecodedOperation.OperationType.Erase; currentOperation.EraseSize = DecodedOperation.OperationEraseSize.Subsector4K;