Hi, I would like to know how can I disable the NMI_DIS bit on FTFA_FOPT using KDSK 2.0 new API?
My problem is that I have a custom board (MKL43Z MCU) and I'm using PTA4 as input, so the NMI Interrupt occurs when it is in low state... Fortunately in this pin I have a dip switch pulled up to manage this problem while I develop my application, but it will be very useful to know how I can solve the NMI interrupt as well.
Best Regards
Matías
Solved! Go to Solution.
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
Ok, Thank you David!
It is working fine now, I saw some FTFA_FOPT defines in MKL43Z4.h but I didn't find the way to apply them.
Best Regards
Matias
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