Replies: 3 comments 13 replies
-
Hey Andreas! I really like the idea to add a FIFO to the SPI module. If we expose the FIFO status signals (empty, at least half full, full) via the SPI control register the software could either use these flags when using the FIFO or just the busy signal of the SPI PHY layer if the FIFO shall not be used. Regarding the SPI interrupt: we could add further control register flags to configure the interrupt:
Internally, we would need two FIFOs - one for TX data and another one for RX data. However, the handling would be transparent for the software. But how to handle the CS lines? Should they also be controlled by the FIFO somehow? This would allow to "program" complete sequences and store them to the FIFO. The SPI will process them and then fires an interrupt... 🤔 |
Beta Was this translation helpful? Give feedback.
-
Hi Stephan,
Perfect. Thanks :) Some more Thouhts:
BR, |
Beta Was this translation helpful? Give feedback.
-
I drafted a first version in #381. The software framework needs some updates and also the data sheet but the SPI module should be fully backwards compatible. @akaeba It would be great if you could adapt the |
Beta Was this translation helpful? Give feedback.
-
Hi Stephan,
at the moment i interface an SPI Flash via your SPI core. The interaction with the SPI flash produces high IRQ rates in the system. Very helpful would be to lower the IRQ rate by an FIFO to call the ISR once and send a couple of bytes more. In the Regs are bity beyond Bit16 free.
neorv32/rtl/core/neorv32_spi.vhd
Line 93 in ef929c8
For example could be bit17 to bit19 used for a configurabale FIFO size. The default should be zero and therefore full backward compatible. Following Formula could implement the size
SIZE = 2**FIFO-1
.For me would be a FIFO size of 16 to 32Bytes very suitable. What do you think? If you like i can try to prepare some commits.
BR,
Andreas
Beta Was this translation helpful? Give feedback.
All reactions