SWD Error using mbed on FRDM-KL25Z

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

SWD Error using mbed on FRDM-KL25Z

4,081 Views
harshbhatt
Contributor I

I have been using mbed on my FRDM-KL25Z board to test code as well as to deploy code onto custom boards. Recently I have been encountering a problem while trying to program the FRDM board or my custom boards. A fail.txt is created which has "SWD ERROR" printed inside. After which point I am not able to program the FRDM board or my custom boards.

I have gone through 3-4 FRDM boards, which cannot be used anymore and any help would be much appreciated, before I go on to ruin other boards...

Thanks in advance!

Tags (4)
0 Kudos
12 Replies

1,825 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Harsh Bhatt,

     Thank you for your interest in our kinetis product.

     Could you tell me which mbed you are using? It is the firmware or the code complier?

     If it is the firmware, whether your freedom board can work ok when you change to the PE's firmware?

Waiting for your reply!

Regards,

Jingjing

0 Kudos

1,825 Views
harshbhatt
Contributor I

Hi Jingjing,

It is both the firmware and the code compiler. I have not tried reverting it back to the original firmware, but I have tried to put the latest mbed firmware on it a couple of times to no avail.

Thanks for your help.

Harsh

0 Kudos

1,825 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Harsh Bhatt,

        Did you follow this mbed link:

http://mbed.org/handbook/Firmware-FRDM-KL25Z

        Please do it step by step, after your board download the firmware, and the board is a disk named "MBED“.

      Then use the mbed complier the code, and download it to your FRDM-KL25, just use this link sample code:

mbed FRDM KL25Z Examples - Handbook | mbed

I did it, and the code works ok on my FRDM-KL25 board, so please try it again.

      If you still have quesiton, please let me know.


Have a great day,
Jingjing

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

0 Kudos

1,825 Views
harshbhatt
Contributor I

Hi Jingjing,

I have gone through flashing the firmware many times and also have had success loading programs earlier. It is only recently that I keep getting an SWD ERROR.

Harsh

0 Kudos

1,825 Views
kerryzhou
NXP TechSupport
NXP TechSupport

H Harsh,

    Maybe your chip is secured, you can drag the PE debug firmware back to you freedom, and use our Codewarrior or the Jlink commander do a chip mass erase, then try to use the mbed again.

    Do chip mass erase is just to unsecure the chip. Please try it.


Have a great day,
Jingjing

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

0 Kudos

1,825 Views
harshbhatt
Contributor I

Can you please provide me the link to the PE debug firmware and also if you have a link to the process of doing a chip erase using a JLink edu.

Thanks!

0 Kudos

1,825 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Harsh Bhatt,

       The PE debug firmware, you can download it from this link:

http://www.pemicro.com/opensda/

      Please change your firmware to "MSD-DEBUG-FRDM-KL25Z_Pemicro_v114.SDA" which downloader from the pemicro, and then downloader the code again.

       About the Jlink mass erase, please setup the JLINK driver, after connect your board to the jlnk with SWD, then open the software of J-LINK Commander like the following picture:

pastedImage_1.png

Then input " unlock kinetis", your chip will do mass erase.

Wish it helps you!

Jingjing

0 Kudos

1,825 Views
harshbhatt
Contributor I

Should it be through the SDA SWD or the other SWD? See the attached image. Red SWD or blue SWD?FRDM-KL25Z_BDTN.jpg

0 Kudos

1,825 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Harsh Bhatt,

    If you want to use the JLINK, you should use the RED SWD, this is used for the KL25 chip.

    The blue one is the SWD to K20 which used for the opensda Debugger.


Have a great day,
Jingjing

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

0 Kudos

1,825 Views
harshbhatt
Contributor I

Understood, but the mass erase - that should be on the KL25 chip only? not the opensda chip?

0 Kudos

1,825 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Yes, mass earse is to KL25 chip.

You don't need to mass erase the opensda chip, the opensda chip already have the bootloader code in it, you's best don't earse it, if you want to use the different debugger in the opensda chip, just change the firmware which you can download from pemicro or segger website.


Have a great day,
Jingjing

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

0 Kudos

1,825 Views
harshbhatt
Contributor I

Thanks! Will try it out and let you know how it goes.

0 Kudos