Help needed with MK22FN512VLL12 bring-up...

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

Help needed with MK22FN512VLL12 bring-up...

859 Views
lbedatsky
Contributor I

We are using a Kinetics MK22FN512VLL12 MicroController for the first time, on a pcb that we are bringing up.. We cannot connect to the processor's SWD interface. We are using a Segger J-Link adapter for the board bring-up SWD interface... with J-Link Commander software (Windows 10). When connecting to the SWD port using the Segger, there is a light on the J-Link (normally green) that turns orange, and we receive connection errors in the Commander software.

I have attached the log file and schematic for our design.

As an aside, I took a look at the processor RESET-b line with a scope (pin 52, with nothing else connected to it), please see the attached scope shot (2V/div, 10us/div). I am wondering if this could be our issue? Looks like this may be configured as an output of some sort, since I have nothing connected to this line (J-Link removed, etc).  I have also taken the liberty of attaching this scope shot.

 I would very much appreciate any help with this, and thank you in advance for your time.

0 Kudos
3 Replies

611 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Lee,

     I have checked your schematic and your JLINK commander log, I find in your schematic, you have the JTAG and SWD interface, please tell me what the interface you have used?

 If you are using SWD, then in the JLINK commander, you need to input s, to select the SWD interface.

pastedImage_1.png

Your reset wave is correct, because when the chip don't have the code, it is empty, the reset pin will have the triangular wave, it's no problem, after you download the code, the reset pin will be high.


Have a great day,
Kerry

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

0 Kudos

611 Views
lbedatsky
Contributor I

Kerry,

Thank you for your reply, and apology for the confusion: The previous log file we sent was from a JTAG attempt at connecting to the CPU, but as you can see from the SWD log below, the SWD behavior is similar to the JTAG output.

 

The questions we have are:

 

  1. What conditions would cause the J-Link to not be able to connect, or to attempt to connect using the “Connect under Reset” protocol. The J-Link documentation implies that “Connect under Reset” is typically used with STM32 processors.

   2. The J-Link indicator light is orange when connected to the SWD connector. This would seem to indicate that the                processor either cannot be reset or cannot be HALTed. Since the RESET line is behaving correctly from the scope          trace we sent, what conditions would keep the processor from being halted?

        Thank you,

         Lee

 

----

# sudo ./JLinkExe
SEGGER J-Link Commander V6.34c (Compiled Aug 23 2018 10:59:18)
DLL version V6.34c, compiled Aug 23 2018 10:59:08

Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Sep 4 2018 11:24:21
Hardware version: V10.10
S/N: 50122364
License(s): GDB
VTref=3.311V


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
T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MK22FN512XXX12" selected.


Connecting to target via SWD
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset

****** Error: InitTarget(): PCode returned with error code -1

InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset

****** Error: InitTarget(): PCode returned with error code -1

Cannot connect to target.

0 Kudos

611 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Lee,

   Thanks for your updated information.

   This problem mainly caused by these points:

1. Check the SWD connector to your JLINK JTAG interface, you must make sure the connection is correct.

pastedImage_2.png

You must make sure your connection is correct!

2. About the hardware solder temperature, it is about 270 degree, high temperature may damage the chip.

3. When you select the chip, please choose MK22FN512XXX12 <allow security>

  Then, when you meet the problem, you can input: unlock kinetis

  Then connect it again.

  If still have the connect problem, I am afraid your hardware or solder have the problem, you can try another board, when you solder the chip, please control the solder temperature.


Have a great day,
Kerry

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

0 Kudos