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

External Interrupt handling with RTX Kernel

Hi;
I have been working on a simple project a couple of week now. It has two task which work simultaneously, and an interrupt handler in order to catch user button input.the board i use is stm32l152-discovery board.

the problem is that whenever i push the button to create an interrupt , system hangs on hardware fault exception handler.There is no problem with tasks.
code I wrote is below.

When i push the button, it comes to irq handler but never goes to buttoncallBack task insted of this , it hangs on harware fault handler.

Please take a look .Thanks...

__irq void EXTI0_IRQHandler(void)
{
     os_evt_set (0x0001, id_buttoncallBack);
     EXTI_ClearITPendingBit(EXTI_Line0);
}

__task void buttoncallBack (void)
{
  while (1)
 {
    os_evt_wait_or (0x0001, 0xffff);   /* wait for an event flag 0x0001 */

        ;stuff to do...
 }
}

0