Hi,
I want to generate an interrupt using the PWM blocks. I understand that there are a few inbuilt functions that help me create this interrupt easily. But what I'm not able to understand is that how I will be able to relate that particular interrupt to the function where I would be writing the action that needs to be taken once an interrupt occurs.
which among these inbuilt function should I be using? Is there some other function that lets me point a function that needs to be run when interrupt occurs?
Thank you
Solved! Go to Solution.
I did some digging of my own since I wasn't getting any answers any time soon. I found the solution to generate and run the interrupt smoothly. I hope this thread helps someone who's having same trouble as me.
Using interrupt with the PWM.
If I have missed out something or if there is more, you are more than welcome to correct me. Let me know if I have been making mistake all this while...
Thanks @Omar_Anguiano. I understand what you are trying to say. But if you had an example that demonstrates the same, it would be helpful.
I did some digging of my own since I wasn't getting any answers any time soon. I found the solution to generate and run the interrupt smoothly. I hope this thread helps someone who's having same trouble as me.
Using interrupt with the PWM.
If I have missed out something or if there is more, you are more than welcome to correct me. Let me know if I have been making mistake all this while...
Hello soaring_sun
The procedure to enable the interruptions is correct, just some suggestions to add.
I suggest you use the IRQ handlers only to set/clear flags you've defined so you can control what functions are executed in your code, another good option is using function callbacks.
If you have more questions do not hesitate to ask me.
Best regards,
Omar