KBI

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

KBI

3,659 次查看
旭余朱
Contributor III

In with kbi when several problems: 1, ke06 kbi interrupt set is only the falling edge trigger and enable after directly into the callback function, with the oscilloscope look at the next, a enable kbi interrupt after the pin have a falling, this is what reason, and then in the callback function set to shake delay, in the main program execution scan button, the main program scanner in the first disability kbi, button scanning completed before enable kbi, the results with the prior to the same, a enable it into the interrupt. 2, set is falling interrupt, occasionally appear a problem: the release button when the rising also triggered kbi interrupt. Appear chance about 10 times have time, with the oscilloscope seen waveform, really is rising after the interrupt. Bigwigs seek solved extremely thanks

标签 (1)
4 回复数

3,446 次查看
yijunlii
Contributor I

我也有类似问题,目前没有解决。。。

0 项奖励
回复

3,446 次查看
旭余朱
Contributor III

老铁,我解决了,是毛刺的问题,飞思卡尔的KBI很敏感,us级别的上升沿或者下降沿就会触发中断,我用示波器调到us级别且下降沿触发,就抓到了罪魁祸首,解决方法可以在PORT那章里看下毛刺滤波器,用毛刺滤波器滤下就ok了。

0 项奖励
回复

3,446 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi 旭余,

To prevent a false interrupt request during keyboard initialization, please refer the "35.5.4 KBI initialization":

false keyboard interrupt flag.png

Please refer the "11.4 Input glitch filter setting" and enable the Input glitch filter:

Input glitch filter setting.png

There is a KBI example in MCUXpresso SDK, you can test that example.

SDK_2.4.1_FRDM-KE06Z.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

3,446 次查看
旭余朱
Contributor III

Hi,Robin,

Thanks for your reply.I have read the contents of 35.5.4 and configured.And write 1 to KBI1_SC[KBACK] after enabled keyboard interrupt Pin.But still into the interrupt .I looked KBI1_SP register, is 0x000000, so now used to read KBI1_SP register way to determine whether a button Press, but for enable immediately after into the interrupt this point or somewhat scruples, this is normal the phenomenon of it? In official examples of on is such a phenomenon.

0 项奖励
回复