Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STLINK/V2-1 and STLINK/V2 SN incompatibility on NUCLEO-F401RE board #417

Closed
6 tasks done
xor-gate opened this issue May 16, 2016 · 4 comments · Fixed by #1106
Closed
6 tasks done

STLINK/V2-1 and STLINK/V2 SN incompatibility on NUCLEO-F401RE board #417

xor-gate opened this issue May 16, 2016 · 4 comments · Fixed by #1106

Comments

@xor-gate
Copy link
Member

xor-gate commented May 16, 2016

  • Programmer/board type: NUCLEO-F401RE
  • Programmer firmware version: n/a
  • Operating system: Mac OS X
  • Stlink tools version and/or git commit hash: 0f6dcbd (> v1.2.0)
  • Stlink commandline tool name: st-util
  • Target chip (and optional board): e.g STM32F401RE (NUCLEO-F401RE)

Output:

$ system_profiler SPUSBDataType
        STM32 STLink:

          Product ID: 0x374b
          Vendor ID: 0x0483  (STMicroelectronics)
          Version: 1.00
          Serial Number: 0672FF494951785087023310
          Speed: Up to 12 Mb/sec
          Manufacturer: STMicroelectronics
$ ./st-info --probe
Found 1 stlink programmers
 serial: 303637324646343934393531373835
openocd: "\x30\x36\x37\x32\x46\x46\x34\x39\x34\x39\x35\x31\x37\x38\x35"
  flash: 524288 (pagesize: 16384)
   sram: 98304
 chipid: 0x0433
  descr: F4 device (Dynamic Efficency)

The current stlink tools/library is unable to detect a binary or hexstring serial number. The best fix is to detect if the serial is already hex encoded or encode it into a hex string. We need to have a generic hexstr_from_bin, hexstr_to_bin and hexstr_is_valid.

@xor-gate xor-gate added this to the v2.0.0 milestone May 16, 2016
@xor-gate xor-gate self-assigned this May 16, 2016
@xor-gate xor-gate modified the milestones: v2.1.0, v2.0.0 Aug 3, 2016
@xor-gate xor-gate modified the milestones: Unplanned (Contributions Welcome), v2.1.0 Sep 19, 2016
@Nightwalker-87 Nightwalker-87 modified the milestones: Unplanned (Contributions Welcome), Next Feb 19, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: General, v1.7.0, v1.6.1 Mar 14, 2020
@Nightwalker-87 Nightwalker-87 changed the title Nucleo stlink v2 and stlink v2 serial number incompatibility Nucleo stlink v2-1 and stlink v2 serial number incompatibility Mar 28, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.1, v1.6.2 May 6, 2020
@slyshykO
Copy link
Collaborator

If convert openocd: "\x30\x36\x37\x32\x46\x46\x34\x39\x34\x39\x35\x31\x37\x38\x35" to "normal" ASCII we can see this string
"0672FF494951785". Looks similarly to 0672FF494951785087023310, at least first 15 signs.

@tarek-bochkati
Copy link
Collaborator

please check http://openocd.zylin.com/#/c/5396/, it could be linked to this

@Nightwalker-87
Copy link
Member

@tarek-bochkati: Could you open a PR for this, as you were involved in this topic anyway?

@tarek-bochkati
Copy link
Collaborator

tarek-bochkati commented Mar 16, 2021

PR #1106
@Nightwalker-87 , here is it.
I have omitted the hla serial aka openocd serial
Only one valid serial is displayed that matches the serial as displayed in STM32CubeProgrammer.
Tested on ubuntu focal fossa

@Nightwalker-87 Nightwalker-87 linked a pull request Mar 16, 2021 that will close this issue
@Nightwalker-87 Nightwalker-87 changed the title Nucleo stlink v2-1 and stlink v2 serial number incompatibility STLINK/V2-1 and STLINK/V2 serial number incompatibility on NUCLEO-F401RE board Mar 20, 2021
@Nightwalker-87 Nightwalker-87 changed the title STLINK/V2-1 and STLINK/V2 serial number incompatibility on NUCLEO-F401RE board STLINK/V2-1 and STLINK/V2 SN incompatibility on NUCLEO-F401RE board Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment