AnsweredAssumed Answered

How to diable NMI on a PIN to make it a GPIO

Question asked by Mohan Gandhi Vinnakota on Mar 24, 2020
Latest reply on Mar 26, 2020 by Sebastián Del Río


I am working with FRDM-KE06Z.

I have few doubts . I am new to microcontroller programming. in the microcontroller I see that PTB4 is default a NMI pin. Actually I wanted to use it as a GPIO. How can I make that pin a GPIO. Which register I should look into?.

Also another question that I would like to write some value to the register PORT_FILTER0. 

I dont see the macro to access the register.

I found the address macro in MKE06Z4.h. like below


#define PORT_BASE (0x40049000u)
/** Peripheral PORT base pointer */
#define PORT ((PORT_Type *)PORT_BASE)
/** Array initializer of PORT peripheral base addresses */
/** Array initializer of PORT peripheral base pointers */


In the main.c file I made a small function like below to write some data in to the register.


void Glitch_Filter(PORT_Type *base)
base-> IOFLT0 = 0x40020003;


Is that right?.