A hands-on walkthrough of how CPU context switching works on ARM Cortex-M microcontrollers, using a TI LaunchPad board as the example platform. By manually manipulating the interrupt stack frame's PC entry during a SysTick handler breakpoint, the demonstration shows how returning from an interrupt to a different address enables switching between two independent background loops (main_blinky1 and main_blinky2) that each blink a different LED. The exercise builds intuition for multitasking on a single CPU and introduces the concept of an RTOS kernel as the software that automates this context-switching process.
•4m watch time
2 Impressions