Unable to handle the data ready interrupt for mma8653

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unable to handle the data ready interrupt for mma8653

ソリューションへジャンプ
1,664件の閲覧回数
AMBh
Contributor I

In the mma8452.c driver code provided in linux they have mentioned one note i.e.

/* * Although we enable the interrupt sources once and for * all here the event detection itself is not enabled until * userspace asks for it by mma8452_write_event_config() */

 

I am trying to interface mma8653 with imx8-mini I could not able to understand how I would get interrupt on INT1 or INT2 pin by using this driver code. Is anyone could provide some details or any documentation

ラベル(1)
0 件の賞賛
返信
1 解決策
1,653件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Madhuri,

Unfortunately I am not familiar with this driver and do not know who is the author, but I think what this note is trying to say is that in order to enable any of the four available interrupt functions, not only the corresponding INT_EN_x (CTRL_REG4) and INT_CFG_x (CTRL_REG5) bits need to be configured, but also the function itself need to enabled and configured.

Let’s assume for example the motion function. If you want a motion event to generate an interrupt, the motion detection needs to be enabled by setting the OAE bit in the FF_MT_CFG register. Then it is necessary to configure the motion threshold and debounce time using FF_MT_THS and FF_MT_COUNT registers. Finally you need to set the INT_EN_FF_MT bit in the CTRL_REG4 register and set/clear the INT_CFG_FF_MT bit in the CTRL_REG5 register depending on which interrupt pin you want to use for this function.

Interrupt.JPG

Best regards,

Tomas

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,606件の閲覧回数
AMBh
Contributor I

Yes I am able to successfully handle the interrupt. Thank you Tomas for your information.

0 件の賞賛
返信
1,654件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Madhuri,

Unfortunately I am not familiar with this driver and do not know who is the author, but I think what this note is trying to say is that in order to enable any of the four available interrupt functions, not only the corresponding INT_EN_x (CTRL_REG4) and INT_CFG_x (CTRL_REG5) bits need to be configured, but also the function itself need to enabled and configured.

Let’s assume for example the motion function. If you want a motion event to generate an interrupt, the motion detection needs to be enabled by setting the OAE bit in the FF_MT_CFG register. Then it is necessary to configure the motion threshold and debounce time using FF_MT_THS and FF_MT_COUNT registers. Finally you need to set the INT_EN_FF_MT bit in the CTRL_REG4 register and set/clear the INT_CFG_FF_MT bit in the CTRL_REG5 register depending on which interrupt pin you want to use for this function.

Interrupt.JPG

Best regards,

Tomas

0 件の賞賛
返信
1,587件の閲覧回数
AMBh
Contributor I

Hi, I do have one more doubt I want to generate interrupt only once after change in orientation but it seems like it occurs more than three four times.

Is this debounce issue if so how to resolve this because I am not getting how to use PL_COUNT register to handle this issue.

0 件の賞賛
返信