AnsweredAssumed Answered

ERROR: Can not read register 20 (CFBP) while CPU is running

Question asked by 旺生 黄 on Nov 25, 2019
Latest reply on Nov 28, 2019 by Jing Pan

I debugg MCU MKL26Z256 ,that error disaply , ERROR: CPU is not halted ,ERROR: Can not read register 20 (CFBP) while CPU is running, but  I use SEGGER JFLASH can connect MCU , and don't earse and program. info as below:

Application log started
- J-Flash V6.44h (J-Flash compiled May 3 2019 17:37:36)
- JLinkARM.dll V6.44h (DLL compiled May 3 2019 17:37:09)
Opening project file [C:\Users\Sam Huang\AppData\Roaming\SEGGER\Default.jflash] ...
- Project opened successfully
Opening data file [C:\Users\Sam Huang\Desktop\J-FLASH 直接下载文件\snake.hex] ...
- Data file opened successfully (262144 bytes, 1 range, CRC of data = 0x4DDE49BC, CRC of file = 0x45F173CF)
Connecting ...
- Connecting via USB to J-Link device 0
- ERROR: Cannot connect to J-Link via USB.
- ERROR: Failed to connect.
Could not establish a connection to the J-Link.
Connecting ...
- Connecting via USB to J-Link device 0
- J-Link firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
- Device "MKL26Z256XXX4" selected.
- ConfigTargetSettings() start
- ConfigTargetSettings() end
- InitTarget() start
- InitTarget()
- Timeout while halting CPU.
- InitTarget() end
- Found SW-DP with ID 0x0BC11477
- AP map detection skipped. Manually configured AP map found.
- AP[0]: AHB-AP (IDR: Not set)
- AP[1]: CUSTOM-AP (IDR: Not set)
- AP[0]: Core found
- AP[0]: AHB-AP ROM base: 0xF0002000
- CPUID register: 0x410CC600. Implementer code: 0x41 (ARM)
- Found Cortex-M0 r0p0, Little endian.
- FPUnit: 2 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl[0] @ F0002000
- ROMTbl[0][0]: F0000000, CID: B105900D, PID: 000BB932 MTB-M0+
- ROMTbl[0][1]: F0001000, CID: B105900D, PID: 0008E000 MTBDWT
- ROMTbl[0][2]: E00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
- ROMTbl[1] @ E00FF000
- ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
- Target interface speed: 2000 kHz (Auto)
- VTarget = 3.300V
- ConfigTargetSettings() start
- ConfigTargetSettings() end
- InitTarget() start
- InitTarget()
- Timeout while halting CPU.
- InitTarget() end
- Found SW-DP with ID 0x0BC11477
- AP map detection skipped. Manually configured AP map found.
- AP[0]: AHB-AP (IDR: Not set)
- AP[1]: CUSTOM-AP (IDR: Not set)
- AP[0]: Core found
- AP[0]: AHB-AP ROM base: 0xF0002000
- CPUID register: 0x410CC600. Implementer code: 0x41 (ARM)
- Found Cortex-M0 r0p0, Little endian.
- FPUnit: 2 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl[0] @ F0002000
- ROMTbl[0][0]: F0000000, CID: B105900D, PID: 000BB932 MTB-M0+
- ROMTbl[0][1]: F0001000, CID: B105900D, PID: 0008E000 MTBDWT
- ROMTbl[0][2]: E00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
- ROMTbl[1] @ E00FF000
- ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
- Executing init sequence ...
- Initialized successfully
- Target interface speed: 2000 kHz (Auto)
- J-Link found 1 JTAG device. Core ID: 0x0BC11477 (None)
- Connected successfully
Erasing chip ...
- 256 sectors, 1 range, 0x0 - 0x3FFFF
- Start of preparing flash programming
- ERROR: Can not read register 20 (CFBP) while CPU is running
- ERROR: CPU is not halted
- CPU could not be halted
- ERROR: Can not read register 15 (R15) while CPU is running
- ERROR: Can not read register 16 (XPSR) while CPU is running
- ERROR: Can not read register 13 (R13) while CPU is running
- ERROR: Timeout while checking target RAM, core does not stop. (PC = 0x00000000, XPSR = 0x00000000, SP = 0x00000000)!
- ERROR: Failed to prepare for programming.
Failed to execute RAMCode for RAM check!
- End of preparing flash programming
- Start of restoring
- End of restoring
- ERROR: Failed to erase chip

Outcomes