- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an ISR component ISR_1 connected to the OV pin of a PWM block.
In the main file I have the following code:
CY_ISR_PROTO(MyISR);
CY_ISR(MyISR)
{
PWM_1_Stop();
}
int main()
{
PWM_1_Start();
ISR_1_StartEx(MyISR);
CyGlobalIntEnable;
}
PWM should stop as soon as the interrupt is executed. But it does not.
Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are probably missing the infinite loop that keeps the cpu running. When main() ends, quo vadis ???
Next time can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
Of course I missed the infinite loop, but that wasn't the reason behind not executing the ISR.
Actually the ISR is executing, however the PWM_Stop() command was not working. It is ok now.
My bad, sorry!