K22 RESET line: Is a pull-up and a cap required?

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

K22 RESET line: Is a pull-up and a cap required?

Jump to solution
1,948 Views
laszlomonda
Contributor IV

Hi there,

We're using the MK22FN512VLH12 in our open source keyboard.

The last time I checked the schematic of the FRDM-K22F board, I noticed that it uses a 10K pull-up and a 0.1uF bypass cap on the RESET line, so I just copied this aspect of the design, and it worked well.

Recently, an EE friend of mine suggested to ditch these components, saying that the MCU should already have an internal pull-up, and the bypass cap doesn't serve a good purpose, so I purposefully not soldered these components to our latest prototype.

Lo and behold, after connecting the prototype to USB, KBOOT didn't enumerate as it usually does. On top of that, the MCU was behaving as it was locked upon trying to connect to it with Segger J-Link. This is the output of JLink Commander (JLink.exe):

Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: MK22FN512XXX12
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MK22FN512XXX12" selected.


Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Device will be unsecured now.
Note: Unsecuring will trigger a mass erase of the internal flash.
Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Device will be unsecured now.
Note: Unsecuring will trigger a mass erase of the internal flash.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Device will be unsecured now.
Note: Unsecuring will trigger a mass erase of the internal flash.
Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Device will be unsecured now.
Note: Unsecuring will trigger a mass erase of the internal flash.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Cannot connect to target.

My questions are:

  1. Was this erratic behavior clearly caused by not having the pull-up and the bypass cap on board?
  2. Can I leave out either of these components without any consequences? If so, which one?
  3. Do I have to use exactly a 10K pull-up? Our design already features 4.7K and 24K resistors, so it'd be nice to use one of these values. Which of them should we use, if any?

Thanks in advance for your help!

- Laci

1 Solution
1,144 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Laci,

  No, please add the external pull up resistor and capacitor in the reset pin, not only reset pin, NMI pin also need to add the external pull up resistor, because the internal pull up is weak.

  You can find the recommendation in the kinetis peripheral module quick reference:

http://www.nxp.com/assets/documents/data/en/quick-start-guide/KQRUG.pdf 

Page 28.

  About the secure, please refer to this document:

Kinetis Lock issue analysis and unlock way.pdf

 If your reset pin power up eariler than VDD, it will lock the chip and hard to recover.

So, please take care, in the practical usage, please use the recommended design.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

4 Replies
1,145 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Laci,

  No, please add the external pull up resistor and capacitor in the reset pin, not only reset pin, NMI pin also need to add the external pull up resistor, because the internal pull up is weak.

  You can find the recommendation in the kinetis peripheral module quick reference:

http://www.nxp.com/assets/documents/data/en/quick-start-guide/KQRUG.pdf 

Page 28.

  About the secure, please refer to this document:

Kinetis Lock issue analysis and unlock way.pdf

 If your reset pin power up eariler than VDD, it will lock the chip and hard to recover.

So, please take care, in the practical usage, please use the recommended design.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,144 Views
laszlomonda
Contributor IV

Thank you so much, Kerry! Your answer helped a lot and explained the issue clearly.

If I use the NMI pin as a GPIO out pin, I assume that I don't need an external pull-up, right?

- Laci

0 Kudos
1,144 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Laci,

   Yes, if you disable the NMI function, you don't need an external pull-up resistor.

  Please note, disable the NMI function should modify the flash configuration field,FOPT[2]=0,  the flash address is 0x40d.

Wish it helps you!

Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,144 Views
laszlomonda
Contributor IV

Got it, Kerry. Thank you so much for your help!

0 Kudos