Lab02 (1)
Lab02 (1)
Lab 02
1 OBJECTIVES
• Configure external interrupt (EXTI) in CubeMX and generate Code
• Add into project Callback function and function which turn on led
• Verify the correct functionality by pressing button which turns on LED
An interrupt is any process that momentarily stops an ongoing program execution and requires the MCU to
execute specialized code related to the event that initiated the interrupt. This specialized code is known as an
interrupt handler (ISR). In ARM terminology, all interrupts whether they are hardware or software initiated
are called exceptions.
The ARM Cortex-M integrated peripheral contains a hardware device called the nested vector interrupt
controller (NVIC) whose purpose is to manage exceptions (See Figure 1). The NVIC is fully integrated into the
HAL software framework and uses its own C structures to set up a variety of registers.
Figure 1 illustrates two types of peripherals: those that are external to the Cortex-M core but internal to the
STM32 MCU (e.g., timers, UARTs, etc.) and those that are entirely external to the MCU. The External
Interrupt/Event Controller (EXTI) manages the connection between external I/O signals and the Nested
Vectored Interrupt Controller (NVIC)..