AnsweredAssumed Answered

ADXL362 not firing inactivity IRQ when not in wake-up mode

Question asked by kazola on Jun 25, 2015
Latest reply on Jun 26, 2015 by kazola

Hi, my ADXL362 is working In fact, it is ADXL363

However, I have one doubt. Please see my code.

 

// activity detection: event fired when acc. remains over threshold during specified time
WRITE_REGISTER_ADXL362(0x20,0xFA); // activity THRESH_ACT_L, bits 7-0
WRITE_REGISTER_ADXL362(0x21,0x00); // activity THRESH_ACT_H, bits 10-8
WRITE_REGISTER_ADXL362(0x22,0x1E); // activity time TIME_ACT (ex: 1E = 30 samples ~ 5s)


// inactivity detection: event fired when acc. remains below threshold during specified time
WRITE_REGISTER_ADXL362(0x23,0x96); // inactivity THRESH_INACT_L, bits 7-0
WRITE_REGISTER_ADXL362(0x24,0x00); // inactivity THRESH_INACT_H, bits 10-8
WRITE_REGISTER_ADXL362(0x25,0x1E); // inactivity time TIME_INACT


// activity and inactivity detection can be used when the accel-erometer is in either measurement mode or wake-up mode.
WRITE_REGISTER_ADXL362(0x27,0x3F); // in/activity control register, p.29, 0x3_ = loop mode, 0x_F = inactivity & activity enabled, reference modes
WRITE_REGISTER_ADXL362(0x2B,0x30); // INTMAP2, p.32, [5:4]INACT:ACT IRQ
WRITE_REGISTER_ADXL362(0x2C,0x13); // FILTER_CTL, p.33 [2:0](0=0.125, 2=0.02s, 3=0.01s, >101=0.0025s)
WRITE_REGISTER_ADXL362(0x2D,0x0E); // MODE control register, p.34 [5:4]noise, [3]wake-up mode, [2] autosleep, [1:0] = 00 standby, 10 measurement

 

If the last register (0x2D) is written with 0x0E, I can see in my logic analyzer the activity detection and inactivity detection that is nice.

 

However, if I write 0x06, so I disable wake-up mode, the activity IRQ fires but not the inactivity IRQ does not fire. Why?

Anyway, I thought wake-up and measurement mode where mutually exclusive. Which is the one operating if you set both? Wake-up mode and then measurement mode upon waking up? But this way, you may be suffering false positives, so I guess it's safer to disable wake-up mode, but then I do not detect inactivity! Maybe I'm not going into auto-sleep?

 

Hehe, so you can see my problem: I want to safely detect activity and inactivity, even if I require more current. How could I be aware of the inactivity event?

 

Please let me know what am I understanding wrong! Have the nicest day.

Outcomes