I need to create a task when a certain condition occurs within an interrupt service routine. May I use os_create_task ? If not, haw can i do?
No you cannot make an os call from an interrupt routine and you cannot make an isr call from a task. Create a normal task and use an os_wait(K_SIG,0,0)in the task. In the isr use the isr_send_sig(id) to clear the wait. If you need to change the task priority use the isr_set_ready(id) call. Interupt routines make isr calls and Tasks make os calls.