NMI pin as GPIO in KL-17

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NMI pin as GPIO in KL-17

1,315 Views
rajathks
Contributor II

Hi all,


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.

Thank You
Raj

Labels (1)
Tags (2)
0 Kudos
4 Replies

988 Views
ankurmittal
Contributor II

Hi Rajath,

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

NMI Disabled.png

(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

Ankur Mittal 

0 Kudos

988 Views
rajathks
Contributor II

Thank You for you reply ankur.

Thanks & Regards,

Raj

0 Kudos

988 Views
mjbcswitzerland
Specialist V

Hi

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.

Regards

Mark

0 Kudos

988 Views
rajathks
Contributor II

Thank You mark..That helped me n solving the problem im facing :smileyhappy:

Thanks & Regards,

Raj

0 Kudos