Fix SPI state skipping sck-cs delay when at end of transmission

This commit is contained in:
naichewa 2024-11-07 10:17:22 -08:00
parent d899a84a01
commit 927398a017

View File

@ -263,8 +263,9 @@ module spi_controller (
TRANSMIT: begin // TRANSMIT case --------------------------------
case(CSMode)
AUTOMODE: begin
if (EndTransmission) NextState = INACTIVE;
else if (EndOfFrame) NextState = SCKCS;
if (EndTransmission & ~HasSCKCS) NextState = INACTIVE;
else if (EndOfFrame & HasSCKCS) NextState = SCKCS;
else if (EndOfFrame & ~HasSCKCS) NextState = INTERCS;
else NextState = TRANSMIT;
end
HOLDMODE: begin