diff --git a/litex/soc/cores/spi/spi_mmap.py b/litex/soc/cores/spi/spi_mmap.py index 77ced6bcd..7ef213137 100644 --- a/litex/soc/cores/spi/spi_mmap.py +++ b/litex/soc/cores/spi/spi_mmap.py @@ -124,7 +124,7 @@ class SPIMaster(LiteXModule): self.sync += [ If(clk_enable, clk_count.eq(clk_count + 1), - If(clk_count == self.clk_divider[2:], + If(clk_count == self.clk_divider[1:], clk.eq(~clk), clk_count.eq(0) ),