AnsweredAssumed Answered

MMA8652FC & Transients

Question asked by haroldmccabe on Mar 10, 2015
Latest reply on Mar 11, 2015 by haroldmccabe

This accelerometer on my prototype board detects transient interrupts OK. But when I read the transient source reg (0x1E) I often see 0x00; at other times I see the event flag and other axis/polarity bits set as expected.

 

Why do I get a transient interrupt but the transient source reg = 0x00?

 

I tried setting the ELE bit in the transient config reg (0x1D) but then, once I get a transient interrupt I cannot clear it and the accelerometer interrupts continually.

 

My initialization is as follows:

 

// Reset and pause at least 1 ms

SMB_Write(&accel_write_reset); // reg 0x2B <- 0x40

stop_time = (U8)ticks + 2;

while ((U8)ticks < stop_time) ;

 

// Transient configuration register

SMB_Write(&accel_write_trans_cfg_reg); // reg 0x1D <- 0x1E

 

// Transient threshold register

SMB_Write(&accel_write_trans_thresh_reg); // reg 0x1F <- 0x90

 

// Time threshold (width) of transient

SMB_Write(&accel_write_trans_count_reg); // reg 0x20 <- 0x01

 

// Use high-pass filter

SMB_Write(&accel_write_xyz_data_config); // reg 0x0E <- 0x10

SMB_Write(&accel_write_hpf);

 

// Configure interrupt as open drain

SMB_Write(&accel_write_control_reg_3); // reg 0x2C <- 0x01

 

// Write portrait/landscape config

SMB_Write(&accel_write_pl_config); // reg 0x11 <- 0x40

 

// Write debounce count

SMB_Write(&accel_write_pl_count); // reg 0x12 <- 0xFF

 

// Take defaults for PL_BF_ZCOMP and PL_THS_REG

// Route interrupts

SMB_Write(&accel_write_control_reg_5); // reg 0x2E <- 0x30

 

// Enable interrupts

SMB_Write(&accel_write_control_reg_4); // reg 0x2D <- 0x30

 

// Write to control register 1: active, ODR, fast read mode

SMB_Write(&accel_write_control_reg_1); // reg 0x2A <- 0x0B

Outcomes