Hi Customer,
It is not the problem, it can be said just the KEAZN16 feature, not only the KEA have this feature, KE series also have this feature.
NMI pin can't be disabled permanently!
From the reference manual, you also can find this feature:

Actually, even you disable the function in SIM_SOPT[NMIE], but take care, this is just use the code to disable it.
But after reset, the PTB4 already be NMI function in default.
So, if you want to use the NMI pin as the other function. You must make sure during the reset, you should keep the NMI pin to high in the outside circuit.
Actually, I also don't recommend the customer to use the SWD and NMI pin to other functions, just for this reason.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------