I'm compiling and running GPIO_EXTI example code for Nucleo-F767ZI board (on SW4STM32). The handler that blinks LED1 isn't connected and this matches what readme.txt says:
In this example:
- EXTI_Line15_10 is connected to PC.13 pin
- when falling edge is detected on EXTI_Line15_10 by pressing User push-button, LED1 toggles once
- EXTI_Line15_10 is connected to User push-button
So, handler isn't set for the Nucleo board. When I push user button and pause (debugging) the program, it is then in default handler / infinite loop. All correct.
However, the program never goes beyond those lines of EXTI15_10_IRQHandler_Config(void):
/* Enable and set EXTI line 15_10 Interrupt to the lowest priority */
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 2, 0);
When I pause, I'm still in HAL_NVIC_EnableIRQ(), the program never returns to main() to do its infinite while() loop. As already said above, it however does react to user button, so the IRQ is correctly enabled.
I attach state after step-into the function, and step over its content. As it can be seen, the program forever runs that line (thread state says: "Running: Step").
UPDATE: Here is the source code (main.c) of the GPIO_EXTI example, copied from official CubeMX package for F767 (V1.5.1): [C++] STM32 official example GPIO_EXTI for Nucleo-F767ZI - Pastebin.com