safe_spi?
David Betz
Posts: 14,516
I've seen numerous references to safe_spi recently in conjunction with fsrw. Can some tell me what makes safe_spi "safe"? Is there a "dangerous spi" as well? :-)
Comments
The "safe" version writes out each bit at clkfreq/4, but reads bits in at clkfreq/8, so half speed. There is an "unsafe" version that reads and writes bits at clkfreq/4. This setup works great most of the time, but on some hardware (and only on PLL16X, with certain pin / cog configurations), the read data is wrong. For most applications using FSRW, it's best to use the "safe" version in that 1) it always works, and 2) it doesn't really impact the speed much if you're going through FSRW (i.e. raw read speeds drop from 1.8MB/s down to ~ 0.9MB/s, but with the overhead from FSRW you're looking at ~0.9MB/s either way).
Jonathan