Fatal error:Reading CPU status failed Session aborted

cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal error:Reading CPU status failed Session aborted

Jump to solution
2,529 Views
zhijunwu
Contributor I

Using IAR ,TWR-KV58F220M use OpenSDA miniUSB (CMSIS-DAP) loading programing ,have a Fatal error: Reading CPU status failed   Session aborted!
Following is the log
Tue Mar 08, 2016 17:33:14: Loaded macro file: D:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\debugger\Freescale\KV5x.dmac
Tue Mar 08, 2016 17:33:14: Loading the CMSIS-DAP driver
Tue Mar 08, 2016 17:33:14: Probe: CMSIS-DAP probe SW module ver 1.11
Tue Mar 08, 2016 17:33:14: Probe: CMSIS-DAP S/N '03300203C5591E0900000000000000000000000038A5E2C1' mapped to a number 00001.
Tue Mar 08, 2016 17:33:14: EARM v.3.96
Tue Mar 08, 2016 17:33:14: Emulation layer version 3.96
Tue Mar 08, 2016 17:33:14: Notification to core-connect hookup.
Tue Mar 08, 2016 17:33:15: CPU status - IN RESET
Tue Mar 08, 2016 17:33:15: LowLevelReset(script, delay 200)
Tue Mar 08, 2016 17:33:15: Calling reset script: ResetAndDisableWatchdog
Tue Mar 08, 2016 17:33:18: Disable watchdog ...
Tue Mar 08, 2016 17:33:18: D:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\debugger\Freescale\KV5x.dmac(34,18): Error: Operation error.  
Tue Mar 08, 2016 17:33:18: Error while calling macro ResetAndDisableWatchdog
Tue Mar 08, 2016 17:33:23: Fatal error: Reading CPU status failed   Session aborted!
Tue Mar 08, 2016 17:33:24: Loading the CMSIS-DAP driver

How can I solve this problem?Anyone have any addvices?

0 Kudos
1 Solution
750 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Zhijun wu,

1. Please check the default board configuration.

    You can refer to TWR-KV58F220MUG.pdf in the TWR-KV58F220M-QSP

    But take care,  the TWR-KV58F220MUG have a error about J29 and J28, J29 should be open, J28 should connect 1-2.

   Please make sure your board's configuration is in default.

   Then try again.

2. If item 1 still not OK, please try to use JLINK firmware, which you can find int TWR-KV58F220M-QSP, the folder is:TWR-KV58F220M-QSP\TWR-KV58F220M_Quick Start Package\OpenSDA Application\Segger OpenSDA\JLink_OpenSDA_V2_1_2015-10-13.bin

1) install JLINK driver

SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace 

2) unplug your board, then press RESET button and hold on it, at the same time, plug board to your PC, you will find your board is a device named as"BOOTLOADER"

3) Send "JLink_OpenSDA_V2_1_2015-10-13.bin" to "BOOTLOADER"

4) unplug your board and plug it again.

  You will find your board is a device named as "JLINK"

5) Use JLINK command to check ,whether you can find Cortex-M7?

pastedImage_4.png

If the core is found, then you can download your code again with JLINK debugger.

Please use the SDK_2.0_TWR-KV58F220M sample code to test it.

You can find KSDK2.0 from this link:

Welcome to Kinetis Expert | Kinetis Expert

Click build an SDK, and generate the SDK_2.0_TWR-KV58F220M package.

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

0 Kudos
10 Replies
751 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Zhijun wu,

1. Please check the default board configuration.

    You can refer to TWR-KV58F220MUG.pdf in the TWR-KV58F220M-QSP

    But take care,  the TWR-KV58F220MUG have a error about J29 and J28, J29 should be open, J28 should connect 1-2.

   Please make sure your board's configuration is in default.

   Then try again.

2. If item 1 still not OK, please try to use JLINK firmware, which you can find int TWR-KV58F220M-QSP, the folder is:TWR-KV58F220M-QSP\TWR-KV58F220M_Quick Start Package\OpenSDA Application\Segger OpenSDA\JLink_OpenSDA_V2_1_2015-10-13.bin

1) install JLINK driver

SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace 

2) unplug your board, then press RESET button and hold on it, at the same time, plug board to your PC, you will find your board is a device named as"BOOTLOADER"

3) Send "JLink_OpenSDA_V2_1_2015-10-13.bin" to "BOOTLOADER"

