diff --git a/lib/spi/src/spi_master.vhd b/lib/spi/src/spi_master.vhd index aa245ee..1b6d428 100644 --- a/lib/spi/src/spi_master.vhd +++ b/lib/spi/src/spi_master.vhd @@ -287,7 +287,7 @@ begin when load_data => if xfer_count_busy = '0' then - state_next <= idle; + state_next <= finish; elsif write_fifo_empty = '0' then data_load_en <= '1'; state_next <= shift_write; @@ -301,12 +301,10 @@ begin state_next <= finish; elsif data_count_busy = '1' then if word_cnt_pipe(word_cnt_pipe'left) = '1' then - if data_count_busy = '1' then - if write_fifo_empty = '0' then - data_load_en <= '1'; - else - state_next <= load_data; - end if; + if write_fifo_empty = '0' then + data_load_en <= '1'; + else + state_next <= load_data; end if; end if; else