Showing results for 
Search instead for 
Did you mean: 

LSM303DLHC drdy interrupt

Associate II
Posted on October 08, 2014 at 09:04

I have a STM32F3-discovery board, and I have set up a little test.

It just captures ALL input on GPIO3 and count them by channel.

Then every seconds, I have a breakpoint with which I look at the numbers, and reset them.

I am getting a correct number of interrupt, according to ODR setup, for the on-board sensor L3G4200D (channel 1) and for the mangetometer (DRDY, channel 2) part of


ButI can't make the accelerometer interrupt work. I've tried many ways, but basically I think the correct and most basic configuration should be:

CTRL_REG1_A (20h), turn on sensor (ODR != 0)CTRL_REG3_A (22h), I1_DRDY1 bit to 1

and then see the interrupt coming to channel 4 based.

Please note I also see ~700 interrupt on channel 3 (which is pin CS_SPI).

Channel seems correct from

, so I think is an accelerometer problem.

Also note that I still call in a loop the accelerometer read, with, according to ZYXDA data ready bit of register STATUS_REG_A (27h) output the data at correct ODR (tried many ODR), so the interrupt should be fired (gyrosocpe wasn't firing new DRDY interrupt unless you read the data register).