Hi Matias,
In KSDK_v2 for the MKL43Z you can make the following change to the default FOPT[NMI] bit setting to disable NMI operation in file startup_MKL43Z4.S:
/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF3bFE /* //DES disable NMI */
/* .long 0xFFFF3FFE */ //DES default
I tested this using the gpio_input_interrrupt_frdmkl43z example.
When running it without modification, set a breakpoint in the NMI_Handler in the same assembly file as mentioned above.
Then without running the code yet, press the SW1 which is the NMI pin. Once pressed, run the code and it should hit the breakpoint in the NMI_Handler.
Now make modification to code. Re-compile, re-test and the NMI breakpoint will not occur.
Regards,
David