emulation: spinor: implement erasesector4byte

Implement this command, which is used by the system for bulk erases.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2022-11-03 12:31:22 +08:00
parent 0c52a7a3ff
commit 779cc61c56

View file

@ -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;