Trouble using SPI interfaces on new BBBW

80 views
Skip to first unread message

Garth Webb

unread,
May 17, 2017, 10:43:12 PM5/17/17
to BeagleBoard
Hi, after I setup Wireless on my BBBW, I tried using the SPI interface using this simple Python code:

    #import the library
    from Adafruit_BBIO.SPI import SPI


    spi
    = SPI(0,0)
    spi
    .writebytes(5)

  1. When executed using sudo it runs without error.  However, using a logic analyzer, I see no activity on either of the SPI pins (spi0 or spi1).  I found the config-pin utility and tried using that to set the pins I need to spi.  That command worked for the spi0 pins but returned an error (about univerala not being loaded) for spi1.  Testing the spi0 pins that did respond to config-pin yielded no results.

    Finally, from an earlier conversation in this group, I followed these instructions (minus the eMMC steps) to address loading univerala:

    https://github.com/RobertCNelson/linux-stable-rcn-ee/issues/1#issuecomment-296234338

After this I was able to run confi-pin on all spi pins.  However when I ran my simple test python script, I saw no output on my logic analyzer and the command froze.  I couldn't CTRL-C out of it and it would not die with a kill -9.  

Has anyone been able to use the SPI interfaces?  I need to use both at the same time (one as a master, one as a slave) which is why I purchased the BBBW over other boards that only have one SPI interface.
 

Robert Nelson

unread,
May 17, 2017, 10:59:55 PM5/17/17
to Beagle Board, garth...@gmail.com
Did you disable hdmi-audio? spi1 is tied up in the audio driver..

With u-boot overlays:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Image_Testing_Snapshots

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays

in /boot/uEnv.txt make sure to set:

disable_uboot_overlay_audio=1

then reboot and retry with config-pin..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Garth Webb

unread,
May 18, 2017, 11:24:35 AM5/18/17
to Beagle Board, Robert Nelson
In the link I gave above (I think it was your advice actually) I added these lines to /boot/uEnv.txt:

enable_uboot_overlays=1
disable_uboot_overlay_audio=1
enable_uboot_cape_universal=1

After rebooting with these settings, config-pin worked on pins P9.28 through P9.31 where previously it complained that universala was not loaded.  However, this is also when the python script that tried to write to these pins started to hang. 

Robert Nelson

unread,
May 18, 2017, 11:36:33 AM5/18/17
to Garth Webb, Drew Fustini, Beagle Board
On Thu, May 18, 2017 at 10:24 AM, Garth Webb <garth...@gmail.com> wrote:
> In the link I gave above (I think it was your advice actually) I added these
> lines to /boot/uEnv.txt:
>
>> enable_uboot_overlays=1
>> disable_uboot_overlay_audio=1
>> enable_uboot_cape_universal=1
>
>
> After rebooting with these settings, config-pin worked on pins P9.28 through
> P9.31 where previously it complained that universala was not loaded.
> However, this is also when the python script that tried to write to these
> pins started to hang.

Garth,

What version of the Adafruit_BBIO library?

CC'ing Drew, maintainer of that that library. (he's on the road this week)

Garth Webb

unread,
May 18, 2017, 12:01:16 PM5/18/17
to Robert Nelson, Drew Fustini, Beagle Board
I'll check, but I won't be able to try this until tonight.  However this brings up another question; is there something I can try directly on the /dev/* devices to see if there is any problem at that level (and isolate any potential problems in the python lib)?

Garth Webb

unread,
May 19, 2017, 2:50:37 AM5/19/17
to Robert Nelson, Drew Fustini, Beagle Board
I'm running Adafruit-BBIO Version: 1.0.0.

Drew Fustini

unread,
May 27, 2017, 10:50:30 AM5/27/17
to Beagle Board, Robert Nelson, Drew Fustini
Are you still having issues with Adafruit_BBIO?

thanks,
drew
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAMK9r2Xj3tM6aKwnJSfv%3Dkp_VwaLC%2BfeYyqnk1epW9ShHQwfzQ%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages