Unable to debug the code: No SWD access

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

Unable to debug the code: No SWD access

Jump to solution
4,338 Views
sandhyash
Contributor I
Hello all,
I am using the FRDM-KE15Z for development. I am using IAR as my development environment. I was using a reference code and trying to flash it. I am unable to flash the code in to my controller.
I get the following error:
Tue May 28, 2019 17:14:52: CoreSight error: Cannot read IDCODE. No SWD access. Debugging is not possible.
Tue May 28, 2019 17:14:52: CMD_INTERPRETER: failed
Tue May 28, 2019 17:14:52: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\arm\config\debugger\NXP\KE1xF.dmac(91,18): Error: Operation error. 
Tue May 28, 2019 17:14:52: Error while calling macro execUserCoreConnect
Tue May 28, 2019 17:14:52: CPU status FAILED
Tue May 28, 2019 17:14:52: CMD_INTERPRETER: failed
Please let me know if it is possible to recover the controller from this state.
Please find attached the text file which captures the complete error message I get.
Labels (1)
0 Kudos
1 Solution
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandhya Sharma,

  1. About the hardware, do you modify the connection after you get the new board?

  2. About the JLINK connection

   You didn't select the device as MK15Z256XXX7 <ALLOW SECURITY>

   Please select it at first, then try to unlock kinetis again.

pastedImage_1.png

  You don't need to use the IDE to connect your board now.

  If the JLINK commander can't connect your board, even you select the device as MK15Z256XXX7 <ALLOW SECURITY>, and the unlock kinetis still can't work, then I am afraid your KE15Z chip is secured to the highest level, then if you still want to use the SWD interface, you may need to change an new chip.

Wish it helps you!
Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
15 Replies
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandhya Sharma,

   1. Please update the FRDM-KE15Z on board debugger again.

      The details you can find it from this link:

      https://www.nxp.com/support/developer-resources/run-time-software/kinetis-developer-resources/ides-f... 

    Download k20dx_frdmke15z_if_crc_0241.bin from this link:

https://www.nxp.com/assets/downloads/data/en/initialization-boot-device-driver-code-generation/k20dx... 

      You can download the CMSIS DAP to your board again

     1) Power off the board

      2) press the reset  button and hold it, then plug the usb cable to the board, you can find the device named as"DAPLINKBOOOT", then release the reset button.

      3)  Send k20dx_frdmke15z_if_crc_0241.bin to "DAPLINKBOOOT"

     4) power off the board, power on it again, you will find device named as FRDM-KE15ZD

pastedImage_3.png

2. You can use the SDK code for FRDM-KE15Z, which can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

This is my debug result:

pastedImage_5.png

3. If you still have problems

    I suggest you change the on board debugger to Segger JLINK, then use the JLINK commander to connect your KE15z.

  JLINK driver download link:

SEGGER - The Embedded Experts - Downloads 

JLINK firmware:

https://www.segger.com/downloads/jlink/OpenSDA_FRDM-KE15Z 

 The steps to download the JLINK firmware to the FRDM-KE15  board is the same as the CMSIS DAP.

This is the JLINK commander connect result on FRDM-KE15Z with JLINK firmware.

  pastedImage_8.png

You can try it on your side.

If you still have question about it, please kindly let me know.

Wish it helps you!

If you still have question about it, please kindly let me know.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,917 Views
sandhyash
Contributor I

Hello Kerry,

Thank you for the suggestions. I tried both the ways: 

1. I updated the k20dx_frdmke15z_if_crc_0241.bin file again, but unfortunately I got the same error message.

2. When I updated the 08_OpenSDA_FRDM-KE15Z.bin, I got an error message on the J Link commander saying that SWD is no longer supported. Which one should be chosen, is it Open SDA and then do we need to connect to J11 connector on the Freedom board?

Thanks and regards,

Sandhya Sharma 

0 Kudos
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandhya Sharma,

You said:I got an error message on the J Link commander saying that SWD is no longer supported.

Please give me the screen shoot about it, actually, my above reply picture is the test result from my side, you can find no information which you mentioned. Do you download the newest JLINK driver and install it?


Have a great day,
kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,917 Views
sandhyash
Contributor I

Hello Kerry,

Please find the screen shot -

0 Kudos
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Where is the screen shot? I can't find it .


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,917 Views
sandhyash
Contributor I

Hello Kerry,

When I updated the 08_OpenSDA_FRDM-KE15Z.bin, this is the error message I get.

Thu May 30, 2019 18:37:52: InitTarget()
Thu May 30, 2019 18:37:52: Connect Under Reset
Thu May 30, 2019 18:37:52: Communication error while accessing MDM-AP.

Please find attached the text file with the detailed error message log.

Thanks and regards,

Sandhya Sharma

0 Kudos
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

HI Sandhya Sharma,

   You are doing the wrong steps,you need to read my previous reply carefully.

  Please doing this steps:

      1) Power off the board

      2) press the reset  button and hold it, then plug the usb cable to the board, you can find the device named as "DAPLINKBOOOT", then release the reset button.

      3)  Send "08_OpenSDA_FRDM-KE15Z.bin" to "DAPLINKBOOOT"

      4) power off the board, power on it again, you will find you on board debugger is the JLINK.

 Now, you can use the JLINK to connect your board.

   The JLINK commander can be find in the JLINK driver which you have installed.

pastedImage_8.png

  Please try it again on your side.


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,917 Views
sandhyash
Contributor I

Hello Kerry,

I followed the same steps you described. 

Here is the error I get on JLink  Commander:

Thanks and regards,

Sandhya Sharma 

0 Kudos
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandhya Sharma,

   The picture information is not complete, I need also need to top information in the JLINK commander window.

  Please scroll up, and give me the whole information.

  BTW, you can input: unlock kinetis

   Can you unlock it?


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,917 Views
sandhyash
Contributor I

Hello Kerry,

Please find attached the screenshots of the errors.

I tried unlock kinetics, I get an error saying - read from da/ap register failed

I also tried programming from MCUXpresso IDE, please find the screenshot of the error message I get. 

Thanks and regards,

Sandhya Sharma 

0 Kudos
3,918 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandhya Sharma,

  1. About the hardware, do you modify the connection after you get the new board?

  2. About the JLINK connection

   You didn't select the device as MK15Z256XXX7 <ALLOW SECURITY>

   Please select it at first, then try to unlock kinetis again.

pastedImage_1.png

  You don't need to use the IDE to connect your board now.

  If the JLINK commander can't connect your board, even you select the device as MK15Z256XXX7 <ALLOW SECURITY>, and the unlock kinetis still can't work, then I am afraid your KE15Z chip is secured to the highest level, then if you still want to use the SWD interface, you may need to change an new chip.

Wish it helps you!
Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,917 Views
sandhyash
Contributor I

Hello Kerry,

Thank you for the support. The controller was bricked,  I had to replace the controller 

Thanks and regards,

Sandhya Sharma 

0 Kudos
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandhya Sharma ,

  Thanks for the updated information.

  Maybe you unlocked the chip to the highest level, then you can't connect it again.

  So, now, after you replace the on board MCU, is it working now?

  Any further question about this topic?

  


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,917 Views
sandhyash
Contributor I

Hello Kerry,

Yes it is working now. I have no further questions on this topic.

Thanks and regards,

Sandhya Sharma 

0 Kudos
3,917 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandhya Sharma ,

  Thanks for your confirmation.

  So, if your question is solved, please help to mark the correct answer, just to close this question, thank you!


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos