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

isr_evt_set() doesn't work

It is just a simple test. The timer will trigger a task every 20ms. But the led never becomes on.
I have tried every method I can found but I still can't figure it out what wrong with it.
Please help me. Thank you very much.

OS_TID LED_Task;

__task void Task_LED(void)
{

while(1){
os_evt_wait_or(0x0001, 0xffff);
LED2_ON();
}
}

__task void init_task (void) {

LED_Task = os_tsk_create(Task_LED,2);
TIM_Cmd(TIM2, ENABLE);
os_tsk_delete_self ();
}

void TIM2_IRQHandler(void) {
        isr_evt_set(0x0001,LED_Task);
}



Parents Reply Children
No data