I am beginner with PSoC 5 and I started with a simple project.
I want to toggle a diode (Pin_2 on the schematics) with a push-button (Pin_1 on the schematics). In order to do that I am using GlitchFilter to debounce the push button.
Everything works just fine when I step through the program with a debugger, but as soon as I run the program, it stops working. It enters the interrupt just once and then stops working. It looks like interrupt routine do not respond. And there is no difference if interrupt is triggered as "rising edge" or "derived", it does the some thing.
I hope that some of you can see what the problem is.
Here are design, and code for main.c and isr_1.c (interrupt routine).
Thanx in advance.
Which kit are you using to test this project?
If you are using CY8CKIT-001 or CY8CKIT-050, then the switch available on board (SW1 and SW2) are push-to-ground.
Hence, configure the input pin's Drive Mode as Resistive Pull Up.
If you are using CY8CKIT-014, the switch is configured as push-to-Vcc. Hence, the drive mode for the pin should be set as Resistive Pull down.
If configured this way, the pins will not be floating.
Secondly, the header file of the pin you are intending to toggle should be included in the isr. Use the macro
#include "Pin_2.h" in the isr_1.c file
Thank you very much for help. The kit I use have a push button connected to +Vcc (I can see it in a data sheet).
I will try your project today.
Thanks once again.