[Gta04-owner] BMA180 interrupts & polling interval

Christoph Mair christoph.mair at gmail.com
Wed Jun 12 14:32:01 CEST 2013


Hi Lukas,

On Wed, Jun 12, 2013 at 2:11 PM, Lukas Märdian <luk at slyon.de> wrote:
> which is too big for my use case. I'd need a 1 usec or at least 10 usec
> polling interval.

I'm not sure what interrupt latency you can expect from the linux
kernel but even calling a kernel function every millisecond seems
critical to me. Doing it every microsecond will not work.


> Can anybody tell, who I can switch the bma150 driver into
> "Interrupt-Mode", to e.g. listen to the "High-G" or "Low-G" interrupts
> (from userspace)? Or how I can lower the polling interval in the driver?

Calling userspace code will be much slower because because of context switches.


> Or do you have any other idea how it could be possible to trigger an
> event (e.g. call a function) at the very same time (microsecond range)
> on several GTA04s, without using any networking capabilities?

I would try to listen to a "tap" or "shock" interrupt which the sensor
should be able to generate as soon as it senses a big change in
acceleration and then capture and timestamp this event in kernel
space. Probably the standard driver does not support this feature so
you either have to hack your own driver or you need to fix the
existing one.

Hope that helps,
  Christoph


More information about the Gta04-owner mailing list