AnsweredAssumed Answered

ADXL362 unable to detect activity threshold

Question asked by Pratiksha.bhuta on Jan 13, 2017
Latest reply on Apr 5, 2017 by dwilson

i have configured the ADXL362 as follows with activity threshold to 250mg inativity threshold to 150mg for 5sec. I want the activity bit in the status register to be set if activity is above threshold but it never happens, the value in status register in always (65). activity bit is never set 

 

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0xC8); //reset
SPI_RW(0x52); //default value
P3OUT = 0x04;
__delay_cycles(1000000);

 

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x20); //POWER_CTL
SPI_RW(0xFA); //250mg activity th
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x21); //POWER_CTL
SPI_RW(0x00); //
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x22); //POWER_CTL
SPI_RW(0x00); //Link Bit + measurement mode
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x23); //POWER_CTL
SPI_RW(0x96); //150mg inactivity th
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x24); //POWER_CTL
SPI_RW(0x00); //Link Bit + measurement mode
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x25); //POWER_CTL
SPI_RW(0x1E); //inactivity time th 5sec
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x26); //POWER_CTL
SPI_RW(0x00); //Link Bit + measurement mode
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x2B); //POWER_CTL
SPI_RW(0x09); //generate interruot if acivity detected
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x27); //POWER_CTL
SPI_RW(0x35); //absolute mode
P3OUT = 0x04;

P3OUT = 0x00;
SPI_RW(0x0A);
SPI_RW(0x2D); //POWER_CTL
SPI_RW(0x06); //enable measurment and autosleep
P3OUT = 0x04;

 

is there a problem with the configuration of anything else????

Outcomes