[ABANDONED] Cannot erase and program anymore MK70FN1M0XXX15

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Cannot erase and program anymore MK70FN1M0XXX15

    I have a Kinetis K70 that I want to erase and program with J-Link Plus.
    Everything used to work fine in the past with the same target device and J-Link probe, but now the operation is unsuccessful.

    As soon I power on the target device, the J-Link LED changes from green to red.
    I have tried to change host PC and J-Link probe, but the problem persists.

    Any hint about the cause of the problem and what to try?

    Here is the log of J-Link Commander V6.96 of what I have tried so far:

    SEGGER J-Link Commander V6.96 (Compiled Feb 19 2021 09:57:05)
    DLL version V6.96, compiled Feb 19 2021 09:55:51

    Connecting to J-Link via USB...O.K.
    Firmware: J-Link V10 compiled Aug 9 2021 10:30:48
    Hardware version: V10.10
    S/N: 600110993
    License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    VTref=3.296V


    Type "connect" to establish a target connection, '?' for help
    J-Link>connect
    Please specify device / core. <Default>: MK70FN1M0XXX15
    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 "MK70FN1M0XXX15" selected.


    Connecting to target via SWD
    InitTarget()
    Found SW-DP with ID 0x2BA01477
    DPIDR: 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x001C0000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    ROMTbl[0][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
    ROMTbl[0][7]: E0043000, CID: B105900D, PID: 001BB908 CSTF
    Cortex-M4 identified.
    J-Link>erase
    Without any give address range, Erase Chip will be executed
    Erasing device...

    ****** Error: Failed to download RAMCode.
    Failed to prepare for programming.
    Failed to download RAMCode!
    ERROR: Erase returned with error code -1.
    J-Link>unlock kinetis
    Found SWD-DP with ID 0x2BA01477
    Unlocking device...O.K.
    J-Link>erase
    Without any give address range, Erase Chip will be executed
    CPU could not be halted
    Erasing device...
    CPU could not be halted

    ****** Error: Cannot read register 16 (XPSR) while CPU is running
    Cannot read register 20 (CFBP) while CPU is running
    Cannot read register 0 (R0) while CPU is running
    Cannot read register 1 (R1) while CPU is running
    Cannot read register 2 (R2) while CPU is running
    Cannot read register 3 (R3) while CPU is running
    Cannot read register 4 (R4) while CPU is running
    Cannot read register 5 (R5) while CPU is running
    Cannot read register 6 (R6) while CPU is running
    Cannot read register 7 (R7) while CPU is running
    Cannot read register 8 (R8) while CPU is running
    Cannot read register 9 (R9) while CPU is running
    Cannot read register 10 (R10) while CPU is running
    Cannot read register 11 (R11) while CPU is running
    Cannot read register 12 (R12) while CPU is running
    Cannot read register 14 (R14) while CPU is running
    Cannot read register 15 (R15) while CPU is running
    Cannot read register 17 (MSP) while CPU is running
    Cannot read register 18 (PSP) while CPU is running

    ****** Error: Failed to prepare for programming.
    Could not preserve target memory.
    ERROR: Erase returned with error code -1.
    J-Link>h
    CPU could not be halted
    J-Link>r
    Reset delay: 0 ms
    Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    AfterResetTarget()
    J-Link>erase
    Without any give address range, Erase Chip will be executed
    Erasing device...

    ****** Error: Failed to prepare for programming.
    Could not preserve target memory.
    ERROR: Erase returned with error code -1.
    J-Link>



    It seems that the problem might somewhat be recoverable by connecting at fixed low speed (100 kHz or even 10 kHz), but only through JLinkGDBServerCL within the Kinetis KDS, not with the J-Link Commander.

    The post was edited 1 time, last by SuperMario: Added last note about something working with JLinkGDBServerCL at low speed. ().

  • Hi,
    Thank you for your inquiry.
    Such an issue is not known to us, and we are not able to reproduce it here.

    Could you please answer the following questions?
    1) You are using a long outdated version of the J-Link Software.
    Could you please download the latest version and check if the issue still persists?
    segger.com/downloads/jlink#J-L…twareAndDocumentationPack
    2) Does this issue also occur when connecting to a chip that is in erased state?
    3) Does the issue also appear on a different computer, with a different J-Link and different board?
    4) Could you please send us a J-Link log file? How to enable:
    wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.