cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DE12 DRDY ZYXDA interrupt not working

KSmed.1172
Associate

I configured the device and I am able to read XYZ data by polling the status register 0x27 and reading data when it is ready. I read more than 32 samples of each.

Here are my steps to read data that works:

Read register 0x0F - 0x33

Write Control register 1 - 0x07 // I can enable interrupts in register 3 before setting ODR

Write Control register 2 - 0x00

Write Control register 3 - 0x00 // Interrupts need to be set before ODR

Write Control register 4 - 0x00

Write Control register 5 - 0x00

Write Control register 1 - 0x3F // Lpen and ODR.

Loop: Poll Status register and read 6 bytes with with 0xA8 (0x28|0x80)

Now I want to use the DRDY interrupt and it is not working. I have confirmed that my interrupt code does work by externally pulling the line high. I enable my interrupt code before setting I1_ZYXDA bit in Control register 3. And per AN3308 I am setting I1_ZYXDA bit in control register 3 before setting ODR in control register 1.

Here are my steps:

Read register 0x0F - 0x33

Write Control register 1 - 0x07 // I can enable interrupts in register 3 before setting ODR

Write Control register 2 - 0x00

Write Control register 3 - 0x10 // Interrupts need to be set before ODR

Write Control register 4 - 0x00

Write Control register 5 - 0x00

Write Control register 6 - 0x00

Write Control register 1 - 0x3F // Lpen and ODR.

What is wrong?

thanks,

Kim

1 REPLY 1
Eleon BORLINI
ST Employee

Hi Kim, it seems you did well in your code. How is the DRDY connected to the MCU?

Please also check carefully if you did everything is described here below. Regards

0690X00000As5o9QAB.png