This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
flink_example_1 [2015/03/28 07:39] – ursgraf | flink_example_1 [2015/03/28 08:18] – [External FPGA connected through SPI interface] ursgraf | ||
---|---|---|---|
Line 14: | Line 14: | ||
==== Configure the FPGA ==== | ==== Configure the FPGA ==== | ||
Proceed as described in [[flink_vhdl|flink VHDL]]. | Proceed as described in [[flink_vhdl|flink VHDL]]. | ||
- | * In 5: add a block //gpio// and a block //pwm// to the system. Also add a // | + | * In 5: add a block //gpio// and a block //pwm// to the system. Leave the standard values as they are except for the PWM module, whose base clock depends on your FPGA clock. Set '' |
- | * In 6: set the '' | + | * In 6: set the '' |
- | * After 10: the system should now look like: [{{ : | + | * After 10: the system should now look like: [{{ spi_qsys.png?700 | //Complete system// }}] |
Connect the FPGA with the SPI pins on the mpc5200. | Connect the FPGA with the SPI pins on the mpc5200. | ||
Line 67: | Line 66: | ||
=== Build into kernel === | === Build into kernel === | ||
- | Compile kernel modules (see [[software: | + | Compile kernel modules (see [[flink_linux|flink Linux Kernel Modules]]) and add them to your kernel image. Add a subnode '' |
=== Load manually === | === Load manually === | ||
Line 95: | Line 94: | ||
spi_setup(dev); | spi_setup(dev); | ||
</ | </ | ||
- | Finally, compile kernel modules (see [[software: | + | Finally, compile kernel modules (see [[flink_linux|flink Linux Kernel Modules]]), transfer them to the target and load them: |
< | < | ||
insmod flink.ko | insmod flink.ko | ||
Line 103: | Line 102: | ||
==== flink library and application ==== | ==== flink library and application ==== | ||
- | Compile the flink library (see [[software: | + | Compile the flink library (see [[flink_lib|flink Userspace Library]]) together with several test applications. Transfer the library and the test application to the target. Make sure that your library path includes the actual location of your library. Run test applications such as '' |
===== Onboard FPGA connected through Local Plus Bus ===== | ===== Onboard FPGA connected through Local Plus Bus ===== | ||
Line 115: | Line 114: | ||
=== Configure the FPGA === | === Configure the FPGA === | ||
- | Proceed as described in [[software: | + | Proceed as described in [[flink_vhdl|flink VHDL]]. |
- | * In 5: add a block //gpio// and a block //pwm// to the system. Also add a // | + | * In 5: add a block //gpio// and a block //pwm// to the system. Also add a // |
- | * In 6: set the '' | + | * In 6: set the '' |
- | * After 10: the System | + | * After 10: the system |
* In 15: assign the pins as follows: | * In 15: assign the pins as follows: | ||
Line 164: | Line 163: | ||
|reset_reset_n|in|PIN_N9| | |reset_reset_n|in|PIN_N9| | ||
- | The pins for the PWM output and the GPIO have to be assigned according to your hardware. The FPGA can be loaded through the onboard PROM or through serial loading from the processor, see [[software:linux:emdebian:phycore-mpc5200b|Installation von Emdebian Grip auf den Phytec phyCORE-MPC5200B]]. | + | The pins for the PWM output and the GPIO have to be assigned according to your hardware. The FPGA can be loaded through the onboard PROM or through serial loading from the processor, see [[http:// |
==== Loading the kernel modules ==== | ==== Loading the kernel modules ==== | ||
- | Compile the Linux kernel modules ([[software: | + | Compile the Linux kernel modules ([[flink_linux|flink Linux Kernel Modules]]), transfer them to the target and load them with |
< | < | ||
insmod flink.ko | insmod flink.ko |