(Email overload!) On Sun, 16 Nov 2008 11:14:15 -0200 Werner Almesberger <[EMAIL PROTECTED]> wrote:
> By the way, another way to get better performance may be to do the > following: > > - set up the SPI hardware to do a transfer that reads all the > relevant registers in a single sweep This is already done in the interrupt handler for the data registers. The filter reset is "far" away from the data registers, so that one is read separately. > - configure the SPI controller to do DMA > > - fire this off when we get an interrupt > > - do avoid having to handle a completion interrupt, only process > the result on the next interrupt. If the next interrupt arrives > before DMA completes, ignore the interrupt. The issue I see with this is that the interrupt would contine to be asserted until we have actually read the data values, and I don't see how to handle this in a good way without visiting the interrupt handler in a loop. Anyway, perhaps a stupid question, but assuming we use some threshold configuration, is the accelerometer stuff really that much of a performance problem? If we read them at full speed (data ready interrupt), it will clearly be pretty heavy work but from my 'top' tests, it seems like most of it is spent in userspace anyway. // Simon
