Documente Academic
Documente Profesional
Documente Cultură
in2305-II: L7
OS Delay Processing
highest priority task starts first context switch timer ISR RTOS Task 1 Task 2 timer IRQ
tick
tick
OS_Delay(2)
delay expired
in2305-II: L7
X32: Demo
in2305-II: L7
in2305-II: L7
ISR Deadlock!
interrupt
in2305-II: L7
OS_Post
10
OSIntEnter(); // warn uC/OS not to reschedule if (peripherals[BUTTONS] & 0x01) // button 0 OS_Post(event); // signal event OSIntExit(); // uC/OS free to reschedule }
OS_Post
If no ISR nesting counted, RTOS would reschedule instead of allowing low prio ISR to finish!
in2305-II: L7 12
X32: Demo
in2305-II: L7
13