4) unplug your board and plug it again.

  You will find your board is a device named as "JLINK"

5) Use JLINK command to check ,whether you can find Cortex-M7?

pastedImage_4.png

If the core is found, then you can download your code again with JLINK debugger.

Please use the SDK_2.0_TWR-KV58F220M sample code to test it.

You can find KSDK2.0 from this link:

Welcome to Kinetis Expert | Kinetis Expert

Click build an SDK, and generate the SDK_2.0_TWR-KV58F220M package.

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

0 Kudos
750 Views
zhijunwu
Contributor I

Hi Kerry Zhou,

   Thank you for your great answer!

   item 1 isn't the solution,maybe I have been reset the CPU before.

   But item 2 is ok, I follow your item 2 steps,and finally,CPU is identified.

   the following is my result:

   kv5 cpu error solution.JPG

now , can I just use J-Link to download my program? can't use openSDA miniUSB CMSIS-DAP anymore?

0 Kudos
750 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Zhijun,

      OK, in the JLINK commander window, erase the chip by input: unlock kinetis

     Then you can use JLINK to download your problem with IDE. If you want to use the CMSIS-DAP, the same step to change your BOOTLOADER firmware to k20dx128_twr_kv58f_if_mbed_0x8000.bin which you can find it from :

TWR-KV58F220M-QSP\TWR-KV58F220M_Quick Start Package\OpenSDA Application\CMSIS-DAP (Default Image)

Wish it helps you!

     


Have a great day,
Kerry

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

0 Kudos
750 Views
zhijunwu
Contributor I

hello Kerry, 

I reuse CMSIS-DAP fireware to download promgram ,but "reading CPU status failed " problem is also exist.

I following the default  jumper setting :

in the file "TWR-KV58F220M Quick Start Guide":

kv5 cpu status failed.PNG

in the file "TWR-KV58F220M Tower Module User's Guide":

jumper setting 1.PNGjumper setting 2.PNG

and change the J29 to off(open) (you said "the TWR-KV58F220MUG have a error about J29 and J28, J29 should be open, J28 should connect 1-2.")。

following picture is the real jumper setting in my twr-kv58f220:

IMG_20161103_152350.jpg

is this problem a other hardware or software error?

0 Kudos
750 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Zhijun,

  This problem is also relate to the IDE, MDK project have no problem, it seems just IAR project have this problem.

  You also can try to use CMSIS DAP with MDK project.


Have a great day,
Kerry

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

0 Kudos
750 Views
zhijunwu
Contributor I

Hi Kerry,

Thank you for your advice,I will try MDK.

Sorry, I have not encountered this problem, recently,I just begin use this board,and just encounter the problem of "reading CPU status failed".

0 Kudos
750 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi zhijun,

    The workaround for IAR with cmsis dap debugger problem is :

testp.png

Please chose software, then build and download again, the problem will be dissappeared

Wish it helps you!


Have a great day,
Kerry

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

0 Kudos
750 Views
zhijunwu
Contributor I

Hi,Kerry,

   change the setting of CMSIS-DAP to software,the error of RESET have been missed,

but the the error of "Reading CPU status failed " also exist,

the following is log after change:

Sat Nov 05, 2016 14:20:35: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 7.3\arm\config\debugger\Freescale\KV5x.dmac
Sat Nov 05, 2016 14:20:35: Loading the CMSIS-DAP driver
Sat Nov 05, 2016 14:20:35: Probe: CMSIS-DAP probe SW module ver 1.11
Sat Nov 05, 2016 14:20:35: Probe: CMSIS-DAP S/N '03300203C5591E0900000000000000000000000038A5E2C1' mapped to a number 00001.
Sat Nov 05, 2016 14:20:35: EARM v.3.96
Sat Nov 05, 2016 14:20:35: Emulation layer version 3.96
Sat Nov 05, 2016 14:20:35: Notification to core-connect hookup.
Sat Nov 05, 2016 14:20:37: CPU status - IN RESET
Sat Nov 05, 2016 14:20:37: LowLevelReset(software, delay 200)
Sat Nov 05, 2016 14:20:41: Fatal error: Reading CPU status failed Session aborted!
Sat Nov 05, 2016 14:20:43: Loading the CMSIS-DAP driver

About CPU status problem,is something wrong about my board's CPU? or you said that it's the error of CMSIS-DAP fireware?

