Sorry for my later reply because of China's National Day and Mid-Autumn Festival.

I don't think if the NMI is enabled, other interrupts are failed if your NMI interrupt is not triggered.

You can make sure PTB5 is higher, then check other interrupt, it should works. But if your NMI is low, your code will enter NMI interrupt and always in that handler, it will caused other interrupt can't enter.