I can't get signal from SPI ports.

Skip to first unread message

Mehmet Özgür Bayhan

Nov 17, 2016, 4:29:41 AM11/17/16
to BeagleBoard

I am trying to write a spi slave device driver for adxl345 accelerometer. Everything worked without error in dmesg but i cant get any data from SPI device. I can get data when i tried on raspberry pi.

I tried to catch the signal saleae logic analyzer but everything was so quiet, no signal.

1) So i changed device tree by adding:
        spi@480b8000 {
            compatible = "ti,omap2-mcspi";
            phandle = <0x175>;
            spidev@0 {
                compatible = "spidev";
                reg = <0x0>;
                #address-cells = <0x1>;
                #size-cells = <0x0>;
                spi-max-frequency = <0x7a120>;
                phandle = <0x998>;

        spidev0 = "/ocp/spi@480b8000/spidev@0";

the node apperared as  /dev/spidev3.0

2)Then i made shortcut SOMI and SIMO pins referenced to here:

And i tested device by using spidev_test.c downloaded from here :

But it returns only zeroes.

What am i missing or doing wrong?

Reply all
Reply to author
0 new messages