FXOS8700 accel transient threshold resolution in per-axis mode

cancel
Showing results for 
Search instead for 
Did you mean: 

FXOS8700 accel transient threshold resolution in per-axis mode

Jump to solution
564 Views
nickv
Contributor I

Hi,

I am using the FXOS8700 with the accelerometer transient detection feature. The data sheet shows two ways to set the threshold:

  1. Use TRANSIENT_THS which has a resolution of 63 mg/LSB and the same threshold would be used for all axes
  2. Use A_FFMT_THS_* by setting high bit of A_FFMT_THS_Y_MSB and then you can set per-axis thresholds

What is the resolution of the A_FFMT_THS_* registers when they are used to set the threshold? From my tests, it looks like it is also 63 mg. The lowest two bits of each register aren't used so the values have to be shifted left by two bits, but otherwise it appears that the resolution is also 63 mg? I can't find specific mention in the datasheet and I have to admit I was hoping for a higher-resolution threshold so that it could be set lower than 63 mg.

thanks,

Nick

Labels (1)
Tags (2)
0 Kudos
1 Solution
246 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Nick,

After reviewing it with the design team, I confirm that the transient threshold resolution is fixed to 62.5 mg. For a_ffmt_trans_ths_en = 1, the ASIC uses reg 0x1F[6:0] as the x-axis transient threshold, 0x75[0] and 0x76[7:2] as the y-axis threshold and 0x77[0] and 0x78[7:2] as the z-axis threshold.

The datasheet is being updated and should be available on the web within the next few days.

Sorry it has taken so long to clarify it.

Regards,

Tomas

View solution in original post

0 Kudos
5 Replies
246 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Nick,

The A_FFMT_THS_X/Y/Z MSB and LSB registers (0x73 – 0x78) are used by both the freefall/motion detection and the transient detection functional blocks to set independent threshold values for each axis with the same resolution as the accelerometer output data determined by fs[1:0] bits of the XYZ_DATA_CFG register. For example, if fs[1:0] = 0b00 (±2g), the resolution of the A_FFMT_THS_X/Y/Z registers is 0.244 mg/LSB, if fs[1:0] = 0b10 (±8g), the resolution is 0.976 mg/LSB. As you correctly noted, the threshold values stored in the A_FFMT_THS_X/Y/Z registers are used by the transient detection functional block if the a_ffmt_trans_ths_en bit of the A_FFMT_THS_Y_MSB register is set high.

Example setting for Z > 31.25mg, 2g mode, 800Hz ODR, High resolution and Low noise:

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG2, 0x40);               // Reset all registers to POR values

 

Pause(0x631);        // ~1ms delay

 

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, XYZ_DATA_CFG_REG, 0x00);        // ±2g range with 0.244mg/LSB  

 

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_CTRL_REG1, 0x00);             // Accelerometer only mode

 

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, TRANSIENT_CFG_REG, 0x18);       // Enable transient detection for Z axis, latch enabled

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, A_FFMT_THSY_MSB_REG, 0x80);     // Use threshold values from A_FFMT_THS_Z registers

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, A_FFMT_THSZ_MSB_REG, 0x02);     // Set threshold to about 31.25mg (31.25mg / 0.244mg = 128 = 0b10000000)

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, A_FFMT_THSZ_LSB_REG, 0x00);

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, TRANSIENT_COUNT_REG , 0x00);    // Set debounce to zero

        

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG2, 0x02);               // High Resolution mode

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG3, 0x00);               // Push-pull, active low interrupt

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG4, 0x20);               // Transient interrupt enabled

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG5, 0x20);               // Transient interrupt routed to INT1 - PTD4

I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG1, 0x05);               // ODR = 800Hz, Reduced noise, Active mode


I will send you the complete example project on Monday as soon as I double check it in the lab.


Regards,

Tomas

0 Kudos
246 Views
nickv
Contributor I

Hi Tomas,

Do you have any update on your test?

thanks,

Nick

0 Kudos
246 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Nick,

I have done some more investigation into this and tried different settings. It seems like the resolution of the A_FFMT_THS registers when used for transient detection (a_ffmt_trans_ths_en = 1) is indeed fixed to 62.5 mg and is not determined by the fs[1:0] bits of the XYZ_DATA_CFG register.

I have requested assistance from the design team to verify the implementation on the ASIC. I should have a final answer by tomorrow.


Regards,

Tomas

0 Kudos
247 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Nick,

After reviewing it with the design team, I confirm that the transient threshold resolution is fixed to 62.5 mg. For a_ffmt_trans_ths_en = 1, the ASIC uses reg 0x1F[6:0] as the x-axis transient threshold, 0x75[0] and 0x76[7:2] as the y-axis threshold and 0x77[0] and 0x78[7:2] as the z-axis threshold.

The datasheet is being updated and should be available on the web within the next few days.

Sorry it has taken so long to clarify it.

Regards,

Tomas

View solution in original post

0 Kudos
246 Views
reyes
NXP TechSupport
NXP TechSupport

Hi Nick,

Unfortunately the resolution will not improve using the A_FFMT_THS_* settings. Resolution is fixed at 63 mg/LSB.


Have a great day,
Jose Reyes

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos