- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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. */
}
}
Solved! Go to Solution.
- Labels:
-
PSoC5 LP MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Those comments in the main.c are very helpful, thanks Len!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! My apologies, I could only accept Bob's reply as a solution. I very much much appreciate the effort.