中文English
stm32芯片引脚图ichaiyang 2024-05-10 3:49 32
These two sentences in STM32 mean that the 8 and 9 pins of the PB port are used as trigger signals for external interrupts, so Pin_8 and Pin_9 should be set to the input mode.GPIO_...

In STM32, what is the use of setting GPIO_Mode_IPU?

These two sentences in STM32 mean that the 8 and 9 pins of the PB port are used as trigger signals for external interrupts, so Pin_8 and Pin_9 should be set to the input mode.

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;

IPU refers to the working mode of the IO port is to bring the pull input, which is related to the specific circuit;

In short, if you select an IO port as the trigger signal of an external interrupt, you must configure this IO port as the input mode, otherwise the interrupt cannot be triggered.