Skip to content

Commit

Permalink
Reset miso
Browse files Browse the repository at this point in the history
  • Loading branch information
mole99 committed Apr 13, 2024
1 parent 32db909 commit 1f8412e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/spi_receiver.sv
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ module spi_receiver #(
always_ff @(posedge clk_i, negedge rst_ni) begin
if (!rst_ni) begin
spi_cnt <= 3'd0;

user <= REG_DEFAULT;

spi_cmd <= '0;
spi_miso_o <= 1'b0;

memory_shift_o <= 1'b0;
memory_load_o <= 1'b0;
end else begin
Expand All @@ -102,7 +101,7 @@ module spi_receiver #(
if (spi_cnt == 7) begin
if (mode_i == 0) begin
// Read the command
user <= spi_cmd[REG_SIZE-1:0]; // TODO error
user <= {spi_cmd[6:0], spi_mosi_sync};
end else begin
memory_shift_o <= 1'b1;
memory_load_o <= 1'b1;
Expand Down

0 comments on commit 1f8412e

Please sign in to comment.