FXOS8700 PL interrupt sometimes does not clear

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

FXOS8700 PL interrupt sometimes does not clear

701 Views
robertogomes
Contributor I

I've worked in a project based on STM32 and FXOS8700.

Some information:

I2C @400kHz

auto-sleep enable (but not interrupt)

Hybrid mode

Just int_en_lndprt is enable in CTRL_REG4 and  int_cfg_lndprt in CTRL_REG5

The sensor is set to generate interrupt (INT1) when orientation is changed. In interrupt code I read  PL_STATUS and I can check which (Portait/Landscape/front/back) movement happened.

However, sometimes after read PL_STATUS the pin INT1 is not clear. As this interrupt can not be "unlatched" like freefall or vectormag interrupt, when this happens I can not restore the idle state anymore.

Anybody used this function and worked well?

Labels (1)
0 Kudos
3 Replies

468 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello Robertos,

I suggest you to use the debounce counter just to be sure that the INT1 is not setted again due to another event. (use a big value to add a dead time before the next event).

If the interrupt is still high, there is an issue to clear the flag. If it goes down a time (debounce time), it is a threshold problem.

Try it and let-me know.

Thanks,

Anthony

468 Views
robertogomes
Contributor I

Hi Anthony,

I did what you said and it seems work. But I will wait some days more because the problem was random. It was very hard to reproduce. whether everything to be fine until tomorrow , i'll need reduce the debounce counter because the response time to orientation movement increase a lot( almost 1.5 s).

I will let you know about my tests.

Thanks,

Roberto

0 Kudos

468 Views
anthonyduhamel
NXP Employee
NXP Employee

Hi Roberto,

Increasing the debounce counter is not really the solution. It was just to be sure there is not a quasi-permanent interrupt. It allows to filter a bit the interrupt. But if the trigger condition is still valid, the interrupt will came back to high level after clearing the flag + debounce time.

You can take a look at the application note AN4068​.

I'm waiting your tests. Let me know your progress!

Regards,

Anthony

0 Kudos