Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual
Page 42

KTD-S0057-I
Page 38 Linux® Programming Examples (DebianTM)
KTAM3874/pITX Software Guide
transfer
(fd);
close
(fd);
return
ret;
}
You should consider following parameter limits:
Parameter
MIN
MAX
Units
Databits (Bits per Word)
4
32
Bits
Transmission Speed
2000
48000000
Hz
Transmission Mode
Only full duplex possible (driver restriction)
Bit Transfer Mode
Only MSB first mode possible
Note: The test array of the original sourcecode contains 38 bytes but this number can cause a crash if you
use 32 data bits (number should be 36 bytes).
Further information is available on
https://www.kernel.org/doc/Documentation/spi/spi-summary
.
Examples:
Using
default
values
./spi
Set speed to 10 MHz
./spi -s 10000000
Set mode to 3
./spi -H -O
As result you should see this screen output: