Merge pull request #1758 from motec-research/spi_mmap_fix

soc/cores/spi_mmap: Fix clock divider
This commit is contained in:
enjoy-digital 2023-09-01 08:38:53 +02:00 committed by GitHub
commit 14012263af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class SPIMaster(LiteXModule):
self.sync += [ self.sync += [
If(clk_enable, If(clk_enable,
clk_count.eq(clk_count + 1), clk_count.eq(clk_count + 1),
If(clk_count == self.clk_divider[2:], If(clk_count == self.clk_divider[1:],
clk.eq(~clk), clk.eq(~clk),
clk_count.eq(0) clk_count.eq(0)
), ),