|
1 | | -I'm using P8.11 and P8.12 for testing a rotary encoder. |
| 1 | +I have documented how-to to enable all the eqep pins: |
| 2 | +https://github.com/adafruit/adafruit-beaglebone-io-python/commit/c418cdae9a2a2c0d52412561c0125b0d227af4eb |
2 | 3 |
|
3 | | -Using cape-universal: |
| 4 | +BeagleBone must boot with cape-universal enabled and load the `cape-universala` overlay in order to |
| 5 | +use all the eQEP pins: |
| 6 | + |
| 7 | +### Install the latest Device Tree overlays: |
4 | 8 | ``` |
5 | | -debian@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots |
6 | | - 0: PF---- -1 |
7 | | - 1: PF---- -1 |
8 | | - 2: PF---- -1 |
9 | | - 3: PF---- -1 |
10 | | - 4: P-O-L- 0 Override Board Name,00A0,Override Manuf,univ-all |
11 | | - 5: P-O-L- 1 Override Board Name,00A0,Override Manuf,BB-ADC |
| 9 | +sudo apt-get upgrade bb-cape-overlays |
12 | 10 | ``` |
13 | 11 |
|
14 | | -/boot/uEnv.txt: |
| 12 | +### File: /boot/uEnv.txt |
15 | 13 | ``` |
16 | | -uname_r=4.4.47-ti-r87 |
17 | | -dtb=am335x-boneblack-overlay.dtb |
| 14 | +uname_r=4.4.62-ti-r99 |
18 | 15 | cmdline=coherent_pool=1M quiet cape_universal=enable |
| 16 | +cape_enable=bone_capemgr.enable_partno=cape-universala |
19 | 17 | ``` |
20 | 18 |
|
21 | | -Configure the pin mode for eQEP: |
| 19 | +### File: /sys/devices/platform/bone_capemgr/slots |
| 20 | +``` |
| 21 | +0: PF---- -1 |
| 22 | +1: PF---- -1 |
| 23 | +2: PF---- -1 |
| 24 | +3: PF---- -1 |
| 25 | +4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universala |
22 | 26 | ``` |
23 | | -debian@beaglebone:~$ config-pin p8.11 qep && config-pin p8.12 qep |
24 | 27 |
|
25 | | -debian@beaglebone:~$ config-pin -q p8.11 && config-pin -q p8.12 |
26 | | -P8_11 Mode: qep |
27 | | -P8_12 Mode: qep |
| 28 | +### eqep0: P9_27, P9_92 |
| 29 | +``` |
| 30 | +config-pin P9_27 qep |
| 31 | +config-pin P9_92 qep # alias for P9_42.1 |
| 32 | +cat /sys/devices/platform/ocp/48300000.epwmss/48300180.eqep/position |
28 | 33 | ``` |
29 | 34 |
|
30 | | -System info: |
| 35 | +### eqep1: P8.33, P8.35 |
31 | 36 | ``` |
32 | | -debian@beaglebone:~$ uname -a |
33 | | -Linux beaglebone 4.4.47-ti-r87 #1 SMP Mon Feb 6 22:21:49 UTC 2017 armv7l GNU/Linux |
34 | | -debian@beaglebone:~$ cat /etc/debian_version |
35 | | -8.7 |
36 | | -debian@beaglebone:~$ sudo cat /etc/dogtag |
37 | | -BeagleBoard.org Debian Image 2015-12-07 |
| 37 | +config-pin P8.33 qep |
| 38 | +config-pin P8.35 qep |
| 39 | +cat /sys/devices/platform/ocp/48302000.epwmss/48302180.eqep/position |
38 | 40 | ``` |
39 | 41 |
|
40 | | -Check the position: |
| 42 | +### eqep2: P8.11, P8.12 |
41 | 43 | ``` |
42 | | -debian@beaglebone:~$ find /sys/devices |grep eqep |grep position$ |
43 | | -/sys/devices/platform/ocp/48302000.epwmss/48302180.eqep/position |
44 | | -/sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position |
45 | | -/sys/devices/platform/ocp/48300000.epwmss/48300180.eqep/position |
46 | | -debian@beaglebone:~$ cat `find /sys/devices |grep eqep |grep position$` |
47 | | -0 |
48 | | --3251 |
49 | | -0 |
50 | | -debian@beaglebone:~$ watch -n 1 cat /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position |
| 44 | +config-pin P8.11 qep |
| 45 | +config-pin P8.12 qep |
| 46 | +cat /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position |
51 | 47 | ``` |
52 | 48 |
|
53 | | -For P8.11 and P8.12: |
| 49 | +### eqep2b: P8.41, P8.42 |
| 50 | +_alternate pins for eqep2 (mutually exclusive)_ |
54 | 51 | ``` |
55 | | -/sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position |
| 52 | +config-pin P8.41 qep |
| 53 | +config-pin P8.42 qep |
| 54 | +cat /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position |
56 | 55 | ``` |
| 56 | + |
| 57 | +### TODO: implement in corresponding methods in `Encoder.py` |
0 commit comments