This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SYS/BIOS timer irq interaction

Other Parts Discussed in Thread: OMAP-L138, SYSBIOS

I am trying to add a timer irq to my sys/bios configuration. 

When I first clicked add I got an error, "Timer 0 is already in use or reserved (check availMask)." OK.  I think I understand that message.

Changed the Timer Id to 2.  Now I get another error, "Hwi 6 already in use (by &hwiECAP2)." 

Obviously there is some kind of hidden interaction going on here. Are there other hidden IRQ interactions?  Is there some place where all of this is explained?

  • Kurt,

    Providing conflict-free default timer interrupt number selection is one of the more frustrating problems we face in the SYS/BIOS product.

    By the interrupt number in conflict, I assume you are developing DSP code for an OMAP-L138 or similar device?

    You can get around this issue by explicitly setting the 'intNum' instance config parameter to the interrupt number you want the timer to use when you create it.

    Of course, you have to pick an interrupt that's not already in use by some other interrupt-generating-peripheral in your application.

    Alan

  • Hi Alan,

    I would like to know is if there is some information to help design the system.  Yeah, I can pick another interrupt but it would be nice to know what interrupts are in use.  I could experiment to create a table of used and available interrupts.  Was hoping that info was already available.

    Kurt

  • Sadly, I don't think there is a 'System Designer's Guide' to help with this problem.

    Generally speaking though, SYS/BIOS itself uses only one interrupt: the timer interrupt associated with the Clock tick. I can't speak for other libraries used within the application.

    Once you have successfully built the application (after picking a non-conflicting interrupt), you can find out what interrupts are being used in the system in two ways.

    1) If you are using CCS and you are familiar with the usage of ROV, then after loading your application and running to main, browse to the Hwi module ROV view and it will show you a list of all the statically configured interrupts in the system.

    2) If you are not using CCS, you can get the same information, albeit with a bit more difficulty,  by inspecting  the generated app.c file created during the build process. By examining the vector table defined in this file which begins with these lines:

    /*
     * ======== ti.sysbios.family.c64p.Hwi TEMPLATE ========
     */

    Search for "ti_sysbios_family_c64p_HwiX" entries that reference the 'ti_sysbios_family_c64p_Hwi_dispatchAlways' symbol. Those are the statically configured interrupts.

    ---

    Another approach, if you are willing to temporarily modify one of the files in your SYS/BIOS installation, is to uncomment this line in the ti/sysbios/family/c64p/Hwi.xs file:

        // print ("In Hwi Instance init", intNum, fxn);

    and then rebuild your application.

    For each statically created interrupt, a line identifying the interrupt number and associated function name will be printed in the build log.

    Alan