Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network_protocol_programming_lab:4_prepareppl [2022/04/12 16:54] – [SPI Library] fangenoorthnetwork_protocol_programming_lab:4_prepareppl [2022/04/18 17:40] (current) fangenoorth
Line 22: Line 22:
  
 To avoid damage of devices, the colors shown must match. Also take care of the pins. They should be firmly fixed. To avoid damage of devices, the colors shown must match. Also take care of the pins. They should be firmly fixed.
-===== Get PPL Files for BeagleBone Black ===== 
- 
-First leave the root shell you have used in the previous steps by entering //exit// and continue as a regular user. 
- 
-To get all the stuff for the PPL on the BeagleBone Black, go to your favorite directory (e.g. ///home/debian//) and execute: 
- 
-<code bash> 
-wget http://kn-pr.tkn.tu-berlin.de/ppl/Beaglebone.tar.gz 
-</code> 
- 
-Extract the archive by executing the command: 
- 
-<code bash> 
-tar -xzf Beaglebone.tar.gz 
-</code> 
- 
-Now you will see a new directory called Beaglebone, containing additional directories: 
- 
-<code bash> 
-ls Beaglebone 
-dts  spi  SPI_test 
-</code> 
- 
-Now change to directory //Beaglebone//. 
- 
-===== Install device tree overlay ===== 
- 
-For PPL the CC1200 is connected to the SPI bus of the BeagleBone Black and the SPI bus is controlled by the PRU. 
-Therefore some modifications of the device tree are needed. In order to install the modifications go to directory 
- 
-<code bash> 
-cd dts 
-</code> 
- 
-Directory //dts// contains the file //BB-BONE-CC1200-00A0.dts//. In this file the device tree modification are included. To convert it to a binary file enter: 
- 
-<code bash> 
-dtc -O dtb -o  BB-BONE-CC1200-00A0.dtbo -b 0 -@ BB-BONE-CC1200-00A0.dts 
-</code> 
- 
-During the compilation you can safely ignore warnings like 
-<code bash> 
-BB-BONE-CC1200-00A0.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property 
-</code> 
- 
-//dtc// is the device tree compiler, which produces the bizarre overlay file //BB-BONE-CC1200-00A0.dtbo//. Next copy this file to the system firmware directory: 
- 
-<code bash> 
-sudo cp BB-BONE-CC1200-00A0.dtbo /lib/firmware/ 
-</code> 
- 
-===== Booting with BB-BONE-CC1200 ===== 
- 
-In order to boot with the BB-BONE-CC1200 device tree overlay, we have to instruct the bootloader to do so: 
- 
-Edit the file ///boot/uEnv.txt// and find the line: 
- 
-<code bash> 
-#dtb_overlay=/lib/firmware/<file8>.dtbo 
-</code> 
- 
-Now uncomment this line and edit it so that it loads our own device tree overlay blob: 
- 
-<code bash> 
-dtb_overlay=/lib/firmware/BB-BONE-CC1200-00A0.dtbo 
-</code> 
- 
-After that, reboot. 
  
 ===== SPI Library ===== ===== SPI Library =====
Line 95: Line 27:
 The PRU controls the SPI bus and offers a software user space interface for reading and writing to and from the SPI bus. The PRU controls the SPI bus and offers a software user space interface for reading and writing to and from the SPI bus.
  
-=== Install PRU devtools ===+==== Install PRU devtools ====
  
 In order to build and use the SPI library we need access to the development tools for the PRU. Since these aren't available anymore in the repositories, we have to compile and install them on our own. In order to build and use the SPI library we need access to the development tools for the PRU. Since these aren't available anymore in the repositories, we have to compile and install them on our own.
Line 121: Line 53:
 Now we should have access to the PRU assembler //pasm// as well as the prussdrv library. Now we should have access to the PRU assembler //pasm// as well as the prussdrv library.
  
-=== Build and install the SPI library ===+==== Build and install the SPI library ====
  
 To generate the SPI library go to the //spi// directory of the Beaglebone archive. To generate the SPI library go to the //spi// directory of the Beaglebone archive.
Line 148: Line 80:
  
  
-=== Test Setup ===+==== Test Setup ====
  
 To test, if everything is working fine, go to the directory To test, if everything is working fine, go to the directory
network_protocol_programming_lab/4_prepareppl.1649775241.txt.gz · Last modified: 2022/04/12 16:54 by fangenoorth
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0