Main Site Documentation

SPI setup/hold time units


#1

Can someone please confirm what time units the setup and hold time values in the SPI.Configuration call are in: milliseconds, microseconds, nanoseconds? I’m guessing milliseconds but would like to be sure.

The .netMicro doc is here
https://docs.microsoft.com/en-us/previous-versions/windows/embedded/jj646719(v%3Dvs.102)

and this is all it says about the setup and hold time
* ChipSelect_SetupTime
Type: System. . :: . .UInt32
The setup time for the chip select port. In other words, this parameter specifies the amount of time that will elapse between the time at which the device is selected and the time at which the clock and the clock data transmission will start.

* ChipSelect_HoldTime
Type: System. . :: . .UInt32
The hold time for the chip select port. In other words, this parameter specifies the amount of time that the chip select port must remain in the active state before the device is unselected, or the amount of time that the chip select will remain in the active state after the data read/write transaction has been completed.

Thanks


#2

In .NETMF the units is miliseconds. Typically we use zero anyways. In tinyclr the values are in microseconds.


#3

Thanks, I’m working with someone else’s code and they had the setup time set to 200 which seemed odd because the setup time on the part’s data sheet was 200 nanoseconds.


#4

NETMF is is microseconds.


#5

Oh then TinyClr is nano seconds? Oops.