ST Micro LIS3L02DQ 3D accelerometer. SPI device, no buffering, interrupt pin
raised high on new data being available. Currently the driver assumes, if
interrupts are enabled, that this is connected to a specified gpio.
(http://www.st.com/stonline/books/pdf/docs/10175.pdf)
FWIW: I have this device talking to a PIC-18 and pushing the results
over the serial port.
WRT linux support, I can't think of a generalized way to create a driverYes, and that means we would use the delights of platform data and the generic gpio subsystem. Although I believe generic gpio isn't available on every platform as yet, it is getting there and is certainly in place for ARM (and cleans up an awful lot of hardware interfaces!)
that would be able to be used with this device in Linux. You need to
know witch IRQ line the DR line is connected too, and if you are
bit-banging the SPI data off the thing, then you need to know which
GPIO's of the host CPU you'll be using.
If you have SPI hardware thenYes, the intention would not be to generalize the hardware comms, but rather the
you need to know where to pull the data from. The problem doesn't seem to
generalize well.
Also, If you are playing with accelerometer data, you likely need someDefinitely. Obviously the accuracy of this time stamp is going to be limited by
real time support or at lest a reliable time stamping of the data to do
anything interesting.
Another problem area is around SPI itself. There are variations ofIndeed. This is well handled by the SPI subsystem. I've spent far too much time with a scope recently fiddling with these parameters for badly documented chips!
device implementations around chip select polarity, clock biasing
(rising,falling, or midpoint) sampling from one SPI part to the next.
Agreed. With this sort of device two modes would be needed (and are supported by the hardware). The first gives direct data access and the second uses the ring buffer. Which you use would obviously be dependent on the application. Some applications want the most recent data on all occasions, whilst some will be more interested in ensuring that all data is captured.VTI SCA3000 E05 3D accelerometer equiped with substantial ring buffer. SPI
device. Can operate either in buffered or direct mode. In buffered mode, interrupts
can be used to indicate when the ring buffer is 3/4 full triggering a download to
a larger ring buffer in the kernel if necessary.
(http://www.vti.fi/en/products-solutions/products/accelerometers/sca3000-accelerometers/)
ring buffered data can make RT applications harder...
Would be nice if practical to allow the framework to include RS232 devices such
as those from www.xsens.com, www.isense.com and others.
I'm not sure what you are asking for, you started off with SPI driver
for interfacing a handful of accelerometer devices. Now your talking
about the serial port.
Besides the consumer of accelerometer data is user space applications
(mine attempt to be somewhat RT applications)