-
Dec 9th, 2011 07:20 AM
#1
external interrupts with XC888
Hello,
We use XC888 for educational purposes. Today, one of my students tried to use an extarnal interrupt (external interrupt1).
To our amazement the interrupt was only executed once. The user's manual states the pending bit will be cleared by hardware
when branching to the ISR.
In the UM there is a description of the IRCON0 register (p 5-25) stating that these bits (EXINT0 and EXTINT1) :
This bit is set by hardware and can only be cleared by software.
0 Interrupt event has not occurred.
1 Interrupt event has occurred.
These bits are set by corresponding active edge event i.e. falling/rising/both. These flags are
‘dummy’ and has no effect on the respective interrupt signal to core. Instead, the corresponding
TCON flag is the interrupt request to the core - it is sufficient to poll and clear the TCON flag.
It seems these bits are NOT dummy, and must becleared after entering the ISR.
-
Feb 9th, 2012 03:28 AM
#2
All my external interrupts on the XC878 (which is very similar) contain code like this:
IRCON0 &= ~(1 << BIT_EXINT3);
I do this because the ISR is serviced by several interrupt sources and I use the bit to distinguish which of them triggered the ISR.
In the XC878 UM the same statement is only made for external interrupts 0 and 1. The documentation of the corresponding TCON flag states:
"Cleared by hardware when processor vectors to interrupt routine. Can also be cleared by software."
With that in mind the statement "it is sufficient to poll and clear the TCON flag" is false/misleading, because there is no reason to interact with the TCON flag. Thus I doubt the validity of the remaining statement. I can confirm that it works if the bit in IRCON0 is cleared.
-
May 23rd, 2020 02:13 AM
#3
Beginner
The topic is really good and from here you can learn a lot more in detail if you want to. You can tell me about college-paper review for now. The main heading says much for people who are into leaning about new things and can also gain access through these sources.
-
Jul 6th, 2020 01:05 AM
#4
New Member
Thanks for sharing this wonderful post.google
-
Jan 12th, 2021 12:13 AM
#5
New Member
I am glad to read this article. google
-
Thanks!
Not an easy topic to understand. Bits and registers in distribution systems are a dense forest for me, at the university I passed pairs in assembler and did not like robotics. But it seems on YouTube you can learn this topic. After searching, I found there about 10 informative videos in which experienced teachers explain the topic of external interruptions in simple language. I also drew attention to the fact that almost all of these videos had at least 84 thousand views! I am sure this is because their authors have repeatedly used https://soclikes.com/ services in order to wind up views on YouTube.
Disclaimer
All content and materials on this site are provided “as is“. Infineon makes no warranties or
representations with regard to this content and these materials of any kind, whether express or
implied, including without limitation, warranties or representations of merchantability, fitness for
a particular purpose, title and non-infringement of any third party intellectual property right. No
license, whether express or implied, is granted by Infineon. Use of the information on this site may
require a license from a third party, or a license from Infineon.
Infineon accepts no liability for the content and materials on this site being accurate, complete or up-
to-date or for the contents of external links. Infineon distances itself expressly from the contents of
the linked pages, over the structure of which Infineon has no control.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings
and use of the content on this site are subject to the Usage Terms of the site; third parties using
this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of
this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements,
improvements and other changes to the content and materials, its products, programs and services
at any time or to move or discontinue any content, products, programs, or services without notice.
Bookmarks