Re: Accessing SPI

Eric Fowler <[email protected]>
Newsgroups gmane.linux.uclinux.devel
Message-ID <CAC_tj_pPHpYyW3ctt9W4sWrWaJ0FD7LS4CBiPUiZg6g2gDbQwA@mail.gmail.com>
Thank you, Geert.

Now I am able to create /dev/spidev1.1 and open it from the test code
in Documents/spi.

Now I am not able to see any activity on the hardware, even though all
software seems fine.

Here is the setup:
-        SmartFusion2 board, Emcraft 1.12 distro
-       The test app Geert mentioned, built in Emcraft tree and renamed
-        No slave device, just the naked demo board
-        Oscilloscope

First I verify that the scope sees the reference signal provided by
the scope itself. It does.
When I probe pin 17 (P7->17) on the breadboard, I see it HIGH. This
looks like SPI1_SS/ (it is doc'd as such).
When I probe pin 18 on the breadboard, looking for SPI1_CLK, it is
LOW. When the port is idle, this is expected.

When I fire up the test code, I expect to see SPI1_SS/ move LOW and
the clock signal asserted during the transfer.
------I SEE NOTHING-----


Have I overlooked a step?


On Wed, Jan 29, 2014 at 2:19 AM, Geert Uytterhoeven
<[email protected]> wrote:
> On Wed, Jan 29, 2014 at 12:45 AM, Eric Fowler <[email protected]> wrote:
>> I did find a file, linux/spi/spidev.h, that has a struct defined that seems
>> to be used by user mode SPI code, but it is not clear how I am to use it, in
>> particular, which IOCTLs are available, and how I can get access to the
>> interface at low levels.
>
> Please see the Linux kernel documentation, with examples:
>
>     Documentation/spi/spidev
>     Documentation/spi/spidev_fdx.c
>     Documentation/spi/spidev_test.c
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> _______________________________________________
> uClinux-dev mailing list
> [email protected]
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by [email protected]
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev



-- 
cc:NSA
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.