PE multilink JTAG/BDM Kinetis programming issue

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

PE multilink JTAG/BDM Kinetis programming issue

Jump to solution
19,119 Views
Amit_Kumar1
Senior Contributor II

Hi

I am trying to program K20 custom board but it is showing an error.

pastedImage_0.png

after clicking yes,  the same msg appear and again I click yes then following error comes

pastedImage_1.png

these two error msg comes after one another and it doesn't program. Kindly look into the matter initially I had the same issue for K10 board. I tried everything but It didn't worked. PE multilink universal not detecting K10 uc I thought that there might be some soldering issue as it was a QFN package. so I changed my design and added MK20DX128VLF5(LQFP) we bought 100 pcs of this uc and 100 pc of KL05 , 30 pc of K10. we checked for K10 and K20 uc it doesn't work. I checked PE multilink by programming FRDM-KL46Z board through SWD connecter J6, it is programming the board without any issue. I went through the KQRUG user guide which I found out from my previous query regarding K10 board through the community. and I also went through the PE4576-Technical summary. and tried resolving the issue but didn't resolve then after bashing my head I somehow managed to find an app note on programming kinetis uc i.e AN4835 which I think is supposed to be mention in the datasheet as no user will get to know that there exist an app note for how to program the Kinetis uc. There are many engineers who will be working on ARM cortex uc but if there is not much resources then why will they choose freescale. Kindly look into the matter and make the programmer work as I fear all the above controller i.e (100 K20, 100 Kl05, 30 K10) uc will be collecting dust. Already we have 100 k20 boards ready. The following diagram shows the connections I have tried for different modes(JTAG/SWD) for programming K20 board.

pastedImage_12.png

it didn't worked then i tried SWD config

pastedImage_13.png

In both the cases I connected VCC(3.3V) ----->TVCC(PIN 1)

and GND----> GND(PIN 4) of PE multilink universal. I am using the following port from PE multilink universal.

pastedImage_18.png

I probed RESET_b pin in normal condition it is logic high(3.3V) and while programming it becomes logic low(0V).

photo 4.JPG.jpg

The above is the testing breakout board(dual side).

photo 4.JPG.jpg

I hope The community will help me to resolve this issue ASAP. Our expected target is 100,000  kinetis  units this year In our line of products.

Thanks and Regards

Amit Kumar

1 Solution
6,619 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Amit:

Thanks for considering my suggestions. About your comments and some more inputs:

5) This should not be critical, but try replacing that 1K resistor with one of 4.7K - 10K. Also confirm that you have the R2 10K pull - up resistor connected to pin 21, and measure voltage in that pin to verify that it is always in high level.

Now, the 1.64 V is definitely not correct, the value should be near the 3.3 V when not asserted. This seems to indicate that the MCU is constantly resetting. You need to watch that pin with an oscilloscope.

If the device is resetting, this may solve the issue:

- Make sure to select "Always mass erase on connect", and select a not so high debug frequency (e.g. 0.10 MHz).

Connection.png

Then follow the next steps:

1) Disconnect the board from your 3.3 V source.

2) With a jumper force the reset pin to a low level (GND) and hold it.

3) Power on the board (connect the 3.3 V source). Do not release reset yet.

4) Start a debug session and as soon as it is starting release the reset button.

Try this more than once.

Additionally, you could also try mass erasing the K20 device from the Flash programmer. Just open the programmer, select proper connection and specific flash configuration file and then click on "Erase Whole Device".

Mass_erase.png

If the Erase is successful, then you should be able to debug.

Let me know what you find.

Regards!

Jorge Gonzalez

View solution in original post

28 Replies
3,697 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Amit:

Your MCUs are constantly resetting. This is because they are virgin and the watchdog is enabled. First thing you should do with a new MCU before trying to debug is a mass erase. So we need to forget about the debugger right now and try to erase the whole device using the Flash Programmer (thunderbolt icon).

Your second picture also shows that the capacitor is holding the voltage. So please follow the next steps:

1 - Remove the capacitor.

2 - Connect your multilink and open the flash programmer (the one that says Flash File to target as in my previous respose).

3 - Select the FLASH PnE U-Multilink connection, and select also the correct Flash configuration file. You may try with JTAG or SWD, just make sure to click on "Edit" and that the SWD option is checked/unchecked accordingly.

4 - Click on Erase Whole Device

You should read a message in the console indicating "Erase Command Succeeded".

If this does not work, repeat the procedure but this time with the steps suggested in my previous post, which are:

- Connect Multilink and open flash programmer.

- Disconnect board power.

- Hold reset low.

- Power on the board.

- Click on "Erase Whole Device" and then release the reset line.

Also, I received feedback from a colleague that 15 cm jumpers are still long in some cases. Could you try with even shorter cables?

