cancel
Showing results for 
Search instead for 
Did you mean: 

Keep getting "Could not verify ST Device" on original ST chip and J-Link under CubeIDE

bully
Senior

Hello,

I'm getting this error that is related to using STM32 clones.

But we use original chips from ST from well known distributors, why do I get this error ?

Sometimes unplug/plug helps, sometimes Erase Full chip also helps, but I'm repeating those steps all the time and lose a lot of time.

In same moment, when CubeIDE cannot verify chip, J-link utilities work normally.

If ST can't get verification to work reliably, why is it present anyway ?

Regards,

Rob.

2 REPLIES 2
Markus GIRDLAND
ST Employee

Hello Rob!

Sorry about the delay in response, I was out-of-office.

What device are you using? If you have a reliable step-by-step guide to recreate the issue I'd be happy to create a ticket to get the devs to take a close look at the verification process.

bully
Senior

Hello,

let me describe situation a bit. Verify error happens quite often, then I usually:

  • try to unplug/plug J-Link on USB
  • if doesn't help, then I power off/on our custom HW and repeat step 1
  • if doesn't help, then I run J-Flash lite utility to erase full chip flash (it always runs, because it doesn't check), then I repeat first two steps
  • in large majority of cases, last above step works, but usually another flash program cycle is again unsuccessful.

I attach logs, and it seems quite obvious (my guess) that chip returns 0 on ID verify step (ReadAP 0x2). But how can Erash Flash step help in this case ?

I understand that you want to check chips for originality, but if that causes troubles on original chips, then please give as possibility to switch this feature off,

otherwise we will have to switch to other development tools that don't have this problem.

Regards,

Rob.

Success :

SEGGER J-Link GDB Server V6.94c Command Line Version
 
JLinkARM.dll V6.94c (DLL compiled Feb  5 2021 17:35:11)
 
Command line: -port 2331 -s -device STM32F779NI -endian little -speed 4000 -if swd -vd
-----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:      localhost only
Generate logfile:              off
Verify download:               on
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
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:                 STM32F779NI
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little
 
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Feb 18 2021 11:25:23
Hardware: V1.00
S/N: 801024972
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Connected to 127.0.0.1
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Received monitor command: WriteDP 0x2 0xF0
O.K.
Received monitor command: ReadAP 0x2
O.K.:0xE00FD003
Reading 32 bytes @ address 0xE00FDFD0
Received monitor command: reset
Resetting target
Downloading 504 bytes @ address 0x08000000 - Verified OK
Downloading 16096 bytes @ address 0x08000200 - Verified OK
Downloading 15968 bytes @ address 0x080040E0 - Verified OK
Downloading 16000 bytes @ address 0x08007F40 - Verified OK
Downloading 16064 bytes @ address 0x0800BDC0 - Verified OK
Downloading 16160 bytes @ address 0x0800FC80 - Verified OK
Downloading 16128 bytes @ address 0x08013BA0 - Verified OK
Downloading 16128 bytes @ address 0x08017AA0 - Verified OK
Downloading 12272 bytes @ address 0x0801B9A0 - Verified OK
Downloading 16272 bytes @ address 0x0801E990 - Verified OK
Downloading 14632 bytes @ address 0x08022920 - Verified OK
Downloading 8 bytes @ address 0x08026248 - Verified OK
Downloading 4 bytes @ address 0x08026250 - Verified OK
Downloading 4 bytes @ address 0x08026254 - Verified OK
Downloading 16360 bytes @ address 0x08026258 - Verified OK
Downloading 16352 bytes @ address 0x0802A240 - Verified OK
Downloading 16352 bytes @ address 0x0802E220 - Verified OK
Downloading 16352 bytes @ address 0x08032200 - Verified OK
Downloading 632 bytes @ address 0x080361E0 - Verified OK
Writing register (PC = 0x 8007fb0)
Read 4 bytes @ address 0x08007FB0 (Data = 0xD034F8DF)
Read 2 bytes @ address 0x08007FB0 (Data = 0xF8DF)
Read 2 bytes @ address 0x08007FB2 (Data = 0xD034)
Reading 64 bytes @ address 0x08005300
Read 4 bytes @ address 0x080054A8 (Data = 0x200104BC)
Read 2 bytes @ address 0x08005568 (Data = 0x4B5C)
Read 4 bytes @ address 0xE000ED14 (Data = 0x00040200)
Downloading 4 bytes @ address 0xE000ED14 - Verified OK
Reading all registers
Read 4 bytes @ address 0x08007FB0 (Data = 0xD034F8DF)
Read 2 bytes @ address 0x08007FB0 (Data = 0xF8DF)
Read 2 bytes @ address 0x08007FB2 (Data = 0xD034)
Read 4 bytes @ address 0xE000EDFC (Data = 0x01000000)
Downloading 4 bytes @ address 0xE000EDFC - Verified OK
Reading all registers
Read 4 bytes @ address 0x08007FB0 (Data = 0xD034F8DF)
Read 2 bytes @ address 0x08007FB0 (Data = 0xF8DF)
Read 2 bytes @ address 0x08007FB2 (Data = 0xD034)
Reading 64 bytes @ address 0x080066C0
Read 2 bytes @ address 0x080066F8 (Data = 0xF001)
Setting breakpoint @ address 0x08005568, Size = 2, BPHandle = 0x0001
Setting breakpoint @ address 0x080066F8, Size = 2, BPHandle = 0x0002
Starting target CPU...
...Breakpoint reached @ address 0x080066F8
Reading all registers
Removing breakpoint @ address 0x08005568, Size = 2
Removing breakpoint @ address 0x080066F8, Size = 2
Read 4 bytes @ address 0x080066F8 (Data = 0xFC83F001)
Read 1 bytes @ address 0x2002A664 (Data = 0x00)
Read 4 bytes @ address 0x08025DD4 (Data = 0x08022DC0)
Reading 8 bytes @ address 0x08022DC0
Read 1 bytes @ address 0x20019CAC (Data = 0x00)
Read 4 bytes @ address 0x200102A4 (Data = 0x00000000)
Reading 8192 bytes @ address 0x200001C0
Reading 8192 bytes @ address 0x200021C0
Reading 8192 bytes @ address 0x200041C0
Reading 8084 bytes @ address 0x200061C0

Failure:

SEGGER J-Link GDB Server V6.94c Command Line Version
 
JLinkARM.dll V6.94c (DLL compiled Feb  5 2021 17:35:11)
 
Command line: -port 2331 -s -device STM32F779NI -endian little -speed 4000 -if swd -vd
-----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:      localhost only
Generate logfile:              off
Verify download:               on
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
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:                 STM32F779NI
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little
 
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Feb 18 2021 11:25:23
Hardware: V1.00
S/N: 801024972
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.29 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x08011C50 (Data = 0x681B4B06)
Read 2 bytes @ address 0x08011C50 (Data = 0x4B06)
Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x08011C50 (Data = 0x681B4B06)
Received monitor command: WriteDP 0x2 0xF0
O.K.
Received monitor command: ReadAP 0x2
O.K.:0x00000000
Reading 32 bytes @ address 0xE00FFFD0
Reading 32 bytes @ address 0xF0000FD0
WARNING: Failed to read memory @ address 0xF0000FD0
WARNING: Failed to read memory @ address 0xF0000FD0
WARNING: Failed to read memory @ address 0xF0000FEF
GDB closed TCP/IP connection (Socket 1060)