Hi
I am trying to transmit some data to SPI.
My system captures the DATA on CLOCK Falling Edge.
I have defined it like this:
static SPI.Configuration WBT_SPI = new SPI.Configuration( Pins.GPIO_PIN_D10, // SS-pin false, // SS-pin active state 0, // The setup time for the SS port 0, // The hold time for the SS port true, // The idle state of the clock false, // The sampling clock edge 1, // The SPI clock rate in KHz SPI_Devices.SPI1 // The used SPI bus (refers to a MOSI MISO and SCLK pinset) );
my code for writing 5x bytes of zreoes to the SPI is as follow: (View Image1.jpg for more details)
wbt_bus.Write(DataTransmitToSPI);
I have analized the sigals of the NETDUINO SPI port with LOGIC ANALIZER. (See IMAGE2)
you can clearly see that the DATA is being write correctly.
FRAME (SS) = '0'
and the clock is falling when the DATA signal = '0'
But
after the transmissin is done (after the 5th byte), the CLOCK signal stays high, the DATA stays high, the SS stays low (Active) .
after a while, the clock is falling again ( to its idle state) but the DATA is '1' and the SS = '0' (Slave still active)
it means that it writes '1' to the SPI.
I have tried to change the SPI clock idle state to both true/false, but the idle clk idle state stays on '0' always.
Am I doing something wrong ?