which I will call B.
The difference here is that in A the clock is low when idle and in B the clock is high on idle. When I switch from using A to using B, the first byte always has the MSB high.
e.g. 10001000
and when I switch from B to A all the bits are high except the last bit
e.g. 11111110
The first byte of any communication. So if the value was supposed to be 0x7E I would get 0xBF; ugh.
@ Arch, I “fixed” this problem just now by switching to a configuration using spi2 then back to spi1. What’s wrong with my setup and hold times? I thought those were nanoseconds.
A first chance exception of type ‘System.ArgumentException’ occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type ‘System.ArgumentException’ occurred in Microsoft.SPOT.Hardware.dll
Looks like both devices are capable of higher clock speeds. I would use 5MHz for both. Setup/hold time is in ns range so I would use 0 or try 1 for both parameters. Try to make each device work on its own before using them both on the same bus.