Current location - Education and Training Encyclopedia - Graduation thesis - STM32 interrupt function
STM32 interrupt function
EXTI0 _ IRQChannel

Represents the interrupt function corresponding to the external interrupt line EXTI0.

Take STM32F 103VB series as an example, 100pin,

Generally speaking, we usually use IO corresponding to external interrupt lines as follows:

PA0、PB0、PC0、PD0、PE0

Interrupt line corresponding to EXTI0;

etc

To pa 15, Pb 15, PC 15, PD 15, PE 15 corresponding to EXTI5 interrupt.

The interrupt function corresponding to EXTI0 is EXTI0 _ IRQChannel.

The corresponding interrupt function of EXTI 1 is Exti1_ irqchannel;

The interrupt function corresponding to EXTI2 is EXTI2 _ IRQChannel.

The interrupt function corresponding to ext 3 is EXTI3 _ IRQChannel.

The interrupt function corresponding to EXTI4 is EXTI4 _ IRQChannel.

EXTI5

-& gt;

The interrupt function corresponding to EXTI9 is EXTI9 _ 5 _ IRQHandler.

EXTI 10

-& gt;

The interrupt function corresponding to EXTI 15 is Exti15 _10 _ irqHandler;

If you use any type of interrupt, initialize any type of interrupt.

Then write what you want to achieve in the interrupt function,

Note that it is not easy to operate the interrupt function too much.

There are many basic examples on the internet, such as keystroke program, alarm clock interruption,

You can have a look.