Hello
We are trying to incorporate motion detection into our system with the help of ADXL362.
I am not able to get correct X/Y/Z values in self test mode or any other (I am able to read the values but they are always 0).
The strange thing is that while manufacture ID is ok, and REVID is 0x02, the PARTID is always read as 0 which contradicts data sheet.
Why this can happen? May be this can explain malfunction of ADXL?
Also we use the following configuration:
// Disable FIFO
AccelWriteReg(FIFO_CONTROL, 0);
// Set an activity threshold
AccelWriteReg(THRESH_ACT_H, 0);
AccelWriteReg(THRESH_ACT_L, 15);
val = AccelReadReg(THRESH_ACT_L);
AccelWriteReg(TIME_ACT, 0);
// Setup inactivity threshold
AccelWriteReg(THRESH_INACT_L, 105);
val = AccelReadReg(THRESH_INACT_L);
AccelWriteReg(THRESH_INACT_H, 0);
// Setup inactivity detection to be 2 sec
AccelWriteReg(TIME_INACT_H, 0);
AccelWriteReg(TIME_INACT_L, 37);
val = AccelReadReg(TIME_INACT_L);
// Enable interrupt on transition change
AccelWriteReg(INTMAP1, 0xF1);
val = AccelReadReg(INTMAP1);
// 2G @ 12.5 Hz
AccelWriteReg(FILTER_CTL, 0);
// Setup power control: enable AUTOSLEEP
AccelWriteReg(POWER_CTL, 0x02);
// Enable activity/inactivity in loop mode
AccelWriteReg(ACT_INACT_CTL, 0x37);
val = AccelReadReg(ACT_INACT_CTL);
while (1)
{
status = AccelReadReg(STATUS);
pin = GPIO_PinRead(ACCEL_ISR_PORT, ACCEL_EXTI_PIN);
osDelay(1000);
}
The status is always read as 0x40 or 0x41...So no activity or inactivity is ever detected...
Thanks
Igor