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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,197 Views
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 .

Labels (2)
0 Kudos
Reply
1 Solution
918 Views
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

View solution in original post

3 Replies
919 Views
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

918 Views
intrudert
Contributor II

What about directing both interrupts to the INT0 ?

0 Kudos
Reply
918 Views
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