INT0 for changes in x/y/z values and INT1 on vector magnitude.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

INT0 for changes in x/y/z values and INT1 on vector magnitude.

跳至解决方案
1,770 次查看
intrudert
Contributor II

Is it possible to program FXOS7800cq this way : 

 1. INT0 will be generated when there's a chance in the magnetic x/y/z threshold values 

2. INT1 for magnetic vector change?

For example, my initial x/y/z values of magnetic sensor are set to 0/0/0 on start up. If  x or y or z value crosses 100, generate INT0.

My magnetic vector magnitude threshold is 80 uT. If it exceeds, generate INT1 .

标签 (2)
0 项奖励
回复
1 解答
1,491 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello,

Yes, it can be done.

1. Using the magnetic threshold event detection block. See chapter 14.16 of the FXOS8700CQ datasheet. The m_ths_int_cfg is used to select either INT1 or INT2.

2. Using the magnetic vector-magnitude change detection block. See chapter 14.18 of the FXOS8700CQ datasheet. The m_vecm_init_cfg bit is used to select either INT1 or INT2.

Hope it helps.

Best regards,

Tomas

在原帖中查看解决方案

3 回复数
1,492 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello,

Yes, it can be done.

1. Using the magnetic threshold event detection block. See chapter 14.16 of the FXOS8700CQ datasheet. The m_ths_int_cfg is used to select either INT1 or INT2.

2. Using the magnetic vector-magnitude change detection block. See chapter 14.18 of the FXOS8700CQ datasheet. The m_vecm_init_cfg bit is used to select either INT1 or INT2.

Hope it helps.

Best regards,

Tomas

1,491 次查看
intrudert
Contributor II

What about directing both interrupts to the INT0 ?

0 项奖励
回复
1,491 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello,

You can use the same INTx pin for both events. Then you will have to go to read the M_INT_SRC register (0x5E) to know which event caused the interrupt.

M_INT_SRC register.PNG

Best regards,

Tomas