STM32 ARM Cortex-M4 NVIC: Preemption vs. Sub-Priority Explained

Опубликовано: 23 Май 2026
на канале: Murat Gül
27
2

In this video, we dive into the ARM Cortex-M4 NVIC (Nested Vectored Interrupt Controller) to demonstrate the critical difference between Preemption Priority and Sub-Priority using an STM32 microcontroller.

Watch how hardware interrupts behave in real-time using 3 push buttons and 3 LEDs:
🔴 Red LED: Highest Preemption Priority (Can interrupt other processes instantly).
🟢🟡 Green & Yellow LEDs: Same Preemption Priority, but different Sub-Priorities (Demonstrating how pending interrupts are queued and executed).

💻 You can find the full C code and STM32CubeMX configuration in my GitHub repository: [github.com/Murat-Gul1]

#STM32 #ARMCortexM4 #EmbeddedSystems #Microcontroller #Interrupts #CProgramming