infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Page 1 of 4 1 2 3 4 LastLast
Results 1 to 10 of 35

Thread: Aurix 2G Free Entry Tool Chain Interrupt on all cores

  1. #1
    New Member New Member JensM is on a distinguished road
    Join Date
    Feb 2018
    Posts
    5
    Points
    45

    Aurix 2G Free Entry Tool Chain Interrupt on all cores

    Hi there,

    recently I got a Triboard with an Aurix 2G on it. Programming on all cores is really straight forward except if it comes to interrupts.
    Interrupts do work only on core 0. There seems no way enabling -for example GTM- interrupts on the other cores.
    Why is that? Since the examples from HighTech didn't come with multicore application examples, I've tried to just
    implement a view iLLD based instructions, but only an interrupt for core 0 did work.

    I've searched for nearly everything with the debugger, but it makes really no sense why cores 1 to 5 don't accept interrupts.

    Further, I did not found any appropriate documentation on how to program multicore style applications without having overloaded multithreading, semaphore and other mechanisms.

    I just need to run a small test multicore application where cores have there own timer like interrupts to handle core specific time constraints.

    I would really appreciate your help.

    Thank you.

  2. #2
    Intermediate Intermediate HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    35
    Points
    562.5
    Hi Jens,
    Quote Originally Posted by JensM View Post
    Hi there,

    recently I got a Triboard with an Aurix 2G on it. Programming <snip> <snip> I would really appreciate your help.

    Thank you.

    I have attached an example that I created at the close of last year. While it is not for 2nd generation AURIX it should not be too difficult to migrate. To use it within your project use the following steps:
    • Select 'File | Import' MENU
    • Expand 'General' group from the input sources WIZARD
    • Select 'Existing Projects into Workspace' INPUT SOURCE
    • Click 'Next' BUTTON
    • Click 'Select archive file' RADIOBUTTON
    • Click 'Browse' BUTTON and select jens.zip
    • Click 'Finish' BUTTON

    The project is divided into 'bsp' and 'app' folders. The former contains system board support package code which is actually in your toolchain. The latter are the bits and pieces that I added myself. Regarding the bsp the modules that are worth exploring are cint_tc29x.c and interrupts.c. These implement a low-level and application level interrupt API that help you setup parameterised interrupt service routines. Together they implement an interrupt vector table that is shared between cores. On application level modules applproc{0,1,2}.c initialise the interrupt system via the call to main_init. Each core needs to individually enable the interrupt system on their end. There's much more that can be told about the example, but I'll leave you to explore it first. We can then discuss the finer details if there's anything that remains unclear.

    Best regards,

    Henk-Piet Glas
    Principal Technical Specialist
    ?????

  3. #3
    New Member New Member JensM is on a distinguished road
    Join Date
    Feb 2018
    Posts
    5
    Points
    45
    Hi Henk,

    thanks for your answer. I'm gonna try this.

    Regards,

    Jens

  4. #4
    Intermediate Intermediate HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    35
    Points
    562.5
    Hi Jens,

    Quote Originally Posted by JensM View Post
    thanks for your answer. I'm gonna try this.
    Hope it works out, but let me know if you need help.

    Best regards,

    Henk-Piet Glas

  5. #5
    New Member New Member JensM is on a distinguished road
    Join Date
    Feb 2018
    Posts
    5
    Points
    45
    Hi Henk,

    unfortunately your example does not help.
    What I am searching for is a straight forward way to implement interrupts on all cores with less coding effort.
    Lets say for example we wanna implement a STM on each core with different frequencies.
    In my understanding I just need to invoke a compare config variable and initialize it with trigger priority, comparator interrupt and type of service for example.
    After this the configuration needs to be load lets say in MODULE_STM0 with the function IfxStm_initCompare.

    Then comes the following:

    IFX_INTERRUPT (UsrIsr_Stm_0, 0, 60);

    void UsrIsr_Stm_0(void)
    {
    IfxStm_clearCompareFlag(&MODULE_STM0, IfxStm_Comparator_0);
    IfxStm_increaseCompare(&MODULE_STM0, IfxStm_Comparator_0, IFX_CFG_STM_TICKS_PER_MS);
    P33_OUT.B.P4 = ~P33_OUT.B.P4;
    }

    ...just toggle a LED at the given frequency

    The thing is that this code actually works really good on core 0.
    But it does not on the other cores with different TOS.

    I assume problems with the interrupt table, which normally needs to be unique to its core.
    Therefore, where can I change the interrupt table configuration in the HighTech Free Toolchain configuration?

    Even GTM multicore interrupt examples from other sources, which are definitely testet before, do not work inside my Free Toolchain environment.

    Probably, my setup is limited to have interrupts just on core 0. Is that true?


    Regards,

    Jens

  6. #6
    New Member New Member JensM is on a distinguished road
    Join Date
    Feb 2018
    Posts
    5
    Points
    45
    Hi Henk again,

    please don't misunderstand me. I expect the full range of functionality with the FreeEntryToolChain, not anything else.
    There must be a straight forward way, ideally with documentation, how to implement interrupts for more than just one core.
    As an experienced developer, it would be a real shame to call the FAE for just doing this.

    If you have an example which definitely works with the FreeEntryToolChain, please let me know.


    Thank you.

    Regards,

    Jens

  7. #7
    New Member New Member JensM is on a distinguished road
    Join Date
    Feb 2018
    Posts
    5
    Points
    45
    Hi Henk,

    finally I did it. All cores have their own STM support.
    The answer is, yes the FreeEntryToolChain does support interrupts on different cores.
    Please apologize my messages before.

    Thank you.

    Regards,

    Jens

  8. #8
    Intermediate Intermediate HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    35
    Points
    562.5
    Hi Jens,

    Quote Originally Posted by JensM View Post
    Hi Henk,

    finally I did it. All cores have their own STM support.
    The answer is, yes the FreeEntryToolChain does support interrupts on different cores.
    Please apologize my messages before.

    Thank you.

    Regards,

    Jens
    No problem, and good to hear you got it sorted. Let me know if some of it still needs clarification.

    Best regards,
    Principal Technical Specialist

  9. #9
    Intermediate Intermediate Praktikant is on a distinguished road
    Join Date
    Jun 2018
    Posts
    17
    Points
    360

    Tricore tc299Tf timer interrupt

    Hello,

    I am working on tricore tc299tf and trying to initialize system timer interrupt. I have tried to use the examples that are explained here however my timer interrupt is still not working perfectly. I want to get tick every 1microsec. Could anyone help me with the issue ?

    Thank you
    Praktikant

  10. #10
    Intermediate Intermediate HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    35
    Points
    562.5
    Hi,

    Quote Originally Posted by Praktikant View Post
    Hello,

    I am working on tricore tc299tf and trying to initialize system timer interrupt. I have tried to use the examples that are explained here however my timer interrupt is still not working perfectly. I want to get tick every 1microsec. Could anyone help me with the issue ?

    Thank you
    Praktikant
    It's my guess that your immediate need is to experiment and get the system timer running at 1 us. While this thread does indeed focus on the system timer it also introduces an extra layer of complexity through its multi-core nature. It might be advisable to start single core at first, but it obviously depends on your need whether that's acceptable or not.

    If single core is OK for now, then you should be able to get things running by means of tweaking the timedemo that I'm referring to in the other thread you also posted to. I'm referring to my posting on 30JUL2017 specifically. This example contains a function called TimerInit() which calculates at runtime the reload value based on the ratio of the system clock frequency and your desired frequency. Since you're after a 1 us tick, feeding it with 1e6, should be a step in the right direction.

    You can also decide to use the iLLD library. Like our example, it also offers functions that can dynamically calculate the number of ticks that are required to trigger an interrupt every 1 us. You'd need IfxStm_getTicksFromMicroseconds() for that. This can be made to work also, although I expect it introduces an additional learning curve for getting a good grasp on the iLLD API.

    It's probably best to first consider the above two choices and decide which one suits you best. My advise would be to start with the example included in the product and work from there. My posting explains how to rig it up. Obviously, since you use a different board, you'd have to select the board that applies to your case instead. Am I right you're using this one?

    Best regards,

    Henk-Piet Glas
    Principal Technical Specialist

+ 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.