infineon4engi@twitter infineon@linkedin infineon4engineers infineon@youtube
twitter Facebook Linkedin Youtube

+ Reply to Thread
Results 1 to 3 of 3

Thread: external interrupts with XC888

  1. #1
    Marc Roggemans

    external interrupts with XC888


    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.

  2. #2
    New Member New Member kamikaze will become famous soon enough kamikaze's Avatar
    Join Date
    Nov 2011
    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.
    [ - XC878 libraries (GitHub) - XC878 ECU project stub (GitHub) - High Speed Karlsruhe ]
    - - - -
    Primary platform: XC878CM-16FFA
    Custom library: ~10k lines of code, ~300 pages of documentation

  3. #3
    Beginner Beginner parera0 is on a distinguished road
    Join Date
    May 2020
    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.

+ Reply to Thread

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.