Skip to content

Commit

Permalink
emulation: spinor: implement erasesector4byte
Browse files Browse the repository at this point in the history
Implement this command, which is used by the system for bulk erases.

Signed-off-by: Sean Cross <[email protected]>
  • Loading branch information
xobs committed Nov 3, 2022
1 parent 0c52a7a commit 779cc61
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions emulation/peripherals/MXIC_MX66UM1G45G.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,13 @@ private void RecognizeOperation(byte firstByte)
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;
Expand Down

0 comments on commit 779cc61

Please sign in to comment.