Beaglebone Green SPI

162 Views Asked by At

New out of the box Beaglebone Green. Trying to use SPi) on P19 17,18, 21,22.

At first boot, gpioinfo shows

line 2: "SPI0_SCLK" "P9_22" input active-high [kernel]
line 3: "SPI0_D0" "P9_21" input active-high [kernel]
line 4: "SPI0_D1" "P9_18" input active-high [kernel]
line 5: "SPI0_CS0" "P9_17" input active-high [kernel]
line 6: "SPI0_CS1" "cd" input active-low [kernel]

SPI has no output on pins

Search web and find I need to add to uEnv.txt:

uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo

now gpioinfo shows

line 2: "SPI0_SCLK" unused input active-high
line 3: "SPI0_D0" unused input active-high>br> line 4: "SPI0_D1" unused input active-high
line 5: "SPI0_CS0" unused input active-high
line 6: "SPI0_CS1" "cd" input active-low [kernel]

SPI signals are now "wiggling" but... SPI CLK looks fine but MOSI looks like something is pulling it down. Scope screen shot is of MOSI when running spitest

Image of MOSI during SPItest.

BTW, just looking at MOSI at P9 with nothing attached so its not the device on the other end causing an issue.

Am I missing something?

Thanks

1

There are 1 best solutions below

0
De Funct On

to debug this a bit better:

Please give the output of:

  1. uname -a
  2. cat /etc/dogtag

I use kernel 4.19.x and 5.10.x on different BBG SiP SBCs. If you go to the forums, they have some updated images that handle updated Bullseye images.

The link to those images are here:

  1. https://forum.beagleboard.org/t/debian-11-x-bullseye-monthly-snapshots/31280#debian-11x-bullseye-iot-snapshot-12

Once this is installed, you can use the updated way of handling kernel and image changes via apt on Debian Linux.

  1. sudo apt install bbb.io-kernel-5.10-ti-am335x

That command can be found here w/ the many branches to check out:

  1. https://forum.beagleboard.org/t/debian-10-x-11-x-kernel-updates/30928

Once you have some preliminary updates configured, it will be easier to handle the SPI devices via /dev/spidev* .

Once, you have these updates/upgrades configured, checking for /dev/spidev* is as easy as:

ls -l /dev/spidev*

or...

You can check in /dev/bone/spi.