- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I'm fairly new to this but have been poking away at the CY8CKIT-050 and it's a pretty cool kit!
I'm currently trying to get both a hardware and software interrupt setup. I will eventually be varying the PWM time so I have a slow timer setup (so I can adjust my PWM period for anywhere between 1 and 60s, with varying duty cycles). I am currently having it set to toggle on and off every 1 second. I have an LED setup to be triggered via the PWM output (LED3) and an LED setup to be triggered by the interrupt (LED4).
Below is my current setup:
My code looks like this:
CY_ISR(PWM_Interrupt_Handler)
{
Pin_LED4_Write(~Pin_LED4_Read());
}
int main()
{
CyGlobalIntEnable;
PWM_Start();
PWM_Interrupt_StartEx(PWM_Interrupt_Handler);
for(;;)
{
// I have other code running in here
}
}
I've been trying to do as much reading as I can (in the forums, watching videos on youtube, etc) but I can't seem to find the issue with either my understanding (maybe it's doing exactly what I have it programmed to do but my expectations are wrong) or I'm missing something basic that needs to be enabled for this to be up and working.
Any help someone could give me would be greatly appreciated. If you need any additional information, please let me know. Thanks a lot!
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi jeremy,
Just enable "interrupt on terminal count event" too under PWM advanced configuration tab along with interrupt on compare event. Then it works. I don't know why without that option being enabled, interrupt do not triggered.