/* * SPI Interfaces */#define SPI_INTERFACES_COUNT 1
the SPI bus speed on the Zero is limited to 12MHz, so the ability to use two busses simultaneously would double the available bandwidth if say, you wanted to read from an SD card and write to a display at the same time.
So instead of initiating transfer and having to wait 8 cycles or whatever for the transfer to complete and being able to do nothing during that time, I could use those 8 cycles for other things... including starting another transfer on the second SPI bus, effectively giving me twice the throughput.I mean in reality it might be less than twice the throughput, but it would still probably be more than what could be achieved with a single bus.
And even if it were the same as what could be done with a single bus, I would imagine the CPU would at least be freed up to do more stuff.
In theory with an extremely fast CPU, yes.
In practice with 8 bit AVR or 32 bit ARM Cortex-M0+, with 8 or 12 Mbit/sec SPI, the CPU speed is far too slow. Especially for 2 general purpose libraries like SD and a display, just the function exit-entry-exit-entry to get between the 2 unrelated code bases will eat up nearly all the CPU time.
Of course, you can try to prove me wrong! Just a small matter of programming, right?
Let's see, 48mhz / 12mhz = 4... And tansmitting 8 bits at 12mhz takes 16 cycles. Times our factor of 4... That's 64 CPU cycles wasted waiting for that byte to finish transmitting if we stick around waiting for the next byte to arrive! Am I wrong?
And normally I'd be up for the challenge, but I've got my hands full at the moment designing PCBs. I'm just putting some ideas out there!
Maybe after you're start shipping your Neutrino boards you'll find some time to contribute to the Arduino software or libraries?