Menu
![](/uploads/1/2/5/7/125745164/650194199.jpg)
Is it possible to configure a GPIO input that sets a flag when rising or falling edge is detected without interrupting the CPU? I can then check the status of the flag in the main superloop? There is an option in CubeMX to configure the GPIO mode as 'External Event Mode with Rising/Falling edge trigger detection' but I'm not sure how to read the event flag. Is this the correct mode to achieve this?
STM32F4 GPIO Configuration. Like most other micro controllers the GPIO pins can have multiple configurations and mappings. In this small tutorial, I’ll show the high level functions provided by the GPIO peripheral provided by CooCox. In another post I will dig in the deeper, low level details by explaining the registers needed for configuring. また、gpioの初期化をした後に安心してgpioピンとspi1の周辺回路を同期させることを忘れないでください。 次に設定しているのはNSSピンです。 NSSは予めOutputにしておくことで、Slaveを選択していない状態にしています。.
b7031719b7031719
1 Answer
I'm not sure about the event mode (haven't used them before) but you could also use the
External Interrupt Mode with ..
Gt4 garage editor. as long as you don't activated the IRQ Handler in the NVIC the CPU is not interrupted by any pin change.![Stm32f4 Stm32f4](http://www.icstation.com/images/big/products/11882_0820.jpg)
The information if an event/interrupt has occurred could be found in the
EXTI_PR
register. (See reference manual 12.3.6)theSealiontheSealion
![Stm32f4 Union Gpio Stm32f4 Union Gpio](/uploads/1/2/5/7/125745164/603855638.png)
Not the answer you're looking for? Browse other questions tagged stm32stm32f4cubemx or ask your own question.
![](/uploads/1/2/5/7/125745164/650194199.jpg)