Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 0006e6a3 authored by Jason Kridner's avatar Jason Kridner
Browse files

Some spelling and link fixes

parent b7cfab2e
Branches
Tags
No related merge requests found
......@@ -126,7 +126,7 @@ through `Windows Subsystem for Linux <https://docs.microsoft.com/en-us/windows/w
machine such as `VirtualBox <https://www.virtualbox.org/>`_, or in the cloud (`Microsoft Azure <https://portal.azure.com/>`_
or `Amazon Elastic Compute Cloud <http://aws.amazon.com/ec2/>`_, EC2, for example).
Recently I've been prefering `Windows Subsystem for Linux <https://docs.microsoft.com/en-us/windows/wsl/>`_.
Recently I've been preferring `Windows Subsystem for Linux <https://docs.microsoft.com/en-us/windows/wsl/>`_.
.. _tips_shell:
......@@ -363,7 +363,7 @@ Run the installed Virtual Network Computing (VNC) server:
New 'X' desktop is beaglebone:1
reating default startup script /home/debian/.vnc/xstartup
Creating default startup script /home/debian/.vnc/xstartup
Starting applications specified in /home/debian/.vnc/xstartup
Log file is /home/debian/.vnc/beagleboard:1.log
......@@ -653,7 +653,7 @@ I'm running Debian 11.x (Bullseye), the middle one.
:align: center
:alt: Latest Image Page
Latested Beagle Images
Latest Beagle Images
Scroll to the top of the page and you'll see instructions on setting up Wifi. The instructions here are based on using +networkctl+
......@@ -764,7 +764,7 @@ In the file you'll see:
}
Change the *ssid* and *psk* enteries for your network. Save your file, then run:
Change the *ssid* and *psk* entries for your network. Save your file, then run:
.. code-block:: bash
......@@ -970,7 +970,7 @@ Just to be sure, you can install *nmap* on your host computer to see what ports
Nmap done: 1 IP address (1 host up) scanned in 0.19 seconds
Currently there are three ports visible: 22, 80 and 3000 (visual studio code) Now turn on the firewal and see what happends.
Currently there are three ports visible: 22, 80 and 3000 (visual studio code) Now turn on the firewall and see what happens.
.. code-block:: bash
......@@ -990,7 +990,7 @@ Currently there are three ports visible: 22, 80 and 3000 (visual studio code) N
Nmap done: 1 IP address (1 host up) scanned in 0.19 seconds
Only port 22 (ssh) is accessable now.
Only port 22 (ssh) is accessible now.
The firewall will remain on, even after a reboot. Disable it now if you don't want it on.
......@@ -1164,7 +1164,7 @@ Problem
You are starting to run out of room on your microSD card (or onboard flash) and
have removed several packages you had previously installed (:ref:`tips_apt_remove`),
ut you still need to free up more space.
but you still need to free up more space.
Solution
--------
......@@ -1326,7 +1326,7 @@ and is much faster. The approach is the same, write to the */sys/class/gpio* fi
:download:`blinkLED.c <../code/05tips/blinkLED.c>`
Here, as with JavaScript and Python, the gpio pins are refered to by the Linux gpio number.
Here, as with JavaScript and Python, the gpio pins are referred to by the Linux gpio number.
:ref:`tips_cape_headers_digital` shows how the P8 and P9 Headers numbers map to the gpio number.
For this example P9_14 is used, which the table shows in gpio 50.
......
......@@ -599,7 +599,7 @@ Solution
---------
This example came from https://realpython.com/python-send-email/.
First, you need to `set up a Gmail account <https://mail.google.co>`_, if you don't already have one.
First, you need to `set up a Gmail account <https://mail.google.com>`_, if you don't already have one.
Then add the code in :ref:`networking_nodemailer_code` to a file named ``emailTest.py``. Substitute your own Gmail username. For the password:
* Go to: https://myaccount.google.com/security
......@@ -696,7 +696,7 @@ Because your Bone is on the network, it's not hard to access the current weather
bash$ export APPID="Your key"
* Then add the code in :ref:`networking_weather_code` to a file named ``weather.js``.
* Run the pyhon script.
* Run the python script.
.. _networking_weather_code:
......@@ -743,8 +743,8 @@ of sample code for interacting with Twitter. Here I'll show how to create a twe
Creating a Project and App
===========================
* Follow the `directions here <https://developer.twitter.com/en/docs/apps/overview>`_ to create a project and and app.
* Be sure to giv eyour app Read and Write permission.
* Follow the `directions here <https://developer.twitter.com/en/docs/apps/overview>`_ to create a project and app.
* Be sure to give your app Read and Write permission.
* Then go to the `developer portal <https://developer.twitter.com/en/portal/projects-and-apps>`_ and select you app by clicking on the gear icon to the right of the app name.
* Click on the *Keys and tokens* tab. Here you can get to all your keys and tokens.
......@@ -828,7 +828,7 @@ The code in :ref:`networking_pushbutton_code` snds a tweet whenever a button is
:download:`twitterPushbutton.js <../code/06iot/twitterPushbutton.js>`
To see many other examples, go to `iStrategyLabs node-twitter GitHub page <http://bit.ly/18AvST>`_.
To see many other examples, go to `Twitter for Node.js on NPMJS.com <https://www.npmjs.com/package/twitter>`_.
This opens up many new possibilities. You can read a temperature sensor and tweet its
value whenever it changes, or you can turn on an LED whenever a certain hashtag
......@@ -1019,7 +1019,7 @@ You would like your Bone to talk to an Arduino or LaunchPad.
Solution
---------
The common serial port (also know as a UART) is the simplest way to
The common serial port (also known as a UART) is the simplest way to
talk between the two. Wire it up as shown in :ref:`networking_launchPad_fig`.
.. warning::
......
......@@ -18,119 +18,123 @@ Bone. Capes can range in size from Bone-sized (:ref:`capes_miniDisplay`) to much
This chapter shows how to attach a couple of capes, move your design to a protoboard, then to a PCB,
and finally on to mass production.
.. _capes_7inLCD:
..
#TODO# LCD7 is no longer available. Example needs to be redone with a board that is available. Removing due to broken links
.. _capes_7inLCD:
Using a Seven-Inch LCD Cape
============================
Using a Seven-Inch LCD Cape
============================
Problem
--------
Problem
--------
You want to display the Bone's desktop on a portable LCD.
You want to display the Bone's desktop on a portable LCD.
Solution
--------
Solution
--------
.. note:: #TODO# The 4D Systems LCD capes would make a better example. CircuitCo is out of business.
.. note:: #TODO# The 4D Systems LCD capes would make a better example. CircuitCo is out of business.
A number of `LCD capes <http://bit.ly/1AjlXJ9>`_ are built for the Bone, ranging in size from three
to seven inches. This recipe attaches a seven-inch `BeagleBone LCD7 <http://bit.ly/1NK8Hra>`_
from `CircuitCo <http://circuitco.com/>`_ (shown in :ref:`capes_7inLCD_fig`) to the Bone.
A number of `LCD capes <http://bit.ly/1AjlXJ9>`_ are built for the Bone, ranging in size from three
to seven inches. This recipe attaches a seven-inch `BeagleBone LCD7 <http://bit.ly/1NK8Hra>`_
from `CircuitCo <http://circuitco.com/>`_ (shown in :ref:`capes_7inLCD_fig`) to the Bone.
.. _capes_7inLCD_fig:
.. _capes_7inLCD_fig:
7" LCD
========
7" LCD
========
.. note::
Seven-inch LCD from CircuitCo, :ref:`capes_7inLCD_fig` was originally posted by CircuitCo
at http://elinux.org/File:BeagleBone-LCD7-Front.jpg under a
`Creative Commons Attribution-ShareAlike 3.0 Unported License <http://creativecommons.org/licenses/by-sa/3.0/>`_.
.. note::
Seven-inch LCD from CircuitCo, :ref:`capes_7inLCD_fig` was originally posted by CircuitCo
at http://elinux.org/File:BeagleBone-LCD7-Front.jpg under a
`Creative Commons Attribution-ShareAlike 3.0 Unported License <http://creativecommons.org/licenses/by-sa/3.0/>`_.
.. figure:: figures/LCD.png
:align: center
:alt: 7 inch LCD
.. figure:: figures/LCD.png
:align: center
:alt: 7 inch LCD
To make this recipe, you will need:
To make this recipe, you will need:
* Seven-inch LCD cape
* A 5 V power supply
* Seven-inch LCD cape
* A 5 V power supply
Just attach the Bone to the back of the LCD, making sure pin 1 of *P9* lines up with
pin 1 of +P9+ on the LCD. Apply a 5 V power supply, and the desktop will appear on
your LCD, as shown in :ref:`capes_LCD7Desktop`.
Just attach the Bone to the back of the LCD, making sure pin 1 of *P9* lines up with
pin 1 of +P9+ on the LCD. Apply a 5 V power supply, and the desktop will appear on
your LCD, as shown in :ref:`capes_LCD7Desktop`.
.. _capes_LCD7Desktop:
.. _capes_LCD7Desktop:
.. figure:: figures/LCD7Desktop.png
:align: center
:alt: 7 inch LCD desktop
.. figure:: figures/LCD7Desktop.png
:align: center
:alt: 7 inch LCD desktop
Seven-inch LCD desktop
Seven-inch LCD desktop
Attach a USB keyboard and mouse, and you have a portable Bone.
`Wireless keyboard and mouse combinations <https://www.adafruit.com/products/922>`_
make a nice solution to avoid the need to add a USB hub.
Attach a USB keyboard and mouse, and you have a portable Bone.
`Wireless keyboard and mouse combinations <https://www.adafruit.com/products/922>`_
make a nice solution to avoid the need to add a USB hub.
.. _capes_miniDisplay:
#TODO# miniDisplay Cape is no longer available. Example needs to be redone with a board that is available. Removing due to broken links
Using a 128 x 128-Pixel LCD Cape
=================================
.. _capes_miniDisplay:
Problem
--------
Using a 128 x 128-Pixel LCD Cape
=================================
You want to use a small LCD to display things other than the desktop.
Problem
--------
Solution
---------
You want to use a small LCD to display things other than the desktop.
The `MiniDisplay <http://bit.ly/1xd0r8p>`_ is a 128 x 128 full-color LCD cape that just fits on the
Bone, as shown in :ref:`capes_miniDisplay_fig`.
Solution
---------
.. _capes_miniDisplay_fig:
The `MiniDisplay <http://bit.ly/1xd0r8p>`_ is a 128 x 128 full-color LCD cape that just fits on the
Bone, as shown in :ref:`capes_miniDisplay_fig`.
.. figure:: figures/MiniDisplay-A1.jpg
:align: center
:alt: miniDisplay LCD
.. _capes_miniDisplay_fig:
MiniDisplay 128 x 128-pixel LCD from CircuitCo
.. figure:: figures/MiniDisplay-A1.jpg
:align: center
:alt: miniDisplay LCD
To make this recipe, you will need:
MiniDisplay 128 x 128-pixel LCD from CircuitCo
* MiniDisplay LCD cape
To make this recipe, you will need:
Attach to the Bone and apply power. Then run the following commands:
* MiniDisplay LCD cape
.. code-block:: bash
Attach to the Bone and apply power. Then run the following commands:
# From http://elinux.org/CircuitCo:MiniDisplay_Cape
# Datasheet:
# https://www.crystalfontz.com/products/document/3277/ST7735_V2.1_20100505.pdf
bone$ wget http://elinux.org/images/e/e4/Minidisplay-example.tar.gz
bone$ tar zmxvf Minidisplay-example.tar.gz
bone$ cd minidisplay-example
bone$ make
bone$ ./minidisplay-test
Unable to initialize SPI: No such file or directory
Aborted
.. code-block:: bash
# From http://elinux.org/CircuitCo:MiniDisplay_Cape
# Datasheet:
# https://www.crystalfontz.com/products/document/3277/ST7735_V2.1_20100505.pdf
bone$ wget http://elinux.org/images/e/e4/Minidisplay-example.tar.gz
bone$ tar zmxvf Minidisplay-example.tar.gz
bone$ cd minidisplay-example
bone$ make
bone$ ./minidisplay-test
Unable to initialize SPI: No such file or directory
Aborted
.. warning::
You might get a compiler warning, but the code should run fine.
The MiniDisplay uses the Serial Peripheral Interface (SPI) interface, and it's not initialized.
The `manufacturer's website <http://bit.ly/1xd0r8p>`_ suggests enabling SPI0 by using the following commands:
.. warning::
You might get a compiler warning, but the code should run fine.
.. code-block:: shell-session
The MiniDisplay uses the Serial Peripheral Interface (SPI) interface, and it's not initialized.
The `manufacturer's website <http://bit.ly/1xd0r8p>`_ suggests enabling SPI0 by using the following commands:
bone$ export SLOTS=/sys/devices/bone_capemgr.*/slots
bone$ echo BB-SPIDEV0 > $SLOTS
.. code-block:: shell-session
bone$ export SLOTS=/sys/devices/bone_capemgr.*/slots
bone$ echo BB-SPIDEV0 > $SLOTS
Hmmm, something isn't working here. Here's how to see what happened:
.. callout::
Hmmm, something isn't working here. Here's how to see what happened:
.. callout::
.. code-block:: shell-session
......@@ -156,10 +160,10 @@ Hmmm, something isn't working here. Here's how to see what happened:
<1> Shows there is a conflict for pin `P9_21`: it's already configured for pulse width modulation (PWM).
Here's how to see what's already configured:
Here's how to see what's already configured:
.. callout::
.. callout::
.. code-block:: shell-session
......@@ -179,51 +183,51 @@ Here's how to see what's already configured:
<1> You can see the eMMC, HDMI, and three PWMs are already using some of the pins. Slot 10 shows `P9_21` is in use by a PWM.
You can unconfigure it by using the following commands:
You can unconfigure it by using the following commands:
.. code-block:: bash
.. code-block:: bash
bone$ echo -10 > $SLOTS
bone$ cat $SLOTS
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
7: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P9_42_27
8: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P9_41_27
9: ff:P-O-L Override Board Name,00A0,Override Manuf,am33xx_pwm
bone$ echo -10 > $SLOTS
bone$ cat $SLOTS
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
7: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P9_42_27
8: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P9_41_27
9: ff:P-O-L Override Board Name,00A0,Override Manuf,am33xx_pwm
Now *P9_21* is free for the MiniDisplay to use.
Now *P9_21* is free for the MiniDisplay to use.
.. note::
In future Bone images, all of the pins will already be allocated as part of the main device
tree using runtime pinmux helpers and configured at runtime using the `config-pin utility <http://bit.ly/1EXLeP2>`_.
This would eliminate the need for device tree overlays in most cases.
.. note::
In future Bone images, all of the pins will already be allocated as part of the main device
tree using runtime pinmux helpers and configured at runtime using the `config-pin utility <http://bit.ly/1EXLeP2>`_.
This would eliminate the need for device tree overlays in most cases.
Now, configure it for the MiniDisplay and run a test:
Now, configure it for the MiniDisplay and run a test:
.. code-block:: bash
.. code-block:: bash
bone$ echo BB-SPIDEV0 > $SLOTS
bone$ ./minidisplay-test
bone$ echo BB-SPIDEV0 > $SLOTS
bone$ ./minidisplay-test
You then see Boris, as shown in :ref:`capes_miniDisplayBoris`.
You then see Boris, as shown in :ref:`capes_miniDisplayBoris`.
.. _capes_miniDisplayBoris:
.. _capes_miniDisplayBoris:
Mini display Boris
==================
Mini display Boris
==================
.. note::
MiniDisplay showing Boris, :ref:`capes_miniDisplayBoris` was originally posted by David Anders at http://elinux.org/File:Minidisplay-boris.jpg
under a `Creative Commons Attribution-ShareAlike 3.0 Unported License <http://creativecommons.org/licenses/by-sa/3.0/>`_.
.. note::
MiniDisplay showing Boris, :ref:`capes_miniDisplayBoris` was originally posted by David Anders at http://elinux.org/File:Minidisplay-boris.jpg
under a `Creative Commons Attribution-ShareAlike 3.0 Unported License <http://creativecommons.org/licenses/by-sa/3.0/>`_.
.. figure:: figures/miniDisplay_Boris.png
:align: center
:alt: miniDisplay LCD showing Boris
.. figure:: figures/miniDisplay_Boris.png
:align: center
:alt: miniDisplay LCD showing Boris
Connecting Multiple Capes
==========================
......@@ -323,13 +327,13 @@ To make this recipe, you will need:
* Your other components
Many places make premade circuit boards that are laid out like the breadboard we have been using.
:ref:`capes_beaglebread_fig` shows the `BeagleBone Breadboard <http://bit.ly/1HCwtB4>`_,
which is just one protoboard option.
The `Adafruit Proto Cape Kit <https://www.adafruit.com/product/572>`_
is one protoboard option.
.. _capes_beaglebread_fig:
Beaglebread
============
BeagleBone Breadboard
~~~~~~~~~~~~~~~~~~~~~
.. note::
This was originally posted by William
......@@ -647,9 +651,9 @@ One challenge that slipped my first pass review was the board outline. The part
:ref:`tips_fritzing` is meant to represent BeagleBone Black, not a cape, so the outline doesn't have
the notch cut out of it for the Ethernet connector.
The `Fritzing custom PCB outline page <http://bit.ly/1xd1aGV>`_ describes how to create and use a custom
The `Fritzing custom PCB outline page <https://fritzing.org/pcb-custom-shape/>`_ describes how to create and use a custom
board outline. Although it is possible to use a drawing tool like `Inkscape <https://inkscape.org/en/>`_,
I chose to use `the SVG path command <http://bit.ly/1b2aZmn>`_ directly to create :ref:`capes_boardoutline_code`.
I chose to use `the SVG path command <https://www.w3schools.com/graphics/svg_path.asp>`_ directly to create :ref:`capes_boardoutline_code`.
.. callout::
......@@ -770,9 +774,9 @@ or is there a way to create another heading level?
*EAGLE*
`Eagle PCB <http://www.cadsoftusa.com/>`_ and `DesignSpark PCB <http://bit.ly/19cbwS0>`_ are two popular
`Eagle PCB <https://en.wikipedia.org/wiki/EAGLE_(program)>`_ and `DesignSpark PCB <https://en.wikipedia.org/wiki/DesignSpark_PCB>`_ are two popular
design programs. Many capes (and other PCBs) are designed with Eagle PCB, and the files are available.
For example, the MiniDisplay cape (:ref:`capes_miniDisplay`) has the schematic shown in :ref:`capes_miniDisplay_schem`
For example, the MiniDisplay cape has the schematic shown in :ref:`capes_miniDisplay_schem`
and PCB shown in :ref:`capes_miniDisplay_pcb`.
.. _capes_miniDisplay_schem:
......@@ -791,11 +795,14 @@ and PCB shown in :ref:`capes_miniDisplay_pcb`.
PCB for MiniDisplay cape
.. note::
#TODO#: The MiniDisplay cape is not currently available, so this example should be udpated.
A good starting point is to take the PCB layout for the MiniDisplay and edit it for your project.
The connectors for +P8+ and +P9+ are already in place and ready to go.
Eagle PCB is a powerful system with many good tutorials online. The free version runs on
Windows, Mac, and Linux, but it has three `limitations <http://bit.ly/1E5Kh3l>`_:
Windows, Mac, and Linux, but it has three `limitations <https://en.wikipedia.org/wiki/EAGLE_(program)#License_model>`_:
* The usable board area is limited to 100 x 80 mm (4 x 3.2 inches).
* You can use only two signal layers (Top and Bottom).
......@@ -912,7 +919,7 @@ How can you move the schematic to another tool?
Solution
---------
Use the `Upverter schematic-file-converter <http://bit.ly/1wXUkdM>`_ Python script. For example, suppose that you want
Use the `Upverter schematic-file-converter <https://github.com/ljmljz/schematic-file-converter>`_ Python script. For example, suppose that you want
to convert the Fritzing file for the diagram shown in :ref:`capes_quickRobo_fig`. First, install Upverter.
I found it necessary to install +libfreetype6+ and +freetype-py+ onto my system, but you might not need this first step:
......@@ -987,7 +994,7 @@ Now, install the ``schematic-file-converter`` tool:
-v, --version print version information and quit
--formats print supported formats and quit
At the time of this writing, Upverter suppports the following file types:
At the time of this writing, Upverter supports the following file types:
.. table::
......@@ -1095,12 +1102,12 @@ The `WikiHow article on creating Zip files <http://bit.ly/1B4GqRU>`_ might be he
Choosing "Extended Gerber" in Fritzing
Things on the `OSH Park website <http://oshpark.com>`_ are reasonably self-explanatory. You'll need to create an account and
upload the Zip file containing the `Gerber files <http://bit.ly/1B4GzEZ>`_ you created. If you are a cautious person,
you might choose to examine the Gerber files with a Gerber file viewer first. The `Fritzing fabrication FAQ <http://bit.ly/18bUgeA>`_
upload the Zip file containing the `Gerber files <https://en.wikipedia.org/wiki/Gerber_format>`_ you created. If you are a cautious person,
you might choose to examine the Gerber files with a Gerber file viewer first. The `Fritzing fabrication FAQ <https://aisler.net/partners/fritzing>`_
offers several suggestions, including `gerbv <http://gerbv.sourceforge.net/>`_ for Windows and Linux users.
When your upload is complete, you'll be given a quote, shown images for review, and presented with options for accepting
and ordering. After you have accepted the design, your `list of accepted designs <https://oshpark.com/users/current>`_
and ordering. After you have accepted the design, your `list of accepted designs <https://oshpark.com/project_history>`_
will also include the option of enabling sharing of your designs so that others can order a PCB, as well. If you are
looking to make some money on your design, you'll want to go another route, like the one described in :ref:`capes_production`.
:ref:`capes_quickbot_pcb` shows the resulting PCB that arrives in the mail.
......@@ -1165,7 +1172,7 @@ Solution
---------
`CircuitHub <https://circuithub.com/>`_ offers a great tool to get a quick quote on assembled PCBs.
To make things simple, I downloaded the `CircuitCo MiniDisplay Cape Eagle design materials <http://bit.ly/1C5uvJc>`_
To make things simple, I downloaded the `CircuitCo MiniDisplay Cape Eagle design materials <https://elinux.org/Special:Badtitle/NS500:MiniDisplay_Cape>`_
and uploaded them to CircuitHub.
After the design is uploaded, you'll need to review the parts to verify that CircuitHub has or
......@@ -1228,7 +1235,7 @@ you can find the prices for the LCDs as well, as shown in :ref:`capes_lcd_pricin
+-----------+---------+--------+----------+------------+-------------+
To enable more cape developers to launch their designs to the market, CircuitHub has
launched a http://campaign.circuithub.com[group buy campaign site]. You, as a cape developer,
launched a `group buy campaign site <https://hackaday.com/2014/11/13/circuithub-launches-group-buy-crowdsourcing-campaigns/>`_. You, as a cape developer,
can choose how much markup you need to be paid for your work and launch the campaign to the public.
Money is only collected if and when the desired target quantity is reached, so there's no risk that
the boards will cost too much to be affordable. This is a great way to cost-effectively launch your boards to market!
......
......@@ -80,7 +80,7 @@ in :ref:`case_blue`.
The `Robotics Control Library <https://beagleboard.org/librobotcontrol>`_ is a
package that is already installed on the Beagle
that contains a C library and example/testing programs. It uses the PRU to extend the
real-time hardware of the Bone by adding eight addional servo channels and one
real-time hardware of the Bone by adding eight additional servo channels and one
addition real-time encoder input.
The following examples show how easy it is to use the PRU for robotics.
......@@ -103,7 +103,7 @@ via the PRU that can be used out of the box.
.. note::
The I/O pins on the Beagles have a mutliplexer that lets you select what I/O
appears on a given pin. The Blue has the mux already configured to to run these
appears on a given pin. The Blue has the mux already configured to run these
examples. Follow the instructions in
:ref:`details_configure_servos`
to configure the pins for the Black and the Pocket.
......@@ -141,7 +141,7 @@ The ``-f 10`` says to use a frequency of 10 Hz and the ``-p 1.5`` says to set th
Discussion
------------
The BeagleBone Blue sends these eight outputs to it's servo channels. The others use the pins shown in the
The BeagleBone Blue sends these eight outputs to its servo channels. The others use the pins shown in the
:ref:`case__register_to_pin_table`.
.. _case__register_to_pin_table:
......@@ -429,164 +429,167 @@ BeagleLogic uses the two PRUs to sample at 100Msps. Getting a PRU running at 20
explaining how the PRUs get this type of performance.
NeoPixels -- 5050 RGB LEDs with Integrated Drivers (Falcon Christmas)
***********************************************************************
..
TODO This is currently broken with the latest version of Falcon Christmas (no F8-B-20.json file)
Problem
--------
NeoPixels -- 5050 RGB LEDs with Integrated Drivers (Falcon Christmas)
***********************************************************************
You have an `Adafruit NeoPixel LED string <http://www.adafruit.com/products/1138>`_,
`Adafruit NeoPixel LED matrix <http://www.adafruit.com/products/1487>`_ or
any other type of
`WS2812 LED <https://cdn-shop.adafruit.com/datasheets/WS2812.pdf>`_
and want to light it up.
Problem
--------
.. TODO Show how to drive ws2812's with FPP.
You have an `Adafruit NeoPixel LED string <http://www.adafruit.com/products/1138>`_,
`Adafruit NeoPixel LED matrix <http://www.adafruit.com/products/1487>`_ or
any other type of
`WS2812 LED <https://cdn-shop.adafruit.com/datasheets/WS2812.pdf>`_
and want to light it up.
Solution
---------
.. TODO Show how to drive ws2812's with FPP.
If you are driving just one string you can write your own code
(See :ref:`blocks_ws2812`)
If you plan to drive multiple strings, then consider
Falcon Christmas (`FPP <https://falconchristmas.com/>`_).
FPP can be used to drive both LEDs with an integrated
driver (neopixels) or without an integrated driver. Here we'll show you how to
set up for the integrated drive and in the next section the no driver LEDs will be
show.
Solution
---------
Hardware
----------
If you are driving just one string you can write your own code
(See :ref:`blocks_ws2812`)
If you plan to drive multiple strings, then consider
Falcon Christmas (`FPP <https://falconchristmas.com/>`_).
FPP can be used to drive both LEDs with an integrated
driver (neopixels) or without an integrated driver. Here we'll show you how to
set up for the integrated drive and in the next section the no driver LEDs will be
show.
For this setup we'll wire a single string of NeoPixels to the Beagle.
I've attached the black wire on the string to ground on the Beagle
and the red wire to a 3.3V pin on the Beagle.
The yellow data in line is attached to P1.31 (I'm using a PocketBeagle.).
Hardware
----------
How did I know to attach to P1.31? The FalconChristmas git repo
(https://github.com/FalconChristmas/fpp) has files that tell which pins
attach to which port. https://github.com/FalconChristmas/fpp/blob/master/capes/pb/strings/F8-B-20.json
has a list of 20 ports and where they are connected. Pin P1.31 appears on
line 27. It's the 20th entry in the list. You could pick any of the others
if you'd rather.
For this setup we'll wire a single string of NeoPixels to the Beagle.
I've attached the black wire on the string to ground on the Beagle
and the red wire to a 3.3V pin on the Beagle.
The yellow data in line is attached to P1.31 (I'm using a PocketBeagle.).
Software Setup
---------------
How did I know to attach to P1.31? The FalconChristmas git repo
(https://github.com/FalconChristmas/fpp) has files that tell which pins
attach to which port. https://github.com/FalconChristmas/fpp/blob/master/capes/pb/strings/F8-B-20.json
has a list of 20 ports and where they are connected. Pin P1.31 appears on
line 27. It's the 20th entry in the list. You could pick any of the others
if you'd rather.
Assuming the PocketBeagle is attached via the USB cable,
on your host computer browse to <http://192.168.7.2/> and you will see
:ref:`case_fpp_program_control2`.
Software Setup
---------------
.. _case_fpp_program_control2:
Assuming the PocketBeagle is attached via the USB cable,
on your host computer browse to <http://192.168.7.2/> and you will see
:ref:`case_fpp_program_control2`.
.. figure:: figures/fpp_program_control.png
:align: center
:alt: Falcon Play Program Control
.. _case_fpp_program_control2:
Falcon Play Program Control
.. figure:: figures/fpp_program_control.png
:align: center
:alt: Falcon Play Program Control
You can test the display by first setting up the Channel Outputs and then
going to *Display Testing*. :ref:`case_channel_outputs_menu2` shows where to
select Channel Outputs and :ref:`case_channel_outputs2` shows which settings to use.
Falcon Play Program Control
.. _case_channel_outputs_menu2:
You can test the display by first setting up the Channel Outputs and then
going to *Display Testing*. :ref:`case_channel_outputs_menu2` shows where to
select Channel Outputs and :ref:`case_channel_outputs2` shows which settings to use.
.. figure:: figures/fpp_channel_outputs_menu.png
:align: center
:alt: Selecting Channel Outputs
.. _case_channel_outputs_menu2:
Selecting Channel Outputs
.. figure:: figures/fpp_channel_outputs_menu.png
:align: center
:alt: Selecting Channel Outputs
.. _case_channel_outputs2:
Selecting Channel Outputs
.. figure:: figures/fpp_channel_outputs_strings.png
:align: center
:alt: Channel Outputs Settings
.. _case_channel_outputs2:
Channel Outputs Settings
.. figure:: figures/fpp_channel_outputs_strings.png
:align: center
:alt: Channel Outputs Settings
Click on the *Pixel Strings* tab. Earlier we noted that *P1.31* is attached
to port 20. Note that at the bottom of the screen, port 20 has a PIXEL COUNT
of 24. We're telling FPP our string has 24 NeoPixels and they are attached
to port 2 which in *P1.31*.
Channel Outputs Settings
Be sure to check the *Enable String Cape*.
Click on the *Pixel Strings* tab. Earlier we noted that *P1.31* is attached
to port 20. Note that at the bottom of the screen, port 20 has a PIXEL COUNT
of 24. We're telling FPP our string has 24 NeoPixels and they are attached
to port 2 which in *P1.31*.
Next we need to test the display. Select **Display Testing** shown in
:ref:`case_display_testing_menu2`.
Be sure to check the *Enable String Cape*.
.. _case_display_testing_menu2:
Next we need to test the display. Select **Display Testing** shown in
:ref:`case_display_testing_menu2`.
.. figure:: figures/fpp_display_testing_menu2.png
:align: center
:alt: Selecting Display Testing
.. _case_display_testing_menu2:
Selecting Display Testing
.. figure:: figures/fpp_display_testing_menu2.png
:align: center
:alt: Selecting Display Testing
Set the *End Channel* to *72*. (72 is 3*24)
Click *Enable Test Mode* and your matrix should light up. Try the different
testing patterns shown in :ref:`case_display_testing2`.
Selecting Display Testing
.. note::
Set the *End Channel* to *72*. (72 is 3*24)
Click *Enable Test Mode* and your matrix should light up. Try the different
testing patterns shown in :ref:`case_display_testing2`.
Clicking on the *-3* will subtract three from the End Channel, which should
then display three fewer LEDs which is one NeoPixel. The last of your NeoPixels
should go black. This is an easy way to make sure you have the correct pixel
count.
.. note::
.. _case_display_testing2:
Clicking on the *-3* will subtract three from the End Channel, which should
then display three fewer LEDs which is one NeoPixel. The last of your NeoPixels
should go black. This is an easy way to make sure you have the correct pixel
count.
.. figure:: figures/fpp_display_testing2.png
:align: center
:alt: Display Testing Options
.. _case_display_testing2:
Display Testing Options
.. figure:: figures/fpp_display_testing2.png
:align: center
:alt: Display Testing Options
You can control the LED string using the E1.31 protocol.
(https://www.doityourselfchristmas.com/wiki/index.php?title=E1.31_(Streaming-ACN)_Protocol)
First configure the input channels by going to Channel Inputs as shown in
:ref:`case_channel_inputs`.
Display Testing Options
.. _case_channel_inputs:
You can control the LED string using the E1.31 protocol.
(https://www.doityourselfchristmas.com/wiki/index.php?title=E1.31_(Streaming-ACN)_Protocol)
First configure the input channels by going to Channel Inputs as shown in
:ref:`case_channel_inputs`.
.. figure:: figures/fpp_channel_inputs.png
:align: center
:alt: Going to Channel Inputs
.. _case_channel_inputs:
Going to Channel Inputs
.. figure:: figures/fpp_channel_inputs.png
:align: center
:alt: Going to Channel Inputs
Tell it you have 72 LEDs and enable the input as shown in :ref:`case_set_inputs`.
Going to Channel Inputs
.. _case_set_inputs:
Tell it you have 72 LEDs and enable the input as shown in :ref:`case_set_inputs`.
.. figure:: figures/fpp_inputs_setup2.png
:align: center
:alt: Setting Channel Inputs
.. _case_set_inputs:
Setting Channel Inputs
.. figure:: figures/fpp_inputs_setup2.png
:align: center
:alt: Setting Channel Inputs
Finally go to the Status Page as shown in :ref:`case_status`.
Setting Channel Inputs
.. _case_status:
Finally go to the Status Page as shown in :ref:`case_status`.
.. figure:: figures/fpp_status.png
:align: center
:alt: Watching Status
.. _case_status:
Watching the status
.. figure:: figures/fpp_status.png
:align: center
:alt: Watching Status
Now run a program on another computer that generated E1.31 packets.
:ref:`case_e1.31_example` is an example python program.
Watching the status
.. _case_e1.31_example:
Now run a program on another computer that generated E1.31 packets.
:ref:`case_e1.31_example` is an example python program.
.. literalinclude:: code/e1.31-test.py
:caption: e1.31-test.py -Example of generating packets to control the NeoPixels
:linenos:
.. _case_e1.31_example:
.. literalinclude:: code/e1.31-test.py
:caption: e1.31-test.py -Example of generating packets to control the NeoPixels
:linenos:
:download:`e1.31-test.py <code/e1.31-test.py>`
:download:`e1.31-test.py <code/e1.31-test.py>`
.. TODO document the code
.. TODO document the code
.. _case_rgb_matrix:
......@@ -930,7 +933,7 @@ the *Content Setup* menu and select *File Manager*. Click the black
FPP file manager
Once your sequence is uploaded, got to **Content Steup** and select **Playlists**.
Once your sequence is uploaded, got to **Content Setup** and select **Playlists**.
Enter you playlist name (I used **fire**) and click **Add**. Then click
**Add a Sequence/Entry** and select **Sequence Only**
(:ref:`case_playlist`), then click **Add**.
......@@ -964,7 +967,7 @@ simpPRU -- A python-like language for programming the PRUs
===========================================================
`simpPRU <https://github.com/VedantParanjape/simpPRU>`_ is a simple, python-like
programming languge designed to make programming the PRUs easy.
programming language designed to make programming the PRUs easy.
It has detailed `documentation <https://simppru.readthedocs.io/en/latest/>`_ and
many `examples <https://simppru.readthedocs.io/en/latest/examples/digital_read/>`_.
......@@ -972,7 +975,7 @@ many `examples <https://simppru.readthedocs.io/en/latest/examples/digital_read/>
simpPRU is a procedural programming language that is statically typed.
Variables and functions must be assigned data types during compilation.
It is typesafe, and data types of variables are decided during compilation.
It is type-safe, and data types of variables are decided during compilation.
simPRU codes have a +.sim+ extension.
simpPRU provides a console app to use Remoteproc functionality.
......
......@@ -163,7 +163,7 @@ Installing the Latest OS on Your Bone
Problem
---------
You want to find the lastest version of Debian that is available for your Bone.
You want to find the latest version of Debian that is available for your Bone.
Solution
---------
......@@ -199,7 +199,7 @@ I've downloaded the image and need to flash my micro SD card.
Solution
---------
Get a micro SD card that has at least 4GB and preferibly 8GB.
Get a micro SD card that has at least 4GB and preferably 8GB.
There are many ways to flash the card, but the best seems to be Etcher by
https://www.balena.io/. Go to https://www.balena.io/etcher/ and download the version for your host
......@@ -229,7 +229,7 @@ Solution
------------
The image you downloaded includes `Cloud9 <https://aws.amazon.com/cloud9/>`_,
a web-based intergrated development environment (IDE) as shown in
a web-based integrated development environment (IDE) as shown in
:ref:`start_c9`.
.. _start_c9:
......@@ -240,7 +240,7 @@ a web-based intergrated development environment (IDE) as shown in
Cloud9 IDE
Just point the browswer on your host computer to http://192.168.7.2
Just point the browser on your host computer to http://192.168.7.2
and start exploring. If you want the files in your home directory to appear
in the tree structure click the settings gear and select *Show Home in Favorites*
as shown in :ref:`start_c9_show_home`.
......
......@@ -5,13 +5,13 @@ Running a Program; Configuring Pins
There are a lot of details in compiling and running PRU code.
Fortunately those details are captured in a common `Makefile` that is
used througout this book. This chapter shows how to use the `Makefile` to
used throughout this book. This chapter shows how to use the `Makefile` to
compile code and also start and stop the PRUs.
.. note::
The following are resources used in this chapter:
* `PRU Code Generation Tools - Compiler <http://software-dl.ti.com/codegen/esd/cgt_ai_64_lic_sw/PRU/2.1.5/ti_cgt_pru_2.1.5_armlinuxa8hf_busybox_installer.sh>`_
* `PRU Code Generation Tools - Compiler <https://www.ti.com/tool/PRU-CGT>`_
* `PRU Software Support Package <http://git.ti.com/pru-software-support-package>`_
* `PRU Optimizing C/C++ Compiler <http://www.ti.com/lit/ug/spruhv7b/spruhv7b.pdf>`_
* `PRU Assembly Language Tools <http://www.ti.com/lit/ug/spruhv6b/spruhv6b.pdf>`_
......@@ -212,7 +212,7 @@ You can also specify them when running ``make``.
bone$ make TARGET=gpio.pru1
The setup file also contains instructions to figure out which Beagle you are running
and then configure the pins acordingly.
and then configure the pins accordingly.
.. literalinclude:: code/gpio_setup.sh
......@@ -454,7 +454,7 @@ Configuring Pins for Controlling Servos
Problem
---------
You want to **configure** the pins so the PRU outputs are accessable.
You want to **configure** the pins so the PRU outputs are accessible.
Solution
---------
......@@ -485,7 +485,7 @@ Configuring Pins for Controlling Encoders
Problem
---------
You want to **configure** the pins so the PRU inputs are accessable.
You want to **configure** the pins so the PRU inputs are accessible.
Solution
---------
......
......@@ -44,7 +44,7 @@ shared memory (Shared RAM) as shown in :ref:`blocks_PRU_block_diagram`.
PRU Block Diagram
Each PRU accesses it's own DRAM starting at location 0x0000_0000. Each PRU
Each PRU accesses its own DRAM starting at location 0x0000_0000. Each PRU
can also access the other PRU's DRAM starting at 0x0000_2000. Both PRUs
access the shared RAM at 0x0001_0000. The compiler can control where each
of these memories variables are stored.
......@@ -565,7 +565,7 @@ that is bit 0, we'll be toggling ``P9_31``.
| | Thus we are setting the bit we selected. Finally the new |
| | value is written back to ``__R30``. |
+-----+-----------------------------------------------------------------------+
|18 | ``__delay_cycles`` is an ((instrinsic function)) that delays |
|18 | ``__delay_cycles`` is an ((intrinsic function)) that delays |
| | with number of cycles passed to it. Each cycle is 5ns, |
| | and we are delaying 100,000,000 cycles which is |
| | 500,000,000ns, or 0.5 seconds. |
......@@ -579,7 +579,7 @@ that is bit 0, we'll be toggling ``P9_31``.
.. tip::
You can read more about instrinsics in section 5.11 of the
You can read more about intrinsics in section 5.11 of the
(`PRU Optimizing C/C++ Compiler, v2.2, User's Guide <http://www.ti.com/lit/ug/spruhv7b/spruhv7b.pdf>`_.)
......@@ -685,7 +685,7 @@ to write the `on` and `off` times to the DRAM. Then inside the `while` loop we
onCount[ch] = pru0_dram[2*ch]; // Read from DRAM0
offCount[ch]= pru0_dram[2*ch+1];
to read from the DRAM when reseting the counters. Now, while the PRU is running,
to read from the DRAM when resetting the counters. Now, while the PRU is running,
the ARM can write values into the DRAM and change the PWM on and off times.
:ref:`blocks_pwm4` is the whole code.
......@@ -774,7 +774,7 @@ the speedup compared to the ``pwm4.pru0.c`` case to drop from 6x to only 1.7x.
We also have our ``for`` loop inside the ``while`` loop that can be unrolled.
Unfortunately ``UNROLL()`` doesn't work on it, therefore we have to do it by
hand. We could take the loop and just copy it three times, but that would
make it harder to maintain the code. Instead I convered the loop into a
make it harder to maintain the code. Instead I converted the loop into a
``#define`` (lines 14-24) and invoked ``update()`` as needed (lines 48-51).
This is not a function call. Whenever the preprocessor sees the ``update()``
it copies the code an then it's compiled.
......@@ -941,7 +941,7 @@ are blurred. To see what's happening, let's stop the oscilloscope.
The stopped display shows that the four channels are doing what we wanted, except
The PRU 0 channels have a period of 370ns while the PRU 1 channels at 330ns.
It appears the compiler has optimied the two PRUs slightly differenty.
It appears the compiler has optimied the two PRUs slightly differently.
Synchronizing Two PRUs
......@@ -988,7 +988,7 @@ overhead in the process so the period is longer.
.. figure:: figures/pwm8_prus_sycned.png
:align: center
:alt: pwm8.pru0 PRUs sycned
:alt: pwm8.pru0 PRUs synced
pwm8.pru0 PRUs sycned
......@@ -999,7 +999,7 @@ This isn't much different from the previous examples.
+-----+-------+---------------------------------------------------------------------------------------+
|PRU |Line |Change |
+=====+=======+=======================================================================================+
|0 |37-45 |For PRU 0 these define ``configInitc()`` which initializes the interupts. |
|0 |37-45 |For PRU 0 these define ``configInitc()`` which initializes the interrupts. |
| | |See page 226 of the |
| | |`AM335x TRM <https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf>`_ |
| | |for a diagram explaining events, channels, hosts, etc. |
......@@ -1010,8 +1010,8 @@ This isn't much different from the previous examples.
| | |to the Host-1 channel which ``configInitc()`` set up. We also clear event 16 so |
| | |PRU 0 can set it again. |
+-----+-------+---------------------------------------------------------------------------------------+
|0 |74-75 |On PRU 0 this generates the interupt to send to PRU 1. I found PRU 1 was |
| | |slow to respond to the interupt, so I put this code at the end of the loop to |
|0 |74-75 |On PRU 0 this generates the interrupt to send to PRU 1. I found PRU 1 was |
| | |slow to respond to the interrupt, so I put this code at the end of the loop to |
| | |give time for the signal to get to PRU 1. |
+-----+-------+---------------------------------------------------------------------------------------+
......@@ -1155,7 +1155,7 @@ There's a lot going on here; let's take it line by line.
|15-16 | ``onCount`` counts how many cycles the PWM should be 1 and ``offCount`` counts |
| | how many it should be off. |
+-------+---------------------------------------------------------------------------------+
|18 | ``waveform[]`` stores the analog waveform being ouput. |
|18 | ``waveform[]`` stores the analog waveform being output. |
+-------+---------------------------------------------------------------------------------+
|21-24 | ``SAWTOOTH`` is the simplest of the waveforms. Each sample is the duty cycle |
| | at that time and must therefore be between 0 and 100. |
......@@ -1244,7 +1244,7 @@ resistor. You'll see something like :ref:`blocks_lowercutoff`.
Reconstructed Sawtooth Waveform with Lower Cutoff Frequency
The high freqencies have been reduced, but the corner of the waveform has
The high frequencies have been reduced, but the corner of the waveform has
been rounded. You can also adjust the cutoff to a higher frequency and you'll
get a sharper corner, but you'll also get more high frequencies. See
:ref:`blocks_highercutoff`
......@@ -1681,7 +1681,7 @@ adjustments for the 64x32 matrix we are using.
.. admonition:: information
There's zero documention out there on how these matrices work, and no public
There's zero documentation out there on how these matrices work, and no public
datasheets or spec sheets so we are going to try to document how they work.
First thing to notice is that there are 2048 RGB LEDs in a 64x32 matrix.
......@@ -1864,7 +1864,7 @@ The sequence is:
* Put data on the R1, G1, B1, R2, G2 and B2 lines
* Toggle the clock.
* Repeat the first two steps as one row of data is transfered. There are 384 LEDs (2 rows of 32 RGB LEDs times 3 LED per RGB), but we are clocking in six bits (R1, G1, etc.) at a time, so 384/6=64 values need to be clocked in.
* Repeat the first two steps as one row of data is transferred. There are 384 LEDs (2 rows of 32 RGB LEDs times 3 LED per RGB), but we are clocking in six bits (R1, G1, etc.) at a time, so 384/6=64 values need to be clocked in.
* Once all the values are in, disable the display (OE goes high)
* Then toggle the latch (LAT) to latch the new data.
* Turn the display back on.
......@@ -1876,7 +1876,7 @@ Using the PRU we are able to run the clock a about 2.9 MKHz.
at some 6.3 MHz. So the compiler is doing a pretty good job, but you can run
some two times faster if you want to use assembly code. In fairness to FPP,
it's having to pull it's data out of RAM to display it, so isn't not a good
comparision.
comparison.
.. _blocks_rgb_fpp:
......
......@@ -4,7 +4,7 @@ More Performance
##################
So far in all our examples we've been able to meet our timing goals by writing
our code in the C programming language. The C compiler does a suprisingly
our code in the C programming language. The C compiler does a surprisingly
good job at generating code, most the time. However there are times
when very precise timing is needed and the compiler isn't doing it.
......@@ -147,7 +147,7 @@ There is much to explain here. Let's start with :ref:`more_delay`.
With 5ns/cycle this gives 7 cycles on and 6 off. These times make sense
because each instruction takes a cycle and you have, set ``R30``, jump to
``my_delay_cycles``, ``sub``, ``qbne``, ``jmp``. Plus the instruction (not seen) that
initilizes `r14` to the passed value. That's a total of six instructions.
initializes `r14` to the passed value. That's a total of six instructions.
The extra instruction is the branch at the bottom of the ``while`` loop.
......@@ -234,7 +234,7 @@ we can read using prudebug. :ref:`more_cycle_lines` is the Line-by-line.
|21 | Enables `CYCLE`. |
+-------+---------------------------------------------------------------------------------------+
|26 | Reset `CYCLE`. It ignores the value assigned to it and always sets it |
| | to 0. `cycle` is on the right hand side to make the compiler give it it's own |
| | to 0. `cycle` is on the right hand side to make the compiler give it its own |
| | register. |
+-------+---------------------------------------------------------------------------------------+
|28, 29 | Reads the `CYCLE` and `STALL` values into registers. |
......@@ -303,7 +303,7 @@ So ``cycle`` is 3 and ``stall`` is 5. It must be one cycle to clear the GPIO and
If you switch the order of lines 30 and 31 you'll see ``cycle`` is 7 and ``stall`` is 2. ``cycle`` now includes the
time needed to read ``stall`` and ``stall`` no longer includes the time to read ``cycle``.
Xout and Xin - Transfering Between PRUs
Xout and Xin - Transferring Between PRUs
*****************************************
Problem
......@@ -325,8 +325,8 @@ The ``pass:[__]xout()`` and ``pass:[__]xin()`` intrinsics are able to transfer u
:download:`xout.pru0.c <code/xout.pru0.c>`
PRU 1 waits at line 41 until PRU 0 signals it. :ref:`more_xin` sends sends an
interupt to PRU 0 and waits for it to send the data.
PRU 1 waits at line 41 until PRU 0 signals it. :ref:`more_xin` sends an
interrupt to PRU 0 and waits for it to send the data.
.. _more_xin:
......@@ -336,7 +336,7 @@ interupt to PRU 0 and waits for it to send the data.
:download:`xin.pru1.c <code/xin.pru1.c>`
Use ``prudebug`` to see registers R5-R10 are transfered from PRU 0 to PRU 1.
Use ``prudebug`` to see registers R5-R10 are transferred from PRU 0 to PRU 1.
.. code-block:: bash
......@@ -394,10 +394,10 @@ Discussion
+=======+=========================================================================================================+
|4 | A different resource so PRU 0 can receive a signal from PRU 1. |
+-------+---------------------------------------------------------------------------------------------------------+
|9-16 | ``dmemBuf`` holds the data to be sent to PRU 1. Each will be transfered |
|9-16 | ``dmemBuf`` holds the data to be sent to PRU 1. Each will be transferred |
| | to its corresponding register by ``xout()``. |
+-------+---------------------------------------------------------------------------------------------------------+
|21-22 | Define the interupts we're using. |
|21-22 | Define the interrupts we're using. |
+-------+---------------------------------------------------------------------------------------------------------+
|27-28 | Clear the interrupts. |
+-------+---------------------------------------------------------------------------------------------------------+
......@@ -408,13 +408,13 @@ Discussion
|45 | ``pass:[__]xout()`` does a direct transfer to PRU 1. Page 92 of |
| | `PRU Optimizing C/C++ Compiler, v2.2, User's Guide <http://www.ti.com/lit/ug/spruhv7b/spruhv7b.pdf>`_ |
| | shows how to use `xout()`. The first argument, 14, says to do a direct transfer to PRU 1. If the |
| | first argument is 10, 11 or 12, the data is transfered to one of three scratchpad memories that |
| | first argument is 10, 11 or 12, the data is transferred to one of three scratchpad memories that |
| | PRU 1 can access later. The second argument, 5, says to start transfering with register ``r5`` |
| | and use as many regsiters as needed to transfer all of ``dmemBuf``. The third argument, 0, |
| | and use as many registers as needed to transfer all of ``dmemBuf``. The third argument, 0, |
| | says to not use remapping. (See the User's Guide for details.) |
| | The final argument is the data to be transfered. |
| | The final argument is the data to be transferred. |
+-------+---------------------------------------------------------------------------------------------------------+
|48 | Clear the interupt so it can go again. |
|48 | Clear the interrupt so it can go again. |
+-------+---------------------------------------------------------------------------------------------------------+
:ref:`more_xin_lines` shows the line-by-line for ``xin.pru1.c``.
......
......@@ -36,7 +36,7 @@ More Git!
It is highly recommended that you go through :ref:`beagleboard-git-usage` before starting
to read and follow these guidelines. You will need to have a proper git setup on your
computer inorder to effectively follow these steps.
computer in order to effectively follow these steps.
Creating your first patch
=========================
......@@ -82,9 +82,9 @@ a patch file using the following command:
0001-contribute.rst-Add-git-section.patch
This will generate one file that is generally referred to as the patch file.
This is what you will now be sending upstream inorder to get your patch merged.
This is what you will now be sending upstream in order to get your patch merged.
But wait, there are a few more things we need to setup for sending a patch via e-mail.
That is, ofcourse your email!
That is, of course your email!
For configuring your email ID for sending patches refer to this excellent stackoverflow thread,
`configure git-send-email
......@@ -96,7 +96,7 @@ Finally, after you have configured you email properly, you can send out a patch
git send-email 0001-contribute.rst-Add-git-section.patch
replacing ofcourse the above patchfile name with whatever was your own patch.
replacing of course the above patchfile name with whatever was your own patch.
This command will then ask you ``To whom should the emails be sent (if anyone)?``
Here, you have to write the email address of the list you want to send out the patch to.
......@@ -111,7 +111,7 @@ C-Programming
It is highly recommended that you have proficiency in C-Programming, because well the kernel is mostly
written in C! For starters, you can go through Dennis Ritchie's C Programming book to understand
the language and also solve the excercises given there for getting hands on.
the language and also solve the exercises given there for getting hands on.
.. _linux-upstream-cross-arch:
......@@ -135,7 +135,7 @@ In the world of embedded, you often need to communicate with peripherals over ve
To name a few, I2C, UART, SPI, etc. are all serial protocols used to communicate with a variety of devices and
peripherals.
It's recommended to understand atleast the basics of each of the protocol so you know what's actually going
It's recommended to understand at least the basics of each of the protocol so you know what's actually going
on when you write for instance an I2C or SPI driver to communicate with let's say a sensor.
.. _linux-upstream-drivers:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment