I switch to J19 and got some new error this time.
SEGGER J-Link Commander V6.80d (Compiled Jun 26 2020 17:17:21)
DLL version V6.80d, compiled Jun 26 2020 17:17:01
Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled Dec 13 2019 11:14:50
Hardware version: V9.70
S/N: 59768859
License(s): RDI, GDB, FlashDL, FlashBP, JFlash
VTref=3.161V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: MKL82Z128XXX7
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>J
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MKL82Z128XXX7" selected.
Connecting to target via JTAG
InitTarget()
Connect Under Reset
Connect Under Reset
InitTarget()
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.
Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
InitTarget()
TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
****** Error: InitTarget(): PCode returned with error code -1
InitTarget()
Connect Under Reset
Connect Under Reset
InitTarget()
Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
InitTarget()
Connect Under Reset
Connect Under Reset
****** Error: InitTarget(): PCode returned with error code -1
Cannot connect to target.
It says "J-Link cannot unprotect the device.". I found another topic about this issue but it seems a different chip. I haven't tried it yet.
Hope this means I'm getting close. Many thanks for your help!