infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 3 of 3

Thread: The external interrupt of TC21x developed with Free AURIX Entry Tool Chain.

  1. #1
    New Member New Member lidalaw168 is on a distinguished road
    Join Date
    Sep 2018
    Posts
    1
    Points
    30

    The external interrupt of TC21x developed with Free AURIX Entry Tool Chain.

    I am new to DSP. I have looked through the BaseFramework TC21x Demos supported by infineon, and have found some defined functions that refer to External Request Unit.
    But I don't know what processes should I do to complete an external interrupt triggered by rising edge?
    How could I define an external interrupt and then enter the interrupt service function?

  2. #2
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    48
    Points
    822.5
    Hi Li,

    Quote Originally Posted by lidalaw168 View Post
    I am new to DSP. I have looked through the BaseFramework TC21x Demos supported by infineon, and have found some defined functions that refer to External Request Unit.
    But I don't know what processes should I do to complete an external interrupt triggered by rising edge?
    How could I define an external interrupt and then enter the interrupt service function?
    Have you tried the ScuEruDemo that is included in the iLLD demos? The documentation of this example says that Infineon tested it on a TC29x device using their TriBoard. It interrupts on every rising edge of port pin P20_0.

    Since you are new to AURIX it might be advisory to studie chapters 16.8.4 (external interrupts) and 8.4.1 (External Request Unit) of the TC21x/TC22x/TC23x family manual. These discuss your specific derivative in detail. In addition you may also need to study the TC Architecture Manual Volume 1. Its chapter 5 discusses the foundations of the interrupt system.

    Note that the above ScuEruDemo needs to be build in conjunction with the iLLD library which, like the demo itself, must be ascertained from your MyICP portal. If you wish to integrate the example into our IDE then I recommend this application note which explains it step-by-step.

    Best regards,

    Henk-Piet Glas
    Principal Technical Specialist
    Last edited by HIGHTEC.henk-piet.glas; Sep 21st, 2018 at 07:59 AM.

  3. #3
    Advanced Advanced cwunder is on a distinguished road
    Join Date
    Feb 2015
    Location
    USA
    Posts
    50
    Points
    817.5
    what processes should I do to complete an external interrupt triggered by rising edge?
    How could I define an external interrupt and then enter the interrupt service function?
    If you use the Bifaces or Frameworks then you can add this extremely simplistic code example to build upon. Note the pin you choose must be available for selection, in the code example P10.7 was used on the TC277.

    Code:
    volatile uint32_t eru0_cnt;
    
    void SCU_SRC0(void) {
      eru0_cnt++;
    }
    
    void ERU_Init(void) {
      /*configure P10.7 REQ4/ERS0 */
      Ifx_SCU_EICR eicr0 = {
         .B.EXIS0 = EXISn_Input_2,          /* 2 */
         .B.FEN0 =    FENn_Disabled,        /* 0 */
         .B.REN0 = RENn_Enabled,            /* 1 */
         .B.LDEN0 = LDENn_WillNotBeCleared, /* 0 */
         .B.EIEN0 = EIENn_TriggerIsEnabled, /* 1 */
         .B.INP0 = INPn_TriggerOGU_0,       /* 0 */
          /* not using the other half of EICR0 */
      };
      SCU_EICR0.U = eicr0.U;
      
      /*configure Flag Gating Register 0 */
       Ifx_SCU_IGCR igcr0 = {
         .B.IPEN00 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.IPEN01 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.IPEN02 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.IPEN03 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.IPEN04 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.IPEN05 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.IPEN06 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.IPEN07 = IPENxy_BitDoesNotTakePartInPatternDetection, /* 0 */
         .B.GEEN0 = GEENn_PatternDetectionTriggerDisabled, /* 0 */
         .B.IGP0 = IPGn_ActivatedOnTrggerPatternNotConsidered,  /* 1 */
          /* not using the other half of IGCR */
        };
        SCU_IGCR0.U = igcr0.U;
    
      /* create entry in the desired CPU vector table */
      IFX_INTERRUPT(SCU_SRC0, CPU0, 1);
      /* configure the ERU0 SRC register for CPU0, IRQ level 1 */
      SRC_SCUERU0.U = (0 << TOS) | (1 << SRE) | 1;
    }
    Last edited by cwunder; Sep 24th, 2018 at 07:58 AM.

+ Reply to Thread
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.