Currently im working on KL-17 (MKL17Z256xxx4 derivative). I'm facing the following issue.
For development of my application i need to use PTA-4 pin as GPIO which has default state as NMI. Though i'm initialising PTA-4 as GPIO, its going to Nmi handler. While powering on the device the PTA-4 pin status is getting LOW where its has to be high. Is there anything that i have do in boot-loader side ? Can someone help me to resolve this issue.
I do not know how or what your application is working. But I can suggest you the solutions I used for a similar problem on Freescale MKE02Z (ARM CM0+).
You could initially try to disable the NMI Pin on MCU and change it as GPIO at the time of programming itself (For MKE02 it is clearing NMIE Bit in SIM_SOPT Register at 0x40048004). This can be done easily done using J-Link by using an init step: Write 32bit 40048004 00000008
(This can also be done for other programmers/debuggers also).
Or as you said that you are already initialising the NMI Pin as GPIO in your code, you could also try the same in NMI handler. This is a little dirty but but working.
Thanks and Regards
The NMI pin is disabled if you use the ROM loader.
If you are disabling the ROM loader you need also to disable the NMI function [NMI_DIS in Flash Option Register - a flash configuration setting] so that it doesn't take the NMI vector immediately out of reset.