[SOLVED] STM32L072 reset when attaching to running program

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

  • [SOLVED] STM32L072 reset when attaching to running program

    With STM32L0xx devices the "Attach to running program" procedure causes an unwanted reset of the device:

    Debug.SetConnectMode (CM_ATTACH);
    Device "STM32L072CZ" selected.
    Found SW-DP with ID 0x0BC11477
    Found SW-DP with ID 0x0BC11477
    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: 0x04770031)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xF0000000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ F0000000
    ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
    ROMTbl[1] @ E00FF000
    ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.

    With STM32F2xx devices the "Attach to running program" procedure works fine without any reset being generated.

    Of course, for the Murphy's law, I need to "Attach" to a STM32L0xx device and I am NOT interested in STM32F2xx devices ?(

    Any suggestion will be highly appreciated,
  • Hello Paolo,

    Thank you for your inquiry.
    The reported issue was reproducible.
    We are currently working on a fixed J-Link software version.
    Until then you can use the following workaround:
    - Create a JLinkScript with function ConfigTargetSettings()
    - Execute exec command SetSkipInitECCRAMOnConnect and set it to 1
    - load JLinkScript in your Ozone project e.g. in hook function BeforeTargetConnect

    More information about JLinkScript and the Ozone project file can be found in the J-Link user guide and Ozone manual respectively.

    Best regards,
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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 contact us per e-mail.
    Alternatively our support system can be used as well: segger.com/ticket/