JLink stopped connecting to Freescale Kinetis K60

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

  • JLink stopped connecting to Freescale Kinetis K60

    Hi,

    My system:
    -------------
    I've a JLink ARM version 8.0 with
    I'm testing it with the JLink command line 4.25a (which is a beta but I've also tested with the 4.24b).
    I've it connected to a Freescale evaluation board TWR-K60N512 which has a Freescape CPU Kinetis MK60N512VMD100
    Unfortunately as everything was going well I wasn't recoding everything I was doing, but I can send you any log now.

    The last working thing I was doing:
    -----------------------------------------
    I clicked in the JLink command line icon.
    I just entered the command:
    exec device = MK60N512VMD100
    Then I entered the command:
    loadbin image.bin 0
    And everything worked properly, because the following command was able to show me the
    data that was saved in the flash.
    mem 0 10
    Then I just tried to reset the board:
    r

    After the image was saved, then everything started going wrong:
    -----------------------------------------------------------------------------
    Executing the JLink shows this:
    C:\Archivos de programa\SEGGER\JLinkARM_V425a>JLink.exe
    SEGGER J-Link Commander V4.25a ('?' for help)
    Compiled Mar 2 2011 12:24:56
    DLL version V4.25a, compiled Mar 2 2011 12:24:38
    Firmware: J-Link ARM V8 compiled Jan 31 2011 18:34:52
    Hardware: V8.00
    S/N: 158000570
    OEM: IAR
    VTarget = 3.313V
    Info: TotalIRLen = 4, IRPrint = 0x01
    Info: ARM AP[0]: 0x24770011, AHB-AP
    Info: ARM AP[1]: 0x001C0000, JTAG-AP
    ****** Error: No APB-AP found.
    No devices found on JTAG chain. Trying to find device on SWD.
    Info: Found SWD-DP with ID 0x2BA01477
    WARNING: ROM table: Two components occupy the same memory space.
    Info: FPUnit: 1 code (BP) slots and 0 literal slots
    WARNING: CPU core not found.
    No device found on SWD.
    Did not find any core.
    Info: TotalIRLen = 4, IRPrint = 0x01
    Info: ARM AP[0]: 0x24770011, AHB-AP
    Info: ARM AP[1]: 0x001C0000, JTAG-AP
    ****** Error: No APB-AP found.
    No devices found on JTAG chain. Trying to find device on SWD.
    Info: Found SWD-DP with ID 0x2BA01477
    WARNING: ROM table: Two components occupy the same memory space.
    Info: FPUnit: 1 code (BP) slots and 0 literal slots
    WARNING: CPU core not found.
    No device found on SWD.
    Did not find any core.
    J-Link>

    If I try to reset the device to start from the first instruction, everything fails in the same way:
    J-Link>r
    Info: TotalIRLen = 4, IRPrint = 0x01
    Info: ARM AP[0]: 0x24770011, AHB-AP
    Info: ARM AP[1]: 0x001C0000, JTAG-AP
    ****** Error: No APB-AP found.
    Reset delay: 0 ms
    Reset type NORMAL: Toggle reset pin and halt CPU core.
    Info: TotalIRLen = 4, IRPrint = 0x01
    Info: ARM AP[0]: 0x24770011, AHB-AP
    Info: ARM AP[1]: 0x001C0000, JTAG-AP
    Info: TotalIRLen = 4, IRPrint = 0x01
    Info: ARM AP[0]: 0x24770011, AHB-AP
    Info: ARM AP[1]: 0x001C0000, JTAG-AP
    WARNING: CPU not halted after Reset, halting using Halt request
    ****** Error: No APB-AP found.

    I've seen in the forums that some related problems are solved with unlock, but unlocking and reset gives me:
    J-Link>unlock Kinetis
    Found SWD-DP with ID 0x2BA01477
    Unlocking device...O.K.
    J-Link>r
    Info: Found SWD-DP with ID 0x2BA01477
    WARNING: ROM table: Two components occupy the same memory space.
    Info: FPUnit: 1 code (BP) slots and 0 literal slots
    WARNING: CPU core not found.
    Reset delay: 0 ms
    Reset type NORMAL: Toggle reset pin and halt CPU core.
    Info: Could not measure total IR len. TDO is constant high.
    Info: Found SWD-DP with ID 0x2BA01477
    WARNING: ROM table: Two components occupy the same memory space.
    Info: FPUnit: 1 code (BP) slots and 0 literal slots
    WARNING: CPU core not found.
    Info: Found SWD-DP with ID 0x2BA01477
    WARNING: ROM table: Two components occupy the same memory space.
    Info: FPUnit: 1 code (BP) slots and 0 literal slots
    WARNING: CPU core not found.
    WARNING: CPU not halted after Reset, halting using Halt request
    ****** Error: JTAG Id mismatch. Expected: 0x0BA00000, found: 0x00000000)
    J-Link>
    During this operation a dialog appears saying that "TCK (pin 9) low, but should be high. please check target hardware".

    I can do any operation any longer because it always fails with similar messages about things that I don't understand: SWD-DP, APB-AB, ROM tables...

    Is it possible for me to do any operation to fix this situation. How can I mass-erase the device, or stop it after a reset?

    Thank you very much in advance.
  • Hi,

    usually the "unlock" command should mass-erase the device.
    Would it be possible to get the bin file you loaded into the internal flash of the MK60N ?
    We would like to reproduce and fix this.


    Best regards
    Alex
    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.
  • I've seen what was the problem. The Kinetis K60 has some configuration registers from 0x400 to 0x40C.
    This means that it had some random values so the Kinetis was secured in a random way.

    After testing a lot of methods, the only way I was able to mass-erase the device was using the CodeWarrior with
    the OpenJTAG included in the board. Then I fixed my program and loaded the new program and
    everything worked properly.

    Definitely the "unlock Kinetis" command didn't mass-erase the device, even if no error happened in the process.
    The most confusing part was the error messages were not very clear about the device being secured.
    I don't know if it is technically possible to know if the device is secured and give a bit more friendly messages.

    I attached the wrong image that made me impossible to mass-erase the device with JLink.
    Files
    • image.zip

      (9.37 kB, downloaded 1,324 times, last: )