- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having a heck of a time trying to clear an interrupt using the timer function on a TCPPWM component. The API states to use void ISR_ClearPending(void) but this does not appear in the API when i try to use it. The data sheet also talks about block/status register needing to be read/cleared, but doe snot tell how this is done. Could i get some help on how to do this properly. I will also attach my project for reference.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May be this is supererogatory,
I always felt bewildered when I had to use <Module>_ClearInterrupt(interruptMask),
to find what is the "interruptMask".
Recently I found a way to find it, may be there is/are better ways, though.
(1) When I enter xxx_ClearInterrupt(),
I notice that I must provide "interruptMask",
but I have no idea what is the name/value of the interruptMask.
(2) So, to avoid "error" I fill "0' for the time being.
(3) Now as the line is grammatically correct, we can use the pull-down menu -> Go To Definition
(4) Then in the definition of ClearInterrupt() function, the comment shows the usable parameters.
There I cheat to copy the "correct" defined value, this time "Tmer_INTR_MASK_TC".
(5) Paste the correct mask value into my (or your) program
moto
P.S.
Well, Today I learned "Timername_ClearInterrupt(Timername_GetInterruptSource())".
This will be better if possible interrupt source is only 1 or you have already taken care of each cases before clearing the flag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The interrupt has to be cleared at the TCPWM.
Use Timername_ClearInterrupt(Timername_GetInterruptSource()) to remove all interrupts.
Clearing the interrupt in the isr component is not required.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May be this is supererogatory,
I always felt bewildered when I had to use <Module>_ClearInterrupt(interruptMask),
to find what is the "interruptMask".
Recently I found a way to find it, may be there is/are better ways, though.
(1) When I enter xxx_ClearInterrupt(),
I notice that I must provide "interruptMask",
but I have no idea what is the name/value of the interruptMask.
(2) So, to avoid "error" I fill "0' for the time being.
(3) Now as the line is grammatically correct, we can use the pull-down menu -> Go To Definition
(4) Then in the definition of ClearInterrupt() function, the comment shows the usable parameters.
There I cheat to copy the "correct" defined value, this time "Tmer_INTR_MASK_TC".
(5) Paste the correct mask value into my (or your) program
moto
P.S.
Well, Today I learned "Timername_ClearInterrupt(Timername_GetInterruptSource())".
This will be better if possible interrupt source is only 1 or you have already taken care of each cases before clearing the flag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, Mr. Motoo
It is nice to see that even me could teach you new tricks by using _GetInterruptSource()
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you so much for the help ... i actually was able to do it reading AN90799 on page 10 in regards to the interruptMask.
and looking at the XXX.h file i found the mask.
After reading your post your way sure seems easier!
thanks again
Scott