Hello, I have a problem trying to connect to MK64DX512 MCU on a newly developed board via J-link debug probe.
I could not connect both using JTAG and SWD.
I already have experience with various KINETIS devices, including one from the same 'K' series - MK40DX64VLH7 with several boards designed and performing well with this MCU.
So the hardware used for connection to the MK64DX512 MCU is tested and working. Additionally, on the same new board where MK64DX512 is mounted, there is another small KINETIS MCU - MKV30F64 and I can communicate with it over SWD.
Of course, the cause for the problem should be in the new board.
My co-worker who designed the board, looked carefully for any possible discrepancy with grounding and power supply wiring but couldn't find anything disturbing.
So, I need some hint to come out of the situation.
I apply some log from the J-link sessions, but before browsing them, here’s some more information:
- The problem occurred on two different boards, but one of them behaved much better at the beginning – the J-link not only connected to the SW-DP, but had partial success in connecting to the CPU core. However, shortly after that this “better” board started behaving exactly the same as the other one.
- As you can see from the logs, J-link finds that the flash protection bit is set, which is not realistic for a new device, probably there’s a problem with reading the flash configuration area
First, this is how attempts to connect look now:
SEGGER J-Link Commander V6.48b (Compiled Aug 2 2019 10:19:19)
DLL version V6.48b, compiled Aug 2 2019 10:18:25
Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled May 17 2019 09:50:41
Hardware version: V9.30
S/N: 269307064
License(s): FlashBP, GDB
OEM: SEGGER-EDU
VTref=3.366V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: MK64FX512XXX12
Type '?' for selection dialog
Device>
Please specify target interface:
- J) JTAG (Default)
- S) SWD
- T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MK64FX512XXX12" selected.
Connecting to target via SWD
InitTarget()
Connect Under Reset
Device will be unsecured now.
Found SW-DP with ID 0x2BA01477
InitTarget()
Connect Under Reset
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Found SW-DP with ID 0x2BA01477
****** Error: DAP error while reading DP-Ctrl-Stat register.
InitTarget()
Connect Under Reset
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Found SW-DP with ID 0x2BA01477
InitTarget()
Connect Under Reset
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Found SW-DP with ID 0x2BA01477
Cannot connect to target.
J-Link>
And then, the stored logs from the 'better' board before it deteriotated.
These logs were saved as screenshots, I can't reproduce them any more and paste them here, so they are in the file attached.
(During all this struggle I updated J-link firmware and J-link PC-software, so the logs look a bit differently
for the same board with the same behavior.)
Thank you in advance for any hints and suggestions we might give me so that I can figure out what causes the problem