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.

What should it be done to enable FIQ interrupts

Other Parts Discussed in Thread: OMAPL138, SYSBIOS

Hello,

I am using SYS/BIOS 6.35.3.47 and OMAPL138. To enable the FIQs, the function Hwi_enableFIQ is called before BIOS_start() is called. And the priority 0 is assigned to myISR.

To using the function Hwi_eneableFIQ in my code, the header file "ti/sysbios/family/arm/da830/Hwi.h"  is included instead of "ti/sysbios/hal/Hwi.h".

Is the ti/sysbios/family/arm/da830/Hwi.h correct choice for my hardware ? (I expect da850 instead of da830).

My application has been crashed within myISR with the following message

Can't find a source file at "c:\docume~1\demiralp\locals~1\temp\ti_mkl~1\src/exit.c"

Before I decide to use FIQs and applied Them in my code, myISR was run properly as I expected.

Any help, suggestion would be appropriated

Thank.

  • Hi Fehmi,

    when using FIQ interrupts on the ARM9, you really can't call any SYS/BIOS APIs (other than a call to Hwi_post()). To use SYS/BIOS APIs within an interrupt, it needs to be a regular IRQ interrupt.

  • Hello Tom,

    My FIQ interrupt's function does not call any SYS/BIOS API's if you mean that. 

    The one of the error message appeared on the console windows is the following one after the crashed happens.

    [ARM9_0] ti.sysbios.knl.Task: line 370: E_spOutOfBounds: Task 0xc0a95d04 stack error, SP = 0xc0a2996c.
    xdc.runtime.Error.raise: terminating execution

     I have checked the stack of entire my tasks by using the ROV view but no one of them reach the size of  their stack size. I also increased the stack size of my Task but it could not change situation.

       

  • Hi Fehmi,

    Is your interrupt handler dispatched or non-dispatched?

    I see in the BIOS API guide that "Hwi_beginFIQ()" must be invoked at the beginning of a non-dispatched FIQ handler.  Similar for Hwi_endFIQ().

    Fehmi Demiralp said:
    [ARM9_0] ti.sysbios.knl.Task: line 370: E_spOutOfBounds: Task 0xc0a95d04 stack error, SP = 0xc0a2996c.
    xdc.runtime.Error.raise: terminating execution

    Can you please paste a screen shot of the ROV Task module (advanced) view when this happens?  Along with the full error output?

    Also, in ROV, can you run the "scan for errors" feature that's found in the BIOS module view?

    Steve

  • Hi Steve,

    I'll try to give you a brief summary what we have done up to now and also what our development environment is.

    I have changed our code as you point in your previous message, I believe. And the error message We had got has been changed. 

     

    We use:

    CCS version 5.3.0.0

    SYS/BIOS 6.35.3.47

    the Programming Language is C++

    Our XDC script file contains the following lines:

    ...

    var Hwi = xdc.useModule('ti.sysbios.family.arm.da830.Hwi');

    ...

    var hwi2Params = new Hwi.Params( );
    hwi2Params.instance.name = "hwi2";
    hwi2Params.priority = 0;
    hwi2Params.enableInt = false;
    Program.global.hwi2 = Hwi.create( 42, "&Hwi2", hwi2Params);

    There are two more FIQ interrupts that are defined like above.

    Their ISR Functions define in a .cpp file like bellow:

    extern "C" interrupt void Hwi2( )

    {

       Hwi_beginFIQ( );

    ....

      Hwi_endFIQ( );

    }

    And no other SYS/BIOS commands are called in that ISR functions.

    the include file <ti/sysbios/family/arm/da830/Hwi.h> is included instead of  <ti/sysbios/hal/Hwi.h> where it is necessary.

    Hwi_enableFIQ( ) is called before BIOS_start( ) is called.

    When Our FIQ interrupt is triggered, the ISR runs but after that the application is crashed with the following error message dumped on the console window. 

    ti.sysbios.family.arm.exc.Exception: line 180: E_undefinedInstruction: pc = 0x01e188fc, lr = 0x01c0400d.
    xdc.runtime.Error.raise: terminating execution
    Exception occurred in ThreadType_Task.
    Task handle: 0xc0a957b4.
    Task stack base: 0xc0a29270.
    Task stack size: 0x800.
    R0 = 0x00000000 R8 = 0xffffffff
    R1 = 0x00000000 R9 = 0xffffffff
    R2 = 0xc0a9472c R10 = 0xffffffff
    R3 = 0xebd4a68a R11 = 0xffffffff
    R4 = 0xc0a962ac R12 = 0x00000002
    R5 = 0xc0a94728 SP(R13) = 0xc0a29a38
    R6 = 0xc0a944b8 LR(R14) = 0xc0a74ddc
    R7 = 0xc0a944a8 PC(R15) = 0x01c04004
    PSR = 0x6000009f
    ti.sysbios.family.arm.exc.Exception: line 180: E_undefinedInstruction: pc = 0x01c04004, lr = 0xc0a74ddc.
    xdc.runtime.Error.raise: terminating execution

    and also loader exit with the message

    Can't find a source file at "c:\docume~1\user1\locals~1\temp\ti_mkl~1\src/exit.c"
    Locate the file or edit the source lookup path to include its location.

    BIOS scan for errors shows only one line

    ,xdc.runtime.LoggerBuf,Records,0xc0a9742c,Record #1,ERROR: "(unknown file)", line 180: E_undefinedInstruction: pc = 0x01c04004, lr = 0xc0a74ddc.

    and ROV, HWi basic is like following

     And The ROV for Task objects

    Tanks in advans for your help

    Fehmi

  • Fehmi,

    I don’t have direct experience with using FIQs, but have a couple of comments…

    In another forum thread about using FIQs (http://e2e.ti.com/support/embedded/bios/f/355/p/110242/392213.aspx#392213), the INTERRUPT pragma is used, versus just the interrupt keyword as in your code.  And the pragma takes an interrupt_type argument, which defaults to IRQ if not specified. 

    So I’m wondering if you try using the pragma, and specifying FIQ, if that works.

    Also, you might try specifying the interrupt type as “Hwi_Type_FIQ”, as described in that same thread.

    Hope this helps some…

    Scott

  • Thank you very much for entire the answers and advices.

    The mistake in my code was the using the SYS/BIOS command in the FIQ interrupt's handler.

    Best regards

    Fehmi