Comments on: Chapter 8: Interfacing to the Beagle Board Buses http://exploringbeaglebone.com Companion Site for the Book by Derek Molloy Tue, 11 Jun 2019 04:39:22 +0000 hourly 1 https://wordpress.org/?v=5.9.2 By: Nick http://exploringbeaglebone.com/chapter8/#comment-2229 Tue, 11 Jun 2019 04:39:22 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2229 Hi Derek, I have been following along the second edition of the book and I was stuck on the spidev_test application for quite sometime now. On Pg 364, you say ‘To test SPI0 on the beaglebone, use P9_29 and P9_30’ – I think you meant SPI1 here and not SPI0 since you said in the previous page that SPI0 is not enabled by default on the bbb.

More importantly, I couldnt get neither SPI0 nor SPI1 working right off the bat. It took me a while to realize that SPI1 is also not enabled y default. I followed one of the previous comments and added the line ‘uboot_overlay_addr0=/lib/firmware/BB-SPIDEV1-00A0.dtbo’ to the /boot/uEnv.txt file. Upon rebooting I could see the data on the spidev. Now my question is whether what I have done is right or elegant. Did I miss any information that SPI1 is also not enabled by default? How could I have known (looking at a log file etc) that SPI wasnt enabled on startup?

PS:Thank you for this great forum. I am having a blast following your book and working on the bbb.

]]>
By: Nick http://exploringbeaglebone.com/chapter8/#comment-2227 Sat, 08 Jun 2019 21:55:35 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2227 In reply to conib.

Thanks a lot conib. I was following the second edition too and was wondering why my RTC wasn’t recognized on i2c1. Your comment helped me figure it out.

]]>
By: conib http://exploringbeaglebone.com/chapter8/#comment-2173 Mon, 18 Feb 2019 21:30:09 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2173 Hi Derek,

I’m now working with the 2nd edition, and have installed the Debian 9.5 2018-10-7 LXQt release on my BeagleBone Black Rev. C.

From what I’m seeing, it looks like there may have been a couple of changes that have affected usage of the I2C buses.

1. When I do a

ls -l /sys/bus/i2c/devices/i2c-*

command, I see that the I2C1 bus (memory 0x4802A000) is now mapped to /dev/i2c-1, and the I2C2 bus (memory 0x4819C000) is now mapped to /dev/i2c-2.

Are you seeing that too?

As a result, to access my DS3231 RTC when it’s on pins P9_19 and P9_20, I needed to change the i2c bus specification in the i2cdetect, i2cdump, i2cget commands from a “1” to a “2”. Etc., etc.

I then decided to move my RTC to pins P9_17 and P9_18 and enable I2C1 (and so I was able to set up the RTC as specified on pp.350-352 in the 2nd edition).

But of course I2C1 was still disabled by default.

2. In order to enable the I2C1 bus, it turns out that what we need to do now* is set:

uboot_overlay_addr0=/lib/firmware/BB-I2C1-00A0.dtbo

in /boot/uEnv.txt

and then reboot.

*see Robert Nelson’s response https://groups.google.com/forum/#!category-topic/beaglebone/beagleboardorg-beaglebone-black/8vmFsH7K9JU

]]>
By: Derek http://exploringbeaglebone.com/chapter8/#comment-2082 Mon, 30 Nov 2015 15:08:12 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2082 In reply to Dhruv.

Hi Dhruv, yes, you are correct. Thanks for letting me know! Kind regards, Derek.

]]>
By: Dhruv http://exploringbeaglebone.com/chapter8/#comment-2080 Mon, 30 Nov 2015 07:44:59 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2080 Hi Derek,

In Chapter8 Introduction to various buses, In I2C introduction you mentioned on Page No 277 7‐bit addressing is used, i.e., 0x00 to 0x80 (2^7 = 128(Decimal) = 0x80). I think 7 bit address do not include 0x80, 7 bits addresses from 0x00 to 0x7F ( total 128 not including 0x80). Sorry and please correct me if I am wrong.

]]>
By: TheBBB http://exploringbeaglebone.com/chapter8/#comment-2078 Thu, 26 Nov 2015 06:55:32 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2078 I am getting the below response. Seems like the wiring is also correct. Is this because any common ground issue or something or has it got anything to do with the program. spidev1.0 is what listed in dev folder after activating spi. Also I haven’t disabled HDMI. I used a variable resister for varying the analogue voltage input to ADC (MCP3008). There are no errors even. Please help.

Starting EBB SPI ADC Example
Response bytes are 0,0
This is the value 0 out of 1024.
End of EBB SPI ADC Example

]]>
By: Ben http://exploringbeaglebone.com/chapter8/#comment-2076 Tue, 17 Nov 2015 17:23:34 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2076 In reply to Phil.

Hey Phil
I believe you haven’t exported $SLOTS
What do you get when you type “echo $SLOTS”?
If it is empty set the value by typing (from page 233) “export SLOTS=/sys/devices/bone_capemgr.9/slots”

Ben

]]>
By: Ben http://exploringbeaglebone.com/chapter8/#comment-2074 Tue, 17 Nov 2015 17:23:14 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2074 In reply to Phil.

Hey Phil
I believe you havn’t exported $SLOTS
What do you get when you tpye “echo $SLOTS”?
If it is empty set the value by typing (from page 233) “export SLOTS=/sys/devices/bone_capemgr.9/slots”

Ben

]]>
By: kal http://exploringbeaglebone.com/chapter8/#comment-2062 Sun, 04 Oct 2015 13:26:09 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2062 In reply to Derek.

Hi Dereck,
Thanks for your reply and valuable time.
I did some investigation using stty and it seems that my BBB ttyO4 got the canonical mode by default. So I added this line in the BBBEcho.c: options.c_lflag &= ~(ICANON|ECHO);

it is working fine with this but I don’t understand if I get this configuration because I updated the BBB SW recently

Thanks again

Kal

]]>
By: Phil http://exploringbeaglebone.com/chapter8/#comment-2058 Tue, 29 Sep 2015 01:12:57 +0000 http://exploringbeaglebone.com/?page_id=767#comment-2058 Hi Derick,
Hard to imagine how you keep up with all these question. Thanks for your great work.

Trying to get UART4 going on 3.8.13 flavor.
When I type the correct command (as I understand it) I get the following:

root@e14BB-1:/lib/firmware# sudo sh -c “echo BB-UART4 > $SLOTS”
sh: 1: Syntax error: end of file unexpected

So not sure where to proceed next.

Thanks for your fine work.
Phil

]]>