Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Old JLink firmware expects some missing initialization step(s) to work correctly. #36

@Nable80

Description

@Nable80

There's a second issue that I discovered yesterday with the same old JLink-OB clone probes.

Although probe is detected correctly after connection, it fails to work and reports the lack of response from target:

> ./list
Found 1 J-Link device.

Bus 006 Address 058 Port 004: VID=1366 PID=0101 – SEGGER J-Link (Serial 000000123456)
⤷ Capabilities: GetHwVersion | ReadConfig | WriteConfig | GetMaxBlockSize | GetHwInfo | ResetStopTimed | SelectIf | GetCounters | GetCpuCaps | ExecCpuCmd | Swo | Register | GetCapsEx
  Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
  HW Version: J-Link 7.0.0
  Max. SWO Speed: 4500000 Hz
  Max. Memblock: 11288 bytes
  VTref: 3.3 V
  Interfaces:
      - JTAG (up to 12 MHz)
      - SWD (up to 12 MHz)

> ./swdump
speed configuration: 12000 kHz
error: no response from target chip

> ./swdump
speed configuration: 12000 kHz
error: no response from target chip

Then I start and terminate (hit Ctrl+C) the official proprietary JLink tool (I want to get rid of this piece of non-free software, that's why I'm trying to learn how to use your library), it shows that both probe and target are OK:

> JLinkGDBServer -halt -if SWD -device STM32F030F4
SEGGER J-Link GDB Server V5.02f Command Line Version

JLinkARM.dll V5.02f (DLL compiled Oct  2 2015 20:53:57)

-----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:      yes
Generate logfile:              off
Verify download:               off
Init regs on start:            off
Silent mode:                   off
Single run mode:               off
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:                 STM32F030F4
Target interface:              SWD
Target interface speed:        1000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
S/N: 20090928
Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFull
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...^C

And then I run swdump again and... it works too:

> ./swdump
speed configuration: 12000 kHz
DPIDR=0x0BB11477
CTRL/STAT=0xF0000040

It works until I disconnect and connect my probe again, then I have to run JLinkGDBServer again. I know this report is incomplete without traces / USB communication dumps but probably someone saw this behavior too and already know the answer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions