SPI Panda II

Can anybody explain how NETMF initiates a reponse from a slave device. Normaly I would send a dummy write 0x00 but I cannot see anything on the slave side using NETMF? Or post a link to where I can find the answer. Hmmm, I may know the answer now I have written the question down, but I will leave the question.

Usually device responds based on what you send to it. It depends on the device. What kind of device is it?

@ Architect,
Just another uC, I knew that would be the answer, you just need a dummy write for the last piece of data. I had a mental block, and could not see the wood for the trees. I was sure of the answer once I had written the question.

Thanks anyway for the reply.

No problem! ;D

@ Architect,

Does the SPI Lib control the function of the SS pin? If I define the constructor as,

SPI Spi = new SPI(new SPI.Configuration(Cpu.Pin.GPIO_Pin10,
                      true, 1, 0, false, false, 1000, SPI.SPI_module.SPI1));

I do not need to control the action of GPIO_Pin10, it’s auto SS?

That is correct.

Well that flushed the rat out of the hole! I rushed to the circuit diag. to find I had made a pin translation error, and was thinking I had stuffed a cpu pin ;D (D this and IO that). It’s true what they say, when everything else fails, read the dam manual :-[ or get a new life and ride the waves 8)

@ Architect,

Questions regarding the 3rd and 4th params of the constructor, setup and release delays of SS.

  1. Are the unit values in uSecs?
  2. Or are the unit values related to the SCLK value, ie are the unit values SCLK ticks?

These are in milliseconds

@ Architect,

That was my assumed value, but I dont see mSecs when looking with a scope. I will check again.

I based my answer on the official documentation which states “milliseconds” for ChipSelect_SetupTime.
Just checked PortingKit source code and it looks like it is in microseconds actually.

Documentation must be wrong.

@ Architect,

Thanks that will save me buying a new pair of glasses. I was playing with values last night and got a constraint exception with regard to Thread.Sleep I had the numbers set the same, ie 500 setup delay and 500mS thread sleep, I changed the setup delay to 400 and the exception went away, may be a bug? Dont ask about the numbers I just do these things. ;D