Closed MantisClone closed 10 years ago
mmh, maybe this has to do with the kernel version ? What is your kernel version ? I read that at some point the way the pinmuxing is done was changed.
You can see if things are working if the Z-axis outputs steps. X and Y are working just with the default configuration, but Z (and possibly others) require the device overlay.
When I come home tonight, I'll check out my kernel version. Also the 800 output looks kindof strange. Can you replace 'awk' with 'gawk' in the script and see if this makes a difference ?
And yeah, you can of course ask questions.
Ah, I just played with this on my workstation, looks like gawk actually might behaving different than the script expects. Can you replace 'awk' with /usr/bin/mawk and see if that fixes it ?
I used
uname -r
and it found my kernel version is 3.8.13. I'll also say that I'm fairly new to linux and embedded programming so I'm new to using grep and awk and regex. I tried mawk as you said and it wasn't found so I'm assuming I need to install it still. I'll be working on it a bit more tomorrow.
Can you try again ? I've now removed one implicit assumption about awk being able to parse hex numbers.
For reference, my kernel is 3.8.13-bone28
I think it worked.
My output looks like this:
root@beaglebone:~/Desktop/beagleg# ./beagleg-cape-pinmux.sh
This is how these pins look before.
pin 84 (44e10950) 00000037 pinctrl-single
pin 85 (44e10954) 00000037 pinctrl-single
pin 86 (44e10958) 00000062 pinctrl-single
pin 87 (44e1095c) 00000062 pinctrl-single
pin 89 (44e10964) 00000027 pinctrl-single
pin 96 (44e10980) 00000037 pinctrl-single
pin 97 (44e10984) 00000037 pinctrl-single
pin 109 (44e109b4) 00000027 pinctrl-single
pin 12 (44e10830) 00000027 pinctrl-single
pin 13 (44e10834) 00000027 pinctrl-single
pin 14 (44e10838) 00000027 pinctrl-single
pin 15 (44e1083c) 00000027 pinctrl-single
pin 16 (44e10840) 00000027 pinctrl-single
pin 17 (44e10844) 00000027 pinctrl-single
pin 18 (44e10848) 00000027 pinctrl-single
pin 19 (44e1084c) 00000027 pinctrl-single
pin 30 (44e10878) 00000037 pinctrl-single
Adding BeagleG overlay
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,BeagleG
This is how these pins look afterwards. They should all have mode 00000007
pin 84 (44e10950) 00000007 pinctrl-single
pin 85 (44e10954) 00000007 pinctrl-single
pin 86 (44e10958) 00000007 pinctrl-single
pin 87 (44e1095c) 00000007 pinctrl-single
pin 89 (44e10964) 00000007 pinctrl-single
pin 96 (44e10980) 00000007 pinctrl-single
pin 97 (44e10984) 00000007 pinctrl-single
pin 109 (44e109b4) 00000007 pinctrl-single
pin 12 (44e10830) 00000007 pinctrl-single
pin 13 (44e10834) 00000007 pinctrl-single
pin 14 (44e10838) 00000007 pinctrl-single
pin 15 (44e1083c) 00000007 pinctrl-single
pin 16 (44e10840) 00000007 pinctrl-single
pin 17 (44e10844) 00000007 pinctrl-single
pin 18 (44e10848) 00000007 pinctrl-single
pin 19 (44e1084c) 00000007 pinctrl-single
pin 30 (44e10878) 00000007 pinctrl-single
root@beaglebone:~/Desktop/beagleg#
And also, I think I've finally figured out what the value of your OFFSETS_800 variable is. That's a tough line to figure out, but it's basically taking your device tree overlay file, taking only the lines with hex numbers (0x) in them, parsing out the first of the two arguments on each line (the offset). You then format that offset into the form 44e10<offset +2048> and store it to OFFSETS_800. If there's anything glaringly wrong with that previous description let me know.
Yes. Also I add 0x800 (2048) to it to give the full address. All of these things are not really needed in this script, as only copy the binary file to /lib/firmware and echo "BeagleG" > $SLOTS is necessary. The offset thing is just as a way to look at the PINS and see if their modes changed.
Glad it now works on your board.
Pin display loop only displays pin 0. I changed $SLOTS to have bone_capemgr.8 because I couldn't find .9 on my board. I'm unsure if the overlay actually changed the pin modes. Output is shown below.
I'm very interested in your work by the way. Is it okay if I come to you with specific questions about the code if they come up?