AnsweredAssumed Answered

Problem about JLink debug on S32K144

Question asked by Kim Fung on Apr 19, 2017
Latest reply on Apr 19, 2017 by Kim Fung

When i debug the code below, then my JLink can no longer to connect with the mcu.

 

1. code

        /* Reprogram secure byte in Flash configuration field */
#if (FSL_FEATURE_FLS_HAS_PROGRAM_PHRASE_CMD == 1u)
        address = 0x408u;
        size = FTFx_PHRASE_SIZE;
#else   /* FSL_FEATURE_FLASH_HAS_PROGRAM_LONGWORD_CMD == 1u */
        address = 0x40Cu;
        size = FTFx_LONGWORD_SIZE;
#endif /* FSL_FEATURE_FLS_HAS_PROGRAM_PHRASE_CMD */
        ret = FlashProgram(&flashSSDConfig, address, size, unsecure_key, pCmdSequence);
        if (ret != FTFx_OK)
        {
            return ret;
        }

 

2. error log

SEGGER J-Link GDB Server V6.10i Command Line Version

 

JLinkARM.dll V6.10i (DLL compiled Oct 25 2016 19:31:51)

 

-----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:                 S32K144
Target interface:              SWD
Target interface speed:        1000kHz
Target endian:                 little

 

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OpenSDA 2 compiled Apr 24 2014 14:44:11
Hardware: V1.00
S/N: 621000000
Checking target voltage...
Target voltage: 3.30 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.
Communication timed out: Requested 4 bytes, received 0 bytes !

 

ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
Could not connect to target.
Please check power, connection and settings.

Outcomes