This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RL-ARM FIQ Problem

Hi all,

I am developing a system based on LPC2292, a ARM7TDMI-S core chip, using RealView Compiler and RTX Kernel. Since a quick response to external events is needed, I try to replace IRQ by FIQ. When IRQ is used, the program work normally but some external triggers are lost. Under condition that FIQ is enabled and external triggers are input continuously, the program seems crashed or hung on somewhere, for example os_dly_wait() function. If I cut out the external triggers, which generate FIQ interrupts, the system goes normally. I think that FIQ caused the system run into an unpredicted place. Can anyone make some suggestion to me? The following is my operation for enabling a FIQ in my program. According to User's Guide from MDK and some examples, I modified the Startup.s file to import a FIQ_Handler.(Please refer my following copy of sections in my Startup.s)

/*This is the service function and initializing function for FIQ interrupt*/
extern void FIQ_Handler(void) __irq
{
        if (IOPIN0&0x00010000)
                pstZBcnt--;
        else
                pstZBcnt++;
        EXTINT          = 0x00000004;
        VICVectAddr = 0x00000000;
}

void InitEint2(void)
{
        PINSEL0 |=(P0_15_EINT2<<P0_15_PINSEL);    //EXTINT2 interrupt as DCP20,第99脚
        EXTMODE |= 0x00000004;
        EXTPOLAR|= 0x00000004;
        VICIntSelect |= VICEnableEINT2;
        EXTINT          = 0x00000004;
        VICIntEnable  = VICEnableEINT2;
}

/*BOLD  text is my Modification in Startup.s*/
        PRESERVE8 

        AREA    RESET, CODE, READONLY
         ARM

         IMPORT        FIQ_Handler 
Reset_Addr      DCD     Reset_Handler
         :
FIQ_Addr        DCD     FIQ_Handler
         :
IRQ_Handler     B       IRQ_Handler
                B       FIQ_Handler 


Does anyone ever confront of the same problem as my program? Any recommendation, introduction, solution, or materials for reading is welcome. Thanks.

0