We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Is it possible to use os_create_task() from rtx tiny from within an ISR? Can it corrupt the stack?
No you cannot use functions that start with os_ within interrupt routines. You must use functions that start with isr_ from interrupts.
Therefore it is not possible to create a task within an interrupt service routine.
To guarantee a task is created, use os_create_task() from task 0's initialization code, i.e. before it does any work. The created task can then be then run, but arrange for the created task to block with os_wait1(). Later on, at the end of initialization, turn on the interrupts. An isr_send_signal() within the ISR handler then wakes it up, and you get the effect I think you want.