AnsweredAssumed Answered

MK02 stop swd working after flash

Question asked by lous on Jun 16, 2015
Latest reply on Jun 1, 2016 by Philip Smit

Hi,

 

I start new project with MK02 (QFN,64K) after I work with KF22 with success.

I use the FRDM KF22 board for swd debug and flash.

 

I solder my board, attach the swd pins to FRDM board and start to work, with sucess.

After one hour, I add line for set output the PORTC, build and flash. At this moment KDS go crazy, breakpoint not working, various vector break, ... strange.

I use jlink cmd line for erase chip without sucess, after long time to search on internet, I find it's maybe secure chip with mass erase disable.

 

I try to read register, no sucess, I try to connect, no sucess... Ok maybe I burn the chip

I remove the chip from my board, and solder new. Jlink connect with sucess, I flash same firmware => crash again... ho !

 

Maybe a hardware bug in my board, so I use new board with only the MK02, VCC/GND from FRDM board and swd lines. and some capacitor for decoupling.

I use jlink, connect with success, and flash again (yes, at this time I don't mind it's the firmware the problem), and ... crash again ! ho seriously

 

So, I can send to you the firmware, but it's simple : init clock, set portA/B/C clock, set xtal pins, and portc to output. nothing more :/

 

When I solder the new chip on fresh board, the jlink output is :

C:\Freescale\KDS_3.0.0\segger>JLink.exe -speed 500

SEGGER J-Link Commander V4.98b ('?' for help)

Compiled Apr 10 2015 20:16:11

DLL version V5.00c, compiled Jun 11 2015 11:40:27

Firmware: J-Link OpenSDA 2 compiled Jun 11 2015 11:14:45

Hardware: V1.00

S/N: 621000000

VTarget = 3.300V

Info: Found SWD-DP with ID 0x2BA01477

Info: Found Cortex-M4 r0p1, Little endian.

Info: FPUnit: 6 code (BP) slots and 2 literal slots

Info: CoreSight components:

Info: ROMTbl 0 @ E00FF000

Info: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS

Info: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT

Info: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB

Info: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM

Info: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU

Found 1 JTAG device, Total IRLen = 4:

Cortex-M4 identified.

Target interface speed: 500 kHz

 

Right after flash the firmware, jlink output this :

C:\Freescale\KDS_3.0.0\segger>JLink.exe -speed 500

SEGGER J-Link Commander V4.98b ('?' for help)

Compiled Apr 10 2015 20:16:11

DLL version V5.00c, compiled Jun 11 2015 11:40:27

Firmware: J-Link OpenSDA 2 compiled Jun 11 2015 11:14:45

Hardware: V1.00

S/N: 621000000

VTarget = 3.300V

Info: Found SWD-DP with ID 0x2BA01477

 

 

****** Error: Error while identifying Cortex-M core.

Info: Found SWD-DP with ID 0x2BA01477

No devices found on JTAG chain. Trying to find device on SWD.

Info: Found SWD-DP with ID 0x2BA01477

 

 

****** Error: Error while identifying Cortex-M core.

Info: Found SWD-DP with ID 0x2BA01477

No device found on SWD.

Failed to identify target. Trying again with slow (4 kHz) speed.

Info: Found SWD-DP with ID 0x2BA01477

 

 

****** Error: Error while identifying Cortex-M core.

Info: Found SWD-DP with ID 0x2BA01477

No devices found on JTAG chain. Trying to find device on SWD.

Info: Found SWD-DP with ID 0x2BA01477

 

 

****** Error: Error while identifying Cortex-M core.

Info: Found SWD-DP with ID 0x2BA01477

No device found on SWD.

 

 

I think a firmware can't crash chip like this, so I make mistake, but where is it

 

I have 10+ chip unused and two FRDM-K22F board.

I check with the two FRDM board of courses, same results.

 

I receive ulink probe in two weeks, maybe opensda have bug ? (I try segger opensda only, pemicro I can't found a cmd line like jlink.exe)

 

Thanks you for helping

 

Best regards

Outcomes