[SOLVED] ST locked after erase

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

  • [SOLVED] ST locked after erase


    SEGGER J-Link Commander V6.20c (Compiled Sep 26 2017 17:31:29)
    DLL version V6.20c, compiled Sep 26 2017 17:30:56

    Connecting to J-Link via USB...O.K.
    Firmware: J-Trace Cortex-M Rev.3 compiled May 22 2017 18:32:06
    Hardware version: V3.10
    S/N: 203201228
    License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    Emulator has RAWTRACE capability
    VTref = 3.287V


    Type "connect" to establish a target connection, '?' for help
    J-Link>showemulist
    J-Link[0]: Connection: USB, Serial number: 203201228, ProductName: J-Trace Corte
    x-M
    J-Link>erase
    Target connection not established yet but required for command.
    Please specify device / core. <Default>: STCOMET10
    Type '?' for selection dialog
    Device>
    Please specify target interface:
    J) JTAG (Default)
    S) SWD
    TIF>
    Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
    JTAGConf>
    Specify target interface speed [kHz]. <Default>: 4000 kHz
    Speed>
    Device "STCOMET10" selected.


    Connecting to target via JTAG
    TotalIRLen = 10, IRPrint = 0x0011
    JTAG chain detection found 2 devices:
    #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP
    #1 Id: 0x122B7041, IRLen: 06, Unknown device
    Scanning AP map to find all available APs
    AP[1]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
    Scanning AP map to find all available APs
    AP[0]: Stopped AP scan as end of AP map has been reached
    Iterating through AP map to find AHB-AP to use

    ****** Error: Bad JTAG communication: Write to IR: Expected 0x1, got 0xF (TAP Co
    mmand : 10) @ Off 0x5.
    Could not find core in Coresight setup
    Cannot connect to target.
    Erasing device (STCOMET10)...
    ERROR: Erase returned with error code -1.

    I have used a short jlink script that looks like this:

    device STCOMET10
    jtagconf -1,-1
    si 0
    speed 1000
    autoconnect 1
    erase

    And now I can not connect to the board anymore and it says:

    ****** Error: Bad JTAG communication: Write to IR: Expected 0x1, got 0xF (TAP Command : 10) @ Off 0x5.
    Could not find core in Coresight setup
    Cannot connect to target.

    Is there any way to recover from this? :(

    The post was edited 2 times, last by milupas ().

  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    We have a STCOMET10 board here and erasing and reconnecting to the board afterwards was working without any issues.
    However this MCU seems to have secured states and different boot modes.
    Which boot mode is your board configured to? The one we were using is called "Normal boot".
    If you are using "Customer OTP write" boot mode you must be careful as depending on the values from the OTP area the chip could get locked without chance for recovery.
    More information about the boot modes of the STCOMET can be found in the corresponding STCOMET user guide.

    Please understand that we can't put more time into this issue as from J-Link perspective all operations are working as expected.
    For chip specific unlocking steps we suggest contacting ST support.

    Best regards,
    Nino
    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.