Hello
I'm having a lot of trouble programming a Kinetis KL27Z128 and KL26Z128
I'm using KDS300/Eclipse with the J-LINK.
It was all working well with development of a board using KL26Z before Aug 16th - then with a new board revsion I did an KDS300/Help/"Check for Updates" and had problems with the segger interface, which I found was this issue
community.freescale.com/thread/363937
I think I cured it by updating the plugins.zip as described by Erich Styger Aug7th
However then still had problems with KDS300/JLinkGDBServerCL "timing while .." out on the new KL26Z boards I had built.
I re-installed KDS300 but still problems. I assumed the KL26Z128 was bricked, so built my last board with a KL27128 and it has had "timeout while unsecuring device" problems
I've upgraded the J-Link to 501kbeta, and tried this
JLink.exe -if SWD -device MKL27Z128XXX4 -speed 1000
as per other discussions on the forums here, and still has "timeout while.."
However on trying again today, something has started working, :P
but its unreliable, and while sometimes works at the JLINK> then has "timeout ..." when invoked from KDS/JLinkGDBServerCL
It did actually program the KL27Z with the blinkey flasher - as the board now flashes its led.
However it can't do it reliably.
Here is the output listing after
JLink.exe -if SWD -device MKL27Z128XXX4 -speed 1000
SEGGER J-Link Commander V5.01k ('?' for help)
Compiled Aug 26 2015 19:07:42
Info: Device "MKL27Z128XXX4" selected.
DLL version V5.01k, compiled Aug 26 2015 19:07:05
Firmware: J-Link V9 compiled Aug 26 2015 14:41:56
Hardware: V9.30
S/N: 269301016
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Emulator has Trace capability
VTarget = 3.172V
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Can not connect to target.
Failed to identify target. Trying again with slow (4 kHz)
speed.
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Info: Found Cortex-M0 r0p1, Little endian.
Info: FPUnit: 2 code (BP) slots and 0 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ F0002000
Info: ROMTbl 0 [0]: FFFFE000, CID: B105900D, PID: 001BB932
MTB-M0+
Info: ROMTbl 0 [1]: FFFFF000, CID: B105900D, PID: 0008E000
MTBDWT
Info: ROMTbl 0 [2]: F00FD000, CID: B105100D, PID: 000BB4C0
ROM Table
Info: ROMTbl 1 @ E00FF000
Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008
SCS
Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A
DWT
Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B
FPB
Can not connect to target.
No device found at all. Selecting JTAG as default target
interface.
J-Link>si 1
Selecting SWD as current target interface.
Setting target interface speed to 1MHz. Use
"Speed" to change.
J-Link>device MKL27Z128XXX4
Info: Device "MKL27Z128XXX4" selected.
Reconnecting to target...
Info: Found SWD-DP with ID 0x0BC11477
Info: Found SWD-DP with ID 0x0BC11477
Info: Found Cortex-M0 r0p1, Little endian.
Info: FPUnit: 2 code (BP) slots and 0 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ F0002000
Info: ROMTbl 0 [0]: FFFFE000, CID: B105900D, PID: 001BB932
MTB-M0+
Info: ROMTbl 0 [1]: FFFFF000, CID: B105900D, PID: 0008E000
MTBDWT
Info: ROMTbl 0 [2]: F00FD000, CID: B105100D, PID: 000BB4C0
ROM Table
Info: ROMTbl 1 @ E00FF000
Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008
SCS
Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A
DWT
Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B
FPB
J-Link>mem 400 10
00000400 = FF FF FF FF FF FF FF FF FF FF FF FF FE FF FF FF
J-Link>unlock Kinetis
Unlocking device...O.K.
J-Link>
Now then I exit J-LINK and try KDS300/JLink and here is the output
JLinkARM.dll V5.01k (DLL compiled Aug 26 2015 19:07:05)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: MKL27Z128xxx4
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Aug 26 2015 14:41:56
Hardware: V9.30
S/N: 269301016
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.20 V
Listening on TCP/IP port 2331
Connecting to target...ERROR: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
At some point it did program the KL27Z flash as it now blinks the leds.
Any help appreciated on getting it working again.?(
I'm having a lot of trouble programming a Kinetis KL27Z128 and KL26Z128
I'm using KDS300/Eclipse with the J-LINK.
It was all working well with development of a board using KL26Z before Aug 16th - then with a new board revsion I did an KDS300/Help/"Check for Updates" and had problems with the segger interface, which I found was this issue
community.freescale.com/thread/363937
I think I cured it by updating the plugins.zip as described by Erich Styger Aug7th
However then still had problems with KDS300/JLinkGDBServerCL "timing while .." out on the new KL26Z boards I had built.
I re-installed KDS300 but still problems. I assumed the KL26Z128 was bricked, so built my last board with a KL27128 and it has had "timeout while unsecuring device" problems
I've upgraded the J-Link to 501kbeta, and tried this
JLink.exe -if SWD -device MKL27Z128XXX4 -speed 1000
as per other discussions on the forums here, and still has "timeout while.."
However on trying again today, something has started working, :P
but its unreliable, and while sometimes works at the JLINK> then has "timeout ..." when invoked from KDS/JLinkGDBServerCL
It did actually program the KL27Z with the blinkey flasher - as the board now flashes its led.
However it can't do it reliably.
Here is the output listing after
JLink.exe -if SWD -device MKL27Z128XXX4 -speed 1000
SEGGER J-Link Commander V5.01k ('?' for help)
Compiled Aug 26 2015 19:07:42
Info: Device "MKL27Z128XXX4" selected.
DLL version V5.01k, compiled Aug 26 2015 19:07:05
Firmware: J-Link V9 compiled Aug 26 2015 14:41:56
Hardware: V9.30
S/N: 269301016
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Emulator has Trace capability
VTarget = 3.172V
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Can not connect to target.
Failed to identify target. Trying again with slow (4 kHz)
speed.
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Info: Found SWD-DP with ID 0x0BC11477
****** Error: Kinetis (connect): Timeout while unsecuring
device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
Info: Found Cortex-M0 r0p1, Little endian.
Info: FPUnit: 2 code (BP) slots and 0 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ F0002000
Info: ROMTbl 0 [0]: FFFFE000, CID: B105900D, PID: 001BB932
MTB-M0+
Info: ROMTbl 0 [1]: FFFFF000, CID: B105900D, PID: 0008E000
MTBDWT
Info: ROMTbl 0 [2]: F00FD000, CID: B105100D, PID: 000BB4C0
ROM Table
Info: ROMTbl 1 @ E00FF000
Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008
SCS
Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A
DWT
Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B
FPB
Can not connect to target.
No device found at all. Selecting JTAG as default target
interface.
J-Link>si 1
Selecting SWD as current target interface.
Setting target interface speed to 1MHz. Use
"Speed" to change.
J-Link>device MKL27Z128XXX4
Info: Device "MKL27Z128XXX4" selected.
Reconnecting to target...
Info: Found SWD-DP with ID 0x0BC11477
Info: Found SWD-DP with ID 0x0BC11477
Info: Found Cortex-M0 r0p1, Little endian.
Info: FPUnit: 2 code (BP) slots and 0 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ F0002000
Info: ROMTbl 0 [0]: FFFFE000, CID: B105900D, PID: 001BB932
MTB-M0+
Info: ROMTbl 0 [1]: FFFFF000, CID: B105900D, PID: 0008E000
MTBDWT
Info: ROMTbl 0 [2]: F00FD000, CID: B105100D, PID: 000BB4C0
ROM Table
Info: ROMTbl 1 @ E00FF000
Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008
SCS
Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A
DWT
Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B
FPB
J-Link>mem 400 10
00000400 = FF FF FF FF FF FF FF FF FF FF FF FF FE FF FF FF
J-Link>unlock Kinetis
Unlocking device...O.K.
J-Link>
Now then I exit J-LINK and try KDS300/JLink and here is the output
JLinkARM.dll V5.01k (DLL compiled Aug 26 2015 19:07:05)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: MKL27Z128xxx4
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Aug 26 2015 14:41:56
Hardware: V9.30
S/N: 269301016
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.20 V
Listening on TCP/IP port 2331
Connecting to target...ERROR: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
At some point it did program the KL27Z flash as it now blinks the leds.
Any help appreciated on getting it working again.?(
The post was edited 1 time, last by neilh20 ().