About the button

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

About the button

561件の閲覧回数
kalajiao
Contributor II

When I use a key, I assign a value to a variable using keys 1 and 2 respectively, but it's strange why I can assign a value only on the first press. I added the ability to assign a value to a variable in the key action section of the can_pal demo, in which I receive a new value every time. Why is that? It's Fang's where I use the buttons

0 件の賞賛
1 返信

549件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Seems that you forget Clear interrupt flag.

Clear interrupt flag.jpg

You can set a breakpoint in the buttonisr function to check whether it will enter this function every time you press a key.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