메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

How do I create push button interrupts on a Synergy kit?

Latest Updated:09/19/2016

Question:

How do I create interrupts for buttons on my Synergy Kit?

Answer:

It is easy to use push buttons to generate an interrupt on Synergy Kits.

First: Look at the schematic for the kit to determine which MCU pins are connected to the push button. Set these pins as inputs in the configurator. If you are using the BSP, these will probably already be configured correctly.

Next: In the configurator make sure they are enabled for IRQ. Now define a name for the callback function associated with the interrupt. Create a callback routine that responds to the push button interrupt. You may want to use a de-bouncing routine to eliminate follow-on interrupts caused by a switch bounce. 

For an example: The tone generator project includes a good example and description of a push button (section 3.1). A PDF description of the Application Example is available here:https://www.renesas.com/doc/pr...4-tone-gen.pdf

The project is located here: https://www.renesas.com/software/D6000226.html

  • 이 기사가 도움이 되셨나요?