0 Kudos
750 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Zhijun,

   This is my debug log:

Mon Nov 07, 2016 09:30:45: IAR Embedded Workbench 7.70.1 (armproc.dll)
Mon Nov 07, 2016 09:30:45: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\debugger\NXP\KV5x.dmac
Mon Nov 07, 2016 09:30:45: Loading the CMSIS-DAP driver
Mon Nov 07, 2016 09:30:45: Probe: CMSIS-DAP probe SW module ver 1.12
Mon Nov 07, 2016 09:30:45: Probe: CMSIS-DAP S/N '0330020354D44E6E000000000000000000000000A928B2A6' mapped to a number 00006.
Mon Nov 07, 2016 09:30:45: EARM v.4.4
Mon Nov 07, 2016 09:30:45: Emulation layer version 4.4
Mon Nov 07, 2016 09:30:45: Notification to core-connect hookup.
Mon Nov 07, 2016 09:30:46: MDM-AP detected
Mon Nov 07, 2016 09:30:46: Probe: ConnectSpec='MBED CMSIS-DAP:0330020354D44E6E000000000000000000000000A928B2A6:9-1D40D375-0-0000'.
Mon Nov 07, 2016 09:30:46: Connecting to TAP#0 DAP AHB-AP port 0 (IDR=0x64770001).
Mon Nov 07, 2016 09:30:46: Recognized CPUID=0x410fc272 Cortex-M7 r0p2 arch ARMv7-M
Mon Nov 07, 2016 09:30:46: Set cacheable access on AHB-AP port 0 (HPROT=0xeb000000).
Mon Nov 07, 2016 09:30:46: Debug resources: 8 instruction comparators, 4 data watchpoints.
Mon Nov 07, 2016 09:30:46: CPU status OK
Mon Nov 07, 2016 09:30:46: LowLevelReset(software, delay 200)
Mon Nov 07, 2016 09:30:47: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\NXP\FlashKV5xxx128K.out
Mon Nov 07, 2016 09:30:48: Target reset
Mon Nov 07, 2016 09:30:49: Downloaded E:\PROFILE\soft\SDK\KSDK_2.0.0\SDK_2.0_TWR-KV58F220M\boards\twrkv58f220m\demo_apps\bubble\iar\debug\bubble.out to flash memory.
Mon Nov 07, 2016 09:30:50: Loaded debugee: E:\PROFILE\soft\SDK\KSDK_2.0.0\SDK_2.0_TWR-KV58F220M\boards\twrkv58f220m\demo_apps\bubble\iar\debug\bubble.out
Mon Nov 07, 2016 09:30:51: LowLevelReset(software, delay 200)
Mon Nov 07, 2016 09:30:51: LowLevelReset(software, delay 200)
Mon Nov 07, 2016 09:30:51: 16280 bytes downloaded into FLASH and verified (5.68 Kbytes/sec)
Mon Nov 07, 2016 09:30:51: Download completed and verification successful.
Mon Nov 07, 2016 09:30:51: LowLevelReset(software, delay 200)
Mon Nov 07, 2016 09:30:52: Target reset
Mon Nov 07, 2016 09:30:52: INFO: Configuring trace using 'SWO,ETB' setting ...
Mon Nov 07, 2016 09:30:52: Probe: ConnectSpec='MBED CMSIS-DAP:0330020354D44E6E000000000000000000000000A928B2A6:9-1D40D375-0-0000'.
Mon Nov 07, 2016 09:30:52: Probe: ConnectSpec='MBED CMSIS-DAP:0330020354D44E6E000000000000000000000000A928B2A6:9-1D40D375-0-0000'.
Mon Nov 07, 2016 09:30:52: INFO: SWO trace mode is not supported by the probe (use I-jet/I-jet-Trace probe) - trace is disabled.

We have some difference, the CMSIS-DAP probe SW moule version, IAR version.

I have attached my CMSIS-DAP firmware, please use it and try again:


Have a great day,
Kerry

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

0 Kudos
750 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Zhijun,

     Your hardware configuration is correct, I also the same with you.

     When you use the CMSIS DAP, and click the download, do you meet this problem?

pastedImage_1.png

I have reproduced your problem with the OSP CMSIS firmware, I will report it to our according department.

Now, please use the JLINK firmware to download the code, this firmware have no problem.

Wish it helps you!


Have a great day,
Kerry

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

0 Kudos