Not Getting SPI Clock Signals in Beaglebone

Hello,
I need help i am newbie for Linux, i am using beagle-bone black i want to do SPI communication between BBB and another MCU. I need detailed guidance because this is not my subject. I tried to run lots of example codes and tried to take signals in DSO unfortunately i am not getting it.

regards,
Prial

  1. Are sure you scope is setup correctly and you know for fact that it will trigger on spi?

  2. Do you have the correct device tree loaded that will enable spi.

  3. What examples are you using?

I don’t work with spi, however this would be my first round of troubleshooting if things did not work.

Several others on this forum have experience with spi and bbb, more than likely they will be able to help resolve this for you.

How i debug my scope & trigger SPI
I dont know which dtbo i have to use to enable SPI
These examples i used
1st
2nd
spi1.c (14.0 KB)
spi2.c (3.2 KB)
spi3.c (1.3 KB)
spi_dev.c (2.5 KB)

More than likely that is your problem.

I have not tested these overlays:

BB-SPIDEV1-00A0.dtbo
BB-SPIDEV0-00A0.dtbo

You will need to search the target to make sure these overlays are installed on the board. When they are found note the path. Then edit your /boot/uEnv.txt file and add that path.

In addition to the overlays, you may also need to manually load the SPIDEV kernel module. Check with lsmod to see if it is loaded.

1 Like

I tried these dtbo, but still unable to generate clock.

following thing is added
spidev 20480 0

can you run beagle-version (sudo beagle-version if not root) and paste the output.

best reference that I know is Derek Molloy Book https://www.amazon.com/Exploring-BeagleBone-Techniques-Building-Embedded-ebook/dp/B07MMVV65W

the SPI exercise in this book is accomplished without overlays or kernel modifications… it clearly explains the basics like the difference between master and slave device (your questions do not indicate that you understand this) … once you have identified whether BBB is master or slave, then the next round of questions will / would follow.

good luck
gomer