I've been having trouble interfacing with a device using SPI, and finally I decided to use my logic analyzer to monitor the data. The chip has a NOP command, so basically I'm just calling SPI.WriteRead( new byte[1] {0}, new byte[1] {0}) in a tight loop to see what happens.
It looks like the first NOP goes out correctly, but each successive NOP actually clocks out a bit where it shouldn't be. The additional bit looks like it shifts down each time, which makes no sense to me. Can anyone provide me with ideas as to what could cause this sort of behavior?
I imagine that the data in the MISO column is just whatever the device is sending back in response to what command it *thinks* it's getting from the Netduino, so for now I'm concentrating on making sure that only zeroes get clocked out in my test app.
Here is my SPI configuration code:
SPI.Configuration l6470 = new SPI.Configuration( Pins.GPIO_PIN_D2, false, 0, 0, true, false, 1000, SPI_Devices.SPI1);SPI spi = new SPI( l6470);OutputPort standby = new OutputPort( Pins.GPIO_PIN_D3, true); // standby / rst is active low