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

Keil RTX Task, FIQ & SW IRQ Interraction

Hello,

Besides an RTX task polling, is there any glue that interconnects an FIQ with an RTX task?

Details below and thank you for your help,
Lonnie

Details
I have a peripheral driver (ARM Cortex) that is asynchronous and triggers an FIQ when it receives data. The FIQ analyzes the data (checks to see if it had received the correct closing sequence). Now, somehow I need to inform an RTX task that the complete set of data has been received.

Since FIQ cannot call RTX functions, how can I inform the task that there is data ready?
I can only think of polling.

Unless, there is some way to mate an RTX software interrupt to the peripheral?

Parents
  • ARM Cortex-M3 (ST STM32)
    According to the > RL-RTX > Theory of Operation > Interrupt Functions
    -You cannot call the isr_ library functions from the FIQ interrupt function.
    www.keil.com/.../rlarm_ar_inter_funct.htm

    With this in mind, I could have a task pole for a bit

    /* global bit that is poled for completion */
    volatile BIT bRcvdMsg = __FALSE;
    
    void USART1_IRQHandler(void)
    {
        /* do some message checking here and if
        ** ok - then inform the task by setting a bit */
        bRcvdMsg = __TRUE;
    }
    
    __task void taskUSARTPollingTask( void )
    {
        for(;;)
        {
    
            /* Just wait for a complete message to be received to inform
            **              the RS232 Handler Task */
    
            if(bRcvdMsg == __TRUE)
                /* Inform the RS232 Handler Task */
                isr_evt_set ( EM_DSP_USART_RCVD , g_taskCLI);
    
            os_dly_wait (20);
        }
    }
    
    

    --- OR ---

    May be use SVC Functions or SWI Functions to map to the interrupt handler? Then use that to trigger the task. I haven't really seen this done in a task where they were using the RTX (at least not for the IC I am using). Any ideas?

Reply
  • ARM Cortex-M3 (ST STM32)
    According to the > RL-RTX > Theory of Operation > Interrupt Functions
    -You cannot call the isr_ library functions from the FIQ interrupt function.
    www.keil.com/.../rlarm_ar_inter_funct.htm

    With this in mind, I could have a task pole for a bit

    /* global bit that is poled for completion */
    volatile BIT bRcvdMsg = __FALSE;
    
    void USART1_IRQHandler(void)
    {
        /* do some message checking here and if
        ** ok - then inform the task by setting a bit */
        bRcvdMsg = __TRUE;
    }
    
    __task void taskUSARTPollingTask( void )
    {
        for(;;)
        {
    
            /* Just wait for a complete message to be received to inform
            **              the RS232 Handler Task */
    
            if(bRcvdMsg == __TRUE)
                /* Inform the RS232 Handler Task */
                isr_evt_set ( EM_DSP_USART_RCVD , g_taskCLI);
    
            os_dly_wait (20);
        }
    }
    
    

    --- OR ---

    May be use SVC Functions or SWI Functions to map to the interrupt handler? Then use that to trigger the task. I haven't really seen this done in a task where they were using the RTX (at least not for the IC I am using). Any ideas?

Children