cancel
Showing results for 
Search instead for 
Did you mean: 

LSM303DLHC data ready interrupts for STM32F3-Discovery

adam239955
Associate II
Posted on July 27, 2015 at 18:11

LSM303DLHC Data Sheet says

The LSM303DLHC features two data-ready signals (RDY) which indicate when a new set of measured acceleration data and magnetic data are available

but Figure 4 only shows one DRDY pin out, does that mean that when the pin is set, both accelerometer and compass has new data, or do I have to check status/ctrl registers to see if accelerometer or magnetometer has data? #lsm303dlhc-mag #stm32f3 #stm32f3 #lsm303dlhc #drdy
2 REPLIES 2
Posted on July 27, 2015 at 19:25

It also has two interrupt pins (INT1 / INT2) which DRDY1 and DRDY2 can be mapped too.

You're going to have to read through the part documentation and puzzle through the functionality and connectivity options.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
adam239955
Associate II
Posted on September 02, 2015 at 18:11

Ok, it seems that the DRDY line in the LSM303DLHC datasheet refers to the magnetometer interrupt which is connected to GPIO pin PE2 on STM32F3-Discovery

However, when I read the data using the

COMPASSACCELERO_IO_Read

the DRDY line doesn't go low immediately, it remains high until it periodically generates new magnetometer data. Is there anything to do besides reading the 6 bytes of the magnetometer values?

Using the same function to read the accelerometer values works flawlessly, the DRDY (which is mapped to INT1) goes low as soon as I have read the accelerometer values.