Skip to content

Commit 6c04e3f

Browse files
authored
Encoder: updated README
1 parent c7e5c94 commit 6c04e3f

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

Adafruit_BBIO/README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,47 @@
1-
# Adafruit_BBIO.Encoder module
1+
# Adafruit_BBIO.Encoder
22

3-
This module enables access to the Beaglebone Black enhanced Quadrature Encoder Pulse (eQEP) modules: eQEP0, eQEP1 and eQEP2.
4-
5-
Initially based on the [PyBBIO](https://github.com/graycatlabs/PyBBIO/bbio/libraries/RotaryEncoder/rotary_encoder.py) rotary encoder code.
3+
This module enables access to the Beaglebone Black enhanced Quadrature Encoder Pulse (eQEP) modules: eQEP0, eQEP1 and eQEP2/eQEP2b.
64

75
## Prerequisites
86

9-
These instructions are based on a 4.4.x Linux kernel.
10-
11-
In order to use all eQEP pins the BeagleBone must boot with the [cape-universal](https://github.com/beagleboard/bb.org-overlays/tree/master/tools/beaglebone-universal-io) enabled, and load the cape-universal overlay
12-
13-
```
14-
enable_uboot_cape_universal=1
15-
```
7+
These instructions are based on:
168

17-
Notes:
18-
- It seems that the `cape-universal` cape _does only enable access to eQEP0 and eQEP2_. TBD: check how to load [`cape-universala`](https://github.com/cdsteinkuehler/beaglebone-universal-io/pull/30)
19-
- An alternative option to the `cape-universal` overlay would be to load one of the [dedicated eQEP overlays](https://github.com/Teknoman117/beaglebot/tree/master/encoders/dts).
9+
- Linux kernel: 4.4.x or later
10+
- `bb-cape-overlays` package: version 4.4.20171120.0-0rcnee1~stretch+20171120 or later
11+
- `bb-customizations` package: version 1.20171123-0rcnee0~stretch+20171123 or later
2012

21-
### Install/upgrade the latest Device Tree overlays
13+
It's recommended to run the following command to ensure you have the latest required packages:
2214

2315
```
24-
sudo apt-get upgrade bb-cape-overlays
16+
sudo apt upgrade bb-cape-overlays bb-customizations
2517
```
2618

27-
### Load the universal cape
19+
In order to use all eQEP pins the BeagleBone must boot with the [cape-universal](https://github.com/beagleboard/bb.org-overlays/tree/master/tools/beaglebone-universal-io) enabled, and load the `cape-universal` overlay.
2820

29-
If it doesn't already contain it, modify the `/boot/uEnv.txt` file to contain this line:
21+
This is the default, thus **no further steps are initially required to use eQEP0 and eQEP2**. Simply double-check that the following line is present and not commented out on your `/boot/uEnv.txt` file:
3022

3123
```
3224
enable_uboot_cape_universal=1
3325
```
3426

35-
Notes:
27+
Note: Some older documentation recommends using the `cmdline` and `cape_enable` options instead. They are meant to load deprecated kernel-based overlays and it's not recommended to use them. Use the new way of [loading overlays via uboot](https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays) instead, as instructed above.
28+
29+
### Enabling additional eQEP modules
3630

37-
- Some older documentation recommends using these two lines instead. They are meant to load deprecated kernel-based overlays and it's not recommended to use them. Use the new way of [loading overlays via uboot](https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays) instead, as instructed above.
31+
The `cape-universal` overlay will enable access to the eQEP0 and eQEP2 modules. As it does not expose pins that are shared with the HDMI interface, eQEP1 and eQEP2b will **not** be available.
3832

39-
```
40-
cmdline=cape_universal=enable # Plus some other options
41-
```
42-
```
43-
cape_enable=bone_capemgr.enable_partno=cape-universala
44-
```
45-
- TBD: check the overlays that are currently loaded
33+
To disable the HDMI interface and gain access to the pins and peripherals that share its pins, comment out the following line on the `/boot/uEnv.txt` file and reboot:
34+
35+
```
36+
disable_uboot_overlay_video=1
37+
```
4638

4739
## eQEP configuraton
4840

49-
Note: if either eQEP1 or eQEP2b are used on the Beaglebone Black, video must be disabled, as their pins are shared with the LCD_DATAx lines of the HDMI interface.
41+
Notes:
42+
43+
- If either eQEP1 or eQEP2b are used on the Beaglebone Black, video must be disabled, as their pins are shared with the LCD_DATAx lines of the HDMI interface.
44+
- eQEP2 and eQEP2b are the same module, but with the alternative of accessing it via two sets of pins. These are mutually exclusive.
5045

5146
### eQEP0
5247

@@ -91,7 +86,12 @@ $ config-pin P8.41 qep
9186
$ config-pin P8.42 qep
9287
$ cat /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position
9388
```
89+
90+
## Credits
91+
92+
Initially based on the [PyBBIO](https://github.com/graycatlabs/PyBBIO/bbio/libraries/RotaryEncoder/rotary_encoder.py) rotary encoder code.
93+
9494
## Further reading
9595

96-
- [Beaglebone encoder inputs](https://github.com/Teknoman117/beaglebot/tree/master/encoders)
97-
- [Beaglebone eQEP overlays](https://github.com/Teknoman117/beaglebot/tree/master/encoders/dts)
96+
1. [Beaglebone encoder inputs](https://github.com/Teknoman117/beaglebot/tree/master/encoders)
97+
1. [Beaglebone eQEP overlays](https://github.com/Teknoman117/beaglebot/tree/master/encoders/dts)

0 commit comments

Comments
 (0)