GPIO

Is there a working example for GPIO push button rising/falling edge interrupt ?



tagged content
[edited by: JValeriani at 7:33 PM (GMT 0) on 3 Sep 2019]
Parents
  • +1
    •  Analog Employees 
    on Jun 4, 2019 5:58 AM

    Example Code to configure GPIO for push button rising/falling edge interrupt :

    Below is the programming guideline to configure GPIO for push button rising/falling edge interrupt : 

    1. Write the gpioCallback routine to configure the PB_03 to toggle the LED when interrupt happens.

    2. Do the GPIO initialization.

    3. Configure PB_03 as output pin, to blink the LED.

    4. Configure PC_07  as input pin , which takes input from the push button.

    5. Register the callback routine to PINT1 for PC_07.

    5. Configure the PINT1 interrupt for level - rising/falling edge. 

    Working code examples for both rising and falling edge interrupt in GPIO are attached below.

    Push_Button_Rising_Edge.zip

    Push_Button_Falling_edge.zip

Reply
  • +1
    •  Analog Employees 
    on Jun 4, 2019 5:58 AM

    Example Code to configure GPIO for push button rising/falling edge interrupt :

    Below is the programming guideline to configure GPIO for push button rising/falling edge interrupt : 

    1. Write the gpioCallback routine to configure the PB_03 to toggle the LED when interrupt happens.

    2. Do the GPIO initialization.

    3. Configure PB_03 as output pin, to blink the LED.

    4. Configure PC_07  as input pin , which takes input from the push button.

    5. Register the callback routine to PINT1 for PC_07.

    5. Configure the PINT1 interrupt for level - rising/falling edge. 

    Working code examples for both rising and falling edge interrupt in GPIO are attached below.

    Push_Button_Rising_Edge.zip

    Push_Button_Falling_edge.zip

Children
No Data