This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
flink_linux [2015/02/26 15:12] – [flink Linux Kernel Modules] ursgraf | flink_linux [2023/12/19 16:10] (current) – [Module Parameters] ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== flink Linux Kernel Modules ====== | ====== flink Linux Kernel Modules ====== | ||
- | <box blue right 38% | **Downloads**> | + | <box blue right 42% | **Downloads**> |
* [[https:// | * [[https:// | ||
</ | </ | ||
Line 8: | Line 8: | ||
===== Overview ===== | ===== Overview ===== | ||
- | When flink is used on a Linux based system the flink library in userspace communicates with the hardware by means of several kernel modules. The basic module is '' | + | When flink is used on a Linux based system the flink library in userspace communicates with the hardware by means of several kernel modules. The basic module is '' |
===== Requirements ===== | ===== Requirements ===== | ||
Line 16: | Line 16: | ||
===== Building ===== | ===== Building ===== | ||
- | * Clone git repository: < | + | * Clone git repository: < |
+ | cd flinklinux | ||
+ | git submodule init | ||
+ | git submodule update</ | ||
* Choose the target plattform and find its appropriate kernel configuration together with the kernel headers. Find more help about this in [[https:// | * Choose the target plattform and find its appropriate kernel configuration together with the kernel headers. Find more help about this in [[https:// | ||
* Build for the host plattform with: < | * Build for the host plattform with: < | ||
Line 25: | Line 28: | ||
* The makefile will switch to the kernel directory, read the current configuration and compile all necessary flink kernel modules for the choosen target plattform. | * The makefile will switch to the kernel directory, read the current configuration and compile all necessary flink kernel modules for the choosen target plattform. | ||
* Use '' | * Use '' | ||
- | + | ||
+ | ===== Generating the documentation ===== | ||
+ | Create the makefile with cmake (in the root directory): < | ||
+ | After this generate the documentation as given in the '' | ||
===== Installation ===== | ===== Installation ===== | ||
* Move new kernel modules into the default location to ''/ | * Move new kernel modules into the default location to ''/ | ||
Line 39: | Line 45: | ||
| flink_spi.ko | device memory length (see below) | for spi interface | flink_spi dev_mem_length=0x280 | | | flink_spi.ko | device memory length (see below) | for spi interface | flink_spi dev_mem_length=0x280 | | ||
| mpc5200/ | | mpc5200/ | ||
+ | | imx6/ | ||
+ | | zynq/ | ||
- | Busses like //PCI// have discoverability built into them. Any device connected to such a bus can tell the system, what kind of device it is and what resources it uses. On the //SPI// this is not possible. Therefore, you must provide the total device memory length when loading the module. This length is determined by the number and types of the subdevices implemented in VHDL, see [[flink_vhdl|flink VHDL]]. \\If an info subdevice is present, it will give the information about the memory length | + | Busses like //PCI// have discoverability built into them. Any device connected to such a bus can tell the system, what kind of device it is and what resources it uses. On the //SPI// this is not possible. Therefore, you must provide the total device memory length when loading the module. This length is determined by the number and types of the subdevices implemented in VHDL, see [[flink_vhdl|flink VHDL]]. \\ If an //info subdevice// is present, it will give the information about the total device size and the parameter can be ommitted, see [[flink_vhdl# |
===== Performance ===== | ===== Performance ===== | ||
When parallel busses such as PCI or LocalPlusBus are used, any flink transfer happens very quickly and basically depends on the speed of the bus and the FPGA. Care has to be taken when using the SPI interface. The standard SPI subsystem in a standard Linux distribution uses an internal queueing mechanism which is rather slow. Subsequent transfers of a message are separated by approximately 70μs. Further, every flink read or write includes a 8 byte transfer (address and data phase). Though SPI allows for full duplex transfers this feature cannot be used here.\\ | When parallel busses such as PCI or LocalPlusBus are used, any flink transfer happens very quickly and basically depends on the speed of the bus and the FPGA. Care has to be taken when using the SPI interface. The standard SPI subsystem in a standard Linux distribution uses an internal queueing mechanism which is rather slow. Subsequent transfers of a message are separated by approximately 70μs. Further, every flink read or write includes a 8 byte transfer (address and data phase). Though SPI allows for full duplex transfers this feature cannot be used here.\\ | ||
IMPORTANT When using SPI timing considerations become crucial. As a rule of thumb: Every flink transfer (such as updating a PWM high time or reading a encoder value takes up to 200μs. SPI should be used for low-frequency control application with not too many parallel channels. | IMPORTANT When using SPI timing considerations become crucial. As a rule of thumb: Every flink transfer (such as updating a PWM high time or reading a encoder value takes up to 200μs. SPI should be used for low-frequency control application with not too many parallel channels. |