So the code started working after the debugger was disconnected and a power reset was done on the target board.
We have an application where we need to trigger an interrupt on either edges at a GPIO input (PTB5) of MKL02Z16. The configuration is done as below:
PORTB_PCR5 &= 0xfff0f9a8;
PORTB_PCR5 |= 0x000b0100; // Mux Option Alt1 for GPIO, Interrupt on rising or falling edge
And the reset pin for SWD is on PTA1 which is pulled up to 3.3V via a 10k resistor and 0.1uF capacitor to ground. When we connect the PTB5 to GND which is it's normal operating condition, the reset pin toggles as below and the application does not work:

When the PTB5 is left floating or pulled up to 3.3V, the reset pin remains high and the other functions operate as expected. But I need the board to operate when the PTB5 is grounded and trigger interrupt when it sees a rising edge at its input. Could you please help me understand why this could be happening? And what should I be looking at to resolve this isssue?