In case a non-gpio EXTI (>= 16) is pending, the isr_exti() used to clear the flag and try to call a callback, which was out-of-bouds, thus generating a hard fault. This fixes it by masking the pending_isr variables with 0xFFFF.