Nucleo F746ZG PC13 User Button Triggering Interrupt on Init
I have a Nucleo 144-pin F746ZG and I want to configure the user button (PC13, pulled to ground according to MB1137 schematic) to toggle an onboard LED on a falling edge via EXTI interrupt.

I am using this sequence to initialize the interrupt handling:
1) Initialize SYSCFG.
2) Initialize GPIOC Clock.
3) Initialize GPIO registers for PC13, Falling Edge Trigger and Unmask.
4) Initialize SYSCFG_EXTICR, followed by ISER.
An issue I am running into is that on a falling edge it always triggers an interrupt after the initialization is done, even when I pull the pin low via PUPDR. Upon unmasking EXTI_IMR, the EXTI_PR bit is set to 1. If I change the order of the steps the issue goes away, but I doubt I am supposed to do this. What am I overlooking?
