MKE02Z64VLC2 gpio pin is always high

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

MKE02Z64VLC2 gpio pin is always high

Jump to solution
609 Views
gcastro
Contributor I

I am experiencing a weird problem with the MKE02Z64VLC2. The port pin PTB4 (pin 10 on the LQFP package) is always high, except after programming the device.

Even out of the package, without any firmware on it, as soon as the device is powered, the aforementioned pin is high (tested on 5 devices with and without firmware).

I mounted a fresh, un-programmed chip by itself (with only the clock circuit and decoupling caps) on an empty board, bent the pin upwards so i would not touch anything, and the pin was set to vcc.

No other gpio pins have the same behavior, i can program the device normally, and the device otherwise functions just fine, with i2c, TIM, gpios and other peripherals.

I tried to set the pin as an input, then later as output, tried disabling internal pull up (it wasn't set to high in the first place, but i tried anyways) and no go.

The only thing that seems to get the pin working normally as an gpio output is right after programming it. But on power cycle, it goes back to being set to high full time.

I would appreciate any insight with regards to this problem.

Labels (1)
0 Kudos
1 Solution
590 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello gcastro

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you. My name is Omar and I will gladly help you with this.

The default state of the PTB4 is in NMI. To change the state of this pin, first, you need to clear the NMIE field in the SIM_SOPT register.
This write-once field can be written after any reset. If this field is set an internal pullup device on NMI is enabled.

 

Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar

View solution in original post

0 Kudos
2 Replies
591 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello gcastro

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you. My name is Omar and I will gladly help you with this.

The default state of the PTB4 is in NMI. To change the state of this pin, first, you need to clear the NMIE field in the SIM_SOPT register.
This write-once field can be written after any reset. If this field is set an internal pullup device on NMI is enabled.

 

Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos
580 Views
gcastro
Contributor I

Thanks, changing the NMI pin function seemed to solve the issue. I misinterpreted the reference manual and thought that the pin had to be specifically set to be NMI, and i was thinking it was some weird pull-up issue.

 

Thanks for the help

0 Kudos