mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-06-13 08:32:19 +00:00
Reset rx_data register when SPI is not enabled
Signed-off-by: Joachim Strömbergson <joachim@assured.se>
This commit is contained in:
parent
b3781390fe
commit
fef40a9ca1
|
@ -226,7 +226,12 @@ module tk1_spi_master(
|
|||
spi_rx_data_new = 8'h0;
|
||||
spi_rx_data_we = 1'h0;
|
||||
|
||||
if (spi_rx_data_nxt) begin
|
||||
if (spi_ss) begin
|
||||
spi_rx_data_new = 8'h0;
|
||||
spi_rx_data_we = 1'h1;
|
||||
end
|
||||
|
||||
else if (spi_rx_data_nxt) begin
|
||||
spi_rx_data_new = {spi_rx_data_reg[6 : 0], spi_miso_sample1_reg};
|
||||
spi_rx_data_we = 1'h1;
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user