Strange Timing in SPI #330
-
I found a strange timing in SPI.cpp and analyzed it: //---- in \rp2040\hardware\rp2040\1.9.4\libraries\SPI ----_ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Interesting observation! I imagine the clock startup time could be pretty long. Maybe we can only call |
Beta Was this translation helpful? Give feedback.
Interesting observation! I imagine the clock startup time could be pretty long.
Maybe we can only call
spi_init()
when the SPI clock frequency changes, and never disable the SPI block until aSPI.end()
! It feels like a simple tweak, do you think you could give it a try? Basically, cache the last clock and options and if they're the same as before we might be able to skip the init. OTW, call the spi deinit/spi reinit and cache these new settings...