Interrupts : Interrupt vs. Polling

int main()
{
    while(1){
        . . .
    }
}

OnSwitch_ISR{
    getData()
}

Interrupt

int main()
{
    while(1){
        if(switch = on ){
            getData();
        }
        . . .
    }
}

Polling


Interrupts NVIC

image.png

Interrupts: The Vector Table

The vector table contains the addresses of the Interrupt Handlers and Exception Handlers.

image.png

Interrupts: External Interrupt (EXTI) Lines

image.png