Hi, I am using LIS3MDL https://learn.adafruit.com/lis3mdl-triple-axis-magnetometer/pinouts. From the pinout description, it says that DRDY-when measurement data is available the sensor will pull this pin low. However, I connected this DRDY pin to the D2 pin of Nano 33 BLE board, and it was HIGH from the D2 pin (should be data-ready status). After the magnetic measurement was read, the pin goes to LOW. Could you explain why it is opposite as the pinout description?
Additionally, is it possible to use DRDY output as the interrupt signal? I tried, but the DRDY pin always shows HIGH, it cannot generate a rising or falling edge.
Thank you very much.
The functions of all the pins are fully explained in the LIS3MDL data sheet. You have to send specific commands to the sensor in order to activate DRDY as an interrupt output.
Your post has contradictory statements about the output levels measured for DRDY. Please explain.
Many thanks.
But from the INT_CFG and INT_SRC registers in the LIS3MDL datasheet, I did not find which bit can be used for enabling data-ready interrupt on the INT pin.
If I use the DRDY pin as the interrupt pin, the output level is always HIGH even before the sensor is enabled. Therefore, when the new data is ready there is no output level change at the DRDY pin. It changed to be LOW only when the OUT_X/Y/Z_L/H registers are read.
The output levels measured for DRDY is: HIGH (when data is ready), LOW (after OUT registers are read).
Sorry, I confused DRDY with INT. The data sheet is rather sketchy. Check whether there is an application note that goes into more detail on the pin functions.