Interrupt mess

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
greg79
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

While I'm trying to learn to use PSOC interrupts, I started a project to trigger an interrupt with a timer and blink an LED. Needless to say, the LED never turns on. What am I missing? Thank you for the help in advance, 

#include "project.h"

Cy_ISR(Timer_Interrupt){
LED_Write(~LED_Read());
LED_ClearInterrupt();
}

int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
Timer_Interrupt_Start();
timer_clock_Start();
Timer_1_Start();

/* Place your initialization/startup code here (e.g. MyInst_Start()) */

for(;;)
{
/* Place your application code here. */
}
}

 

greg79_0-1629203404052.png

 

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You need to set the interrupt generated at TC in the timer configuration. It is also advisable to set the capture mode to "none".

Happy coding

Bob

 

View solution in original post

4 Replies