Interesting info on spidev, but it doesn't surprise me.  Isn't that
because they are non blocking read/writes to manage slow spi clocks,
etc?  The calls end up in spi_sync, that says "This call may only be
used from a context that may sleep" so I would expect not so good
performance with this.  My first thought would be a blocking/non
sleeping hardware call, although I am not clear if this would require
direct register calls to the spi memory locations.  With a 10mhz spi
ic maybe that would take too long.

On Thu, Oct 13, 2016 at 5:33 PM, Jeff Epler <jep...@unpythonic.net> wrote:
> If your device uses PREEMPT-RT realtime, then you can use any userspace
> interface (ioctl, read, write, recv, send, etc) that gives you
> acceptable latency in practice.  Otherwise, you basically get to do
> direct memory-mapped control of the applicable registers in your SOC,
> because for xenomai and rtai you can't use standard kernel or syscall
> interfaces in realtime context (but you can for setup/cleanup code, for
> instance to get actually map MMIO regions)
>
> The SPI hardware interface, with /dev/spidev as a userspace API, is
> perfect on paper; however, I have experenced that the quality of the
> driver implementation is often poor, both in latency and in, well,
> actually working!
>
> Here are some notes about various ARM SBCs and SPI interface hardware.
> Except for odroid c2, these are all my direct experience.
>
> odroid u3: /dev/spidev working with good latency (good enough for 1kHz)
> after kernel driver modifications, linuxcnc driver hm2_spi, mesa 7i90
> fpga card
>
> odroid c2: reported non-working (only supports 8-bit transfers)
>
> odroid xu4: does not honor spidev byte order ioctl (hardcoded in
> devicetree).  poor latency even after kernel driver modifications
> (probably ok for 500Hz, probably not for 1kHz).  hm2_spi driver again.
>
> raspberry pi 3: only supports 8-bit transfers.  contributed
> register-level driver, confirmed working on preempt-rt (only--will need
> work for other supported rtoses), hm2_rpspi
>
> Jeff
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to