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

1,990 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

1,757 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

1,757 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

1,757 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
%3CLINGO-SUB%20id%3D%22lingo-sub-477219%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFXOS8700%20PL%20interrupt%20sometimes%20does%20not%20clear%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477219%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI've%20worked%20in%20a%20project%20based%20on%20STM32%20and%20FXOS8700.%20%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ESome%20information%3A%3C%2FP%3E%3CP%3EI2C%20%40400kHz%3C%2FP%3E%3CP%3Eauto-sleep%20enable%20(but%20not%20interrupt)%3C%2FP%3E%3CP%3EHybrid%20mode%3C%2FP%3E%3CP%3EJust%20int_en_lndprt%20is%20enable%20in%20CTRL_REG4%20and%26nbsp%3B%20int_cfg_lndprt%20in%20CTRL_REG5%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20sensor%20is%20set%20to%20generate%20interrupt%20(INT1)%20when%20orientation%20is%20changed.%20In%20interrupt%20code%20I%20read%26nbsp%3B%20PL_STATUS%20and%20I%20can%20check%20which%20(Portait%2FLandscape%2Ffront%2Fback)%20movement%20happened.%3C%2FP%3E%3CP%3EHowever%2C%20sometimes%20after%20read%20PL_STATUS%20the%20pin%20INT1%20is%20not%20clear.%20As%20this%20interrupt%20can%20not%20be%20%22unlatched%22%20like%20freefall%20or%20vectormag%20interrupt%2C%20when%20this%20happens%20I%20can%20not%20restore%20the%20idle%20state%20anymore.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAnybody%20used%20this%20function%20and%20worked%20well%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-477219%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAccelerometers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477222%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FXOS8700%20PL%20interrupt%20sometimes%20does%20not%20clear%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477222%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Roberto%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIncreasing%20the%20debounce%20counter%20is%20not%20really%20the%20solution.%20It%20was%20just%20to%20be%20sure%20there%20is%20not%20a%20quasi-permanent%20interrupt.%20It%20allows%20to%20filter%20a%20bit%20the%20interrupt.%20But%20if%20the%20trigger%20condition%20is%20still%20valid%2C%20the%20interrupt%20will%20came%20back%20to%20high%20level%20after%20clearing%20the%20flag%20%2B%20debounce%20time.%3C%2FP%3E%3CP%3EYou%20can%20take%20a%20look%20at%20the%20application%20note%20%3CA%20href%3D%22http%3A%2F%2Fcache.nxp.com%2Ffiles%2Fsensors%2Fdoc%2Fapp_note%2FAN4068.pdf%3Ffsrch%3D1%26amp%3Bsr%3D1%26amp%3BpageNum%3D1%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EAN4068%3C%2FA%3E%E2%80%8B.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI'm%20waiting%20your%20tests.%20Let%20me%20know%20your%20progress!%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EAnthony%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477221%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FXOS8700%20PL%20interrupt%20sometimes%20does%20not%20clear%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477221%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Anthony%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20did%20what%20you%20said%20and%20it%20seems%20work.%20But%20I%20will%20wait%20some%20days%20more%20because%20the%20problem%20was%20random.%20It%20was%20very%20hard%20to%20reproduce.%20whether%20everything%20to%20be%20fine%20until%20tomorrow%20%2C%20i'll%20need%20reduce%20the%20debounce%20counter%20because%20the%20response%20time%20to%20orientation%20movement%20increase%20a%20lot(%20almost%201.5%20s).%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20will%20let%20you%20know%20about%20my%20tests.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ERoberto%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477220%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FXOS8700%20PL%20interrupt%20sometimes%20does%20not%20clear%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477220%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Robertos%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20suggest%20you%20to%20use%20the%20debounce%20counter%20just%20to%20be%20sure%20that%20the%20INT1%20is%20not%20setted%20again%20due%20to%20another%20event.%20(use%20a%20big%20value%20to%20add%20a%20dead%20time%20before%20the%20next%20event).%3C%2FP%3E%3CP%3EIf%20the%20interrupt%20is%20still%20high%2C%20there%20is%20an%20issue%20to%20clear%20the%20flag.%20If%20it%20goes%20down%20a%20time%20(debounce%20time)%2C%20it%20is%20a%20threshold%20problem.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ETry%20it%20and%20let-me%20know.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAnthony%3C%2FP%3E%3C%2FLINGO-BODY%3E