It would be great if you can post here a picture showing your connections all the way from the header in your multilink to the pins in your custom board.

Regards!

Jorge Gonzalez

1,202 Views
Amit_Kumar1
Senior Contributor II

HI Jorge

I Tried the steps you mentioned (including removing the capacitor) even holding the reset pin to gnd and after clicking mass erase releasing it. but still the error persists....below is the screenshot if you can see the console window in it.

pastedImage_0.png

for the jumper length of jumper

photo.JPG.jpg

I tried for kl05 it worked i.e it got mass erased and now programs are being dumped in it without any error. But for k20 it is still showing the same error... in KL05 there is only SWD but in k20 there is JTAG, EZPort, SWD. Is there anything else I need to do if I am focusing for SWD in k20 apart from the above schematic? as SWD worked for KL05 using the PE multilink universal(PORT B).

Regards

Amit Kumar

0 Kudos
1,202 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi Amit:

Good to know about the KL05 working.

The procedure is the same for the K20 (just make sure to check the "SWD.." option in the connection).

The only difference I see in your SWD schematic is the pin 21 without pull up, besides of removing capacitor and changing R1 from 1K to 10K.

Have you assembled more than one K20 board? or just that one in your picture?

I would try with another board with the K20 to discard that the MCU is somehow secured or bricked.

Regards!

Jorge Gonzalez

0 Kudos
1,202 Views
kerbal
Contributor III

HOORAYY!!! I just got my custom K10 board working after reading the above!

  • The board I got working is shown on the right. I mounted only the K10, a 3.3V regulator, one bulk 10uF on the regulator output, and one SMD 10k pull-up on reset.
  • There is a debug adapter board covering the top half of my mainboard; it has only the Cortex Mini-10 pin header and one 1uF capacitor on reset mounted.
  • There is another board covering the bottom half of my mainboard; it has only a DC barrel jack on it, connected to the regulator input.
  • I removed the 1uF from reset while following along through the steps above, but I'm not 100% sure that was necessary.
  • A 10k PTH resistor is attached to the debug adapter between 3.3V and EZP_CS. I'll put this on the mainboard's next revision.
  • The 10k resistor on the breadboard (upper) is connected to 3.3V and SWDIO.
  • The <100ohm resistor on the left is connected to VTREF and 3.3V. It was recommended in something I read trying to fix my problem, but is unnecessary; jumper wire is fine.
  • The connector on the far left is for the Mini-10 cable that came with the Multilink which is about a mile long (~12" actually).
  • The left-most Mini10 adapter is the only one with pin numbers matching the Cortex spec/cable; the two identical adapters I used reversed the pin order, while a mistake on the debug adapter swapped every two pins. With the corrections I'm making, the standard cable should hook directly up and work.

My chip was rebooting like yours, but by the time I had fixed my mistakes, I no longer needed to do the reset trick described; it mass erased on the first try and then programmed on the first try. I suspect I could have skipped the mass erase. So, I put a PWM LDD in my project, deployed, and stuck a UV LED into the socket and HELLOOOOOO BLINKY!!!! (Thanks Jorge! and good luck Amit!)

20140129_035812.jpg

1,202 Views
Amit_Kumar1
Senior Contributor II

Congratulation Jon !!!

Good to hear that you got benefited from this post.

0 Kudos
1,202 Views
Amit_Kumar1
Senior Contributor II

Hi Jorge

I Have replaced the 1k with 4.7K at reset circuit and have also connected the 10k pullup at pin no 21. before trying with the new uc I wanted to ask you one thing ,in the following image there is an option for JTAG and cJTAG /SWD I tried both but it didnt worked.. which one is recommended?

pastedImage_3.png

and also while flash programming there is an option to choose the configuration file, which one is recommended ? I tried with the default configuration file then later I tried with all available configuration file for K20DX128.

pastedImage_2.png

Regards

Amit Kumar

0 Kudos
1,202 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Amit, about your questions:

- The default mode in Kinetis K is JTAG, so I'd go for that. This setting is not relevant right now, as you need to be able to mass erase your K20 first from the flash programmer.

- If your MCUs have a 'Z' in the name (on the top of the chip), then select K20DX128Z.xml, otherwise select the K20DX128.

If you could share with me a picture of your connections from the Multilink to the board that would be helpful.

Regards!

Jorge Gonzalez

0 Kudos
1,202 Views
Amit_Kumar1
Senior Contributor II

HI Jorge

Below is the picture of my connections of PE multilink universal with my test board.

DSC_0082.jpg

I think it will be tuff for you to see the connections so I have made the connection diagram below

pastedImage_1.png

Hope the image is clear .

Regards

Amit Kumar