Saturday, April 21st 2018, 6:57pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

sevi

Beginner

Date of registration: Mar 23rd 2016

Posts: 9

1

Thursday, March 24th 2016, 2:20pm

[SOLVED] J-Link 5.10u LPC43xx SPFI Flashing Problem

Hi,

i'm using the J-Link probe to flash an Micron Serial NOR N25Q128A flash chip connected to a NXP LPC4350 microcontoller.
Up to version 4.98 all worked fine for me but above, also the recently downloaded version 5.10u i can't flash anymore.
I'll get the message "ERROR: Error while determining flash info (Bank @ 0x14000000)"

Is there any problem related to this post:
JLink 5.0.0j LPC43xx SPFI Flashing Problem: Error while determining flash info (Bank @ 0x14000000)


Thanks for your assistance

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

2

Tuesday, April 5th 2016, 2:41pm

Hi,

I cannot reproduce this error using the current 5.12 software:


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Connecting to J-Link via USB...O.K.
Firmware: J-Link Pro V4 compiled Mar 29 2016 18:47:17
Hardware version: V4.00
S/N: 174301714
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
IP-Addr: DHCP (no addr. received yet)
VTref = 3.293V
J-Link>si 1
Selecting SWD as current target interface.
J-Link>device lpc4350_m4
J-Link>connect
Device "LPC4350_M4" selected.


Found SWD-DP with ID 0x2BA01477
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>savebin C:\work\support\2016_q2\F3055\orginal.bin 0x14000000 0x20000
Opening binary file for writing... [C:\work\support\2016_q2\F3055\orginal.bin]
Reading 131072 bytes from addr 0x14000000 into file...O.K.
J-Link>erase
Erasing device (LPC4350_M4)...
J-Link: Flash download: Only internal flash banks will be erased.
To enable erasing of other flash banks like QSPI or CFI, it needs to be enabled via "exec EnableEraseAllFlashBanks"
Erasing done.
J-Link>exec EnableEraseAllFlashBanks
J-Link>erase
Erasing device (LPC4350_M4)...
J-Link: Flash download: Total time needed: 6.188s (Prepare: 1.447s, Compare: 0.000s, Erase: 2.278s, Program: 0.000s, Verify: 0.000s, Restore: 2.461s)
Erasing done.
J-Link>loadfile C:\work\support\2016_q2\F3055\orginal.bin 0x14000000
Downloading file [C:\work\support\2016_q2\F3055\orginal.bin]...
J-Link: Flash download: Flash programming performed for 1 range (131072 bytes)
J-Link: Flash download: Total time needed: 23.579s (Prepare: 1.449s, Compare: 0.192s, Erase: 2.437s, Program: 16.853s, Verify: 0.184s, Restore: 2.462s)
O.K.
J-Link>
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

visectro

Beginner

Date of registration: Mar 23rd 2016

Posts: 9

3

Thursday, April 7th 2016, 9:33am

Hi Niklas,

thank you for your reply.
I've also updated my J-Link software to the latest 5.12 version and still have the problem:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
SEGGER J-Link GDB Server V5.12 GUI Version


JLinkARM.dll V5.12 (DLL compiled Mar 30 2016 17:28:31)


-----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:               off
Init regs on start:            off
Silent mode:                   off
Single run mode:               off
Target connection timeout:     5000 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 \LPC4350_M4.JLinkScript
J-Link settings file:          none
------Target related settings------
Target device:                 LPC4350_M4 (SPIFI)
Target interface:              JTAG
Target interface speed:        auto
Target endian:                 little


Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Ultra V4 compiled Mar 29 2016 18:48:10
Hardware: V4.00
S/N: 504300588
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 3.29 V
Listening on TCP/IP port 2331
Connecting to target...
J-Link found 2 JTAG devices, Total IRLen = 8
JTAG ID: 0x4BA00477 (Cortex-M4)
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x140211CA (Data = 0xFEB7F7FF)
Select auto target interface speed (4000 kHz)
Resetting target
Halting target CPU...
...Target halted (PC = 0x1400447C)
Downloading 4096 bytes @ address 0x14020000
Downloading 4096 bytes @ address 0x14021000
...
Shortened output from 0x14022000 -> 0x14449000
...
Downloading 4096 bytes @ address 0x1444A000
Downloading 432 bytes @ address 0x1444B000
ERROR: Error while determining flash info (Bank @ 0x14000000)                <---- here is the first error
Read 4 bytes @ address 0x28E4EA4C (Data = 0x00000000)
Read 4 bytes @ address 0x28E4EA4C (Data = 0x00000000)
Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)
Read 4 bytes @ address 0x28E4EA4C (Data = 0x00000000)
WARNING: Failed to read memory @ address 0xA5A5A5A5
Read 2 bytes @ address 0x1404865C (Data = 0xFFFF)
Read 2 bytes @ address 0x1404865A (Data = 0xFFFF)
Read 2 bytes @ address 0x1404865C (Data = 0xFFFF)
Read 2 bytes @ address 0x1404865C (Data = 0xFFFF)
Read 2 bytes @ address 0x14048642 (Data = 0xFFFF)
Read 2 bytes @ address 0x14048640 (Data = 0xFFFF)
Read 2 bytes @ address 0x14048642 (Data = 0xFFFF)
Read 2 bytes @ address 0x14048642 (Data = 0xFFFF)
Reading from address 0x10091FFC (Data = 0x00000000)
Writing 0x13371337 @ address 0x10091FFC
Writing register (SP = 0xFFFFFFFF)
Writing register (PC = 0xFFFFFFFF)
Setting breakpoint @ address 0x14048642, Size = 2, BPHandle = 0x0001
Starting target CPU...
...Target halted (DBGRQ, PC = 0xFFFFFFFE)
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Removing breakpoint @ address 0x14048642, Size = 2
WARNING: Failed to read memory @ address 0xFFFFFFF4
WARNING: Failed to read memory @ address 0xFFFFFFF0
Read 4 bytes @ address 0x10090640 (Data = 0x00000000)



Thank you an best regards
Sebastian</path>

This post has been edited 1 times, last edit by "visectro" (Apr 7th 2016, 9:38am)


SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

4

Thursday, April 7th 2016, 10:25am

Hi Sebastian,


while it may seem a little bit redundant, could you please give J-Link Commander a try in an interactive (without script file)session, and post the complete output here?
Could you also provide a logfile of that session?

Log output can be enabled like as follows:
  • Open a connection to J-Link, e.g start J-Link Commander
  • In J-Link Control Panel: (Click the J-Link symbol located in the notification / tray area in order to open J-Link Control panel)
  • Open the tab "Settings"
  • Next to the field "Log file" check "Override" and click "..." in order to choose a log file path.

This is also described in UM8001 Chapter 5 "Working with J-Link and J-Trace", Section 5.7 "J-Link control panel" .


Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

visectro

Beginner

Date of registration: Mar 23rd 2016

Posts: 9

5

Thursday, April 7th 2016, 10:59am

Hi Niklas,

here the output for the J-Link Commander:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SEGGER J-Link Commander V5.12 (Compiled Mar 30 2016 17:29:09)
DLL version V5.12, compiled Mar 30 2016 17:28:31


Connecting to J-Link via USB...O.K.
Firmware: J-Link Ultra V4 compiled Mar 29 2016 18:48:10
Hardware version: V4.00
S/N: 504300588
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref = 3.291V




Type "connect" to establish a target connection, '?' for help
J-Link>si 1
Selecting SWD as current target interface.
J-Link>device lpc4350_m4
J-Link>connect
Specify target interface speed [kHz]. : 4000 kHz
Speed>
Device "LPC4350_M4" selected.




Found SWD-DP with ID 0x2BA01477
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>savebin c:\home\flash.bin 0x14000000 0x20000
Opening binary file for writing... [c:\home\flash.bin]
Reading 131072 bytes from addr 0x14000000 into file...O.K.
J-Link>erase
Erasing device (LPC4350_M4)...
J-Link: Flash download: Only internal flash banks will be erased.
To enable erasing of other flash banks like QSPI or CFI, it needs to be enabled via "exec EnableEraseAllFlashBanks"
Erasing done.
J-Link>exec EnableEraseAllFlashBanks
J-Link>erase
Erasing device (LPC4350_M4)...


****** Error: Error while determining flash info (Bank @ 0x14000000)
ERROR: Erase returned with error code -1.
J-Link>



Log file is attached


Tank you

Best regards Sebastian
visectro has attached the following file:
  • J-Link.log.txt (5.68 kB - 310 times downloaded - Last download: Yesterday, 11:10pm)

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

6

Friday, April 8th 2016, 4:19pm

Hi Sebastian,

thanks for your inquiry.
I was able to reproduce this issue. It only affects this specific SPI-Flash.
This seems to be broken since 4.99b .
I will update this thread once we fixed this issue.

Sorry for any inconvenience caused.

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

visectro

Beginner

Date of registration: Mar 23rd 2016

Posts: 9

7

Monday, April 11th 2016, 9:47am

Hi Niklas,

thank you for the great support!

So I'm waiting for a new version - do you know when it will release?

Best regards Sebastian

visectro

Beginner

Date of registration: Mar 23rd 2016

Posts: 9

8

Thursday, August 25th 2016, 8:47am

Hi Segger-Team,

I just tried the "new" released version 6.00g concerning the flash problem. It's still the same.
Have I wait for a specific version or do you know when the fix will be released?

Thanks you and best regards
Sebastian

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

9

Wednesday, September 14th 2016, 10:22am

Hi Sebastian,

sorry for the delay in response.
We just received new testhardware (N25Q / MT25Q).
Therefore investigation of this issue will start in the next few days.

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

10

Thursday, September 15th 2016, 3:16pm

Hi Sebastian,

I just gave it a try using the latest version of the J-Link software and could not reproduce any issues with an LPC4332 target device and a N25Q512A13GF840F SPI Flash.
Erase, program and verify worked fine.

Could you please check to connection between the SPI Flash and the MCU?
Would it be possible for you to monitor the signals between the SPI Flash and the MCU with a Scope?

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

visectro

Beginner

Date of registration: Mar 23rd 2016

Posts: 9

11

Friday, September 23rd 2016, 7:22am

Hi Niklas,

sorry for the delayed answer.

I tried one more time to erase the flash but get still the same error:

Flash: N25Q128A13ESE40
MCU: NXP LPC4350
J-Link: 6.10a
Debug-Probe: J-Link Ultra+ with latest firmware

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SEGGER J-Link Commander V6.10a (Compiled Sep 19 2016 20:08:24)
DLL version V6.10a, compiled Sep 19 2016 20:07:49


Connecting to J-Link via USB...O.K.
Firmware: J-Link Ultra V4 compiled Sep  1 2016 18:31:22
Hardware version: V4.00
S/N: 504300588
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref = 3.291V


Type "connect" to establish a target connection, '?' for help
J-Link>si 1
Selecting SWD as current target interface.
J-Link>device lpc4350_m4
J-Link>connect
Specify target interface speed [kHz]. : 4000 kHz
Speed>
Device "LPC4350_M4" selected.


Found SWD-DP with ID 0x2BA01477
AP-IDR: 0x24770011, Type: AHB-AP
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>savebin c:\home\flash2.bin
Syntax: savebin , ,  (hex)
J-Link>savebin c:\home\flash2.bin 0x14000000 0x20000
Opening binary file for writing... [c:\home\flash2.bin]
Reading 131072 bytes from addr 0x14000000 into file...O.K.
J-Link>erase
Erasing device (LPC4350_M4)...
J-Link: Flash download: Only internal flash banks will be erased.
To enable erasing of other flash banks like QSPI or CFI, it needs to be enabled via "exec EnableEraseAllFlashBanks"
Erasing done.
J-Link>exec EnableEraseAllFlashBanks
J-Link>erase
Erasing device (LPC4350_M4)...


****** Error: Error while determining flash info (Bank @ 0x14000000)
ERROR: Erase returned with error code -1.
J-Link>



I don't think it's helpful to monitor the connection between the MCU and the flash because the J-Link version up to 4.98e works fine with the same setup just seconds before.

I'm still developing with this J-Link 4.98e version therefore this couldn't be any hardware problem with the board.


Thanks
Sebastian

This post has been edited 1 times, last edit by "visectro" (Sep 23rd 2016, 7:25am)


visectro

Beginner

Date of registration: Mar 23rd 2016

Posts: 9

12

Wednesday, October 26th 2016, 9:50am

Hi Niklas,

still no answer after a month do you need additional information from my side?

You said this is an issue in the Segger software and it will be fixed within the next versions.
Also you said it's already working with your not completely identical hardware setup.

But for me it's still not working!!! I'll get identical behavior and can not access flash (see previous post).

Is there still a problem within the software?

Do you think you can support me to counter this problem?

I hope i'll get and clear statement.

Thank you and best regards
Sebastian

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

13

Wednesday, October 26th 2016, 11:01am

Hi Sebastian,


Quoted

I'm still developing with this J-Link 4.98e version therefore this couldn't be any hardware problem with the board.

I agree with this statement, I forgot that it is working for you with 4.98.

Quoted

You said this is an issue in the Segger software and it will be fixed within the next versions.
Also you said it's already working with your not completely identical hardware setup.


I agree that my statements seem inconsistent as I did not update you about the status of our investigation:
It turned out that our N25Q128 test sample is malfunctioning.
Therefore my statement about that 4.98 is O.K. and 4.99b+ is broken is invalid, 4.98 just did not handle the error.

Quoted

still no answer after a month do you need additional information from my side?

Although we are always interested in improving our software and making our customers happy, this forum has a lower priority than our E-Mail support (customers with-in the support period).
Thus, not all threads can be answered by SEGGER employees and inactive threads may loose attention.
I recommend to push a topic every 3-5 days if there is no response in the mean time to prevent that the thread slips out of focus.

As mentioned in the forum's terms of use, support given in this forum a "voluntary service" by SEGGER.

Quoted

This forum is not monitored by SEGGER technical support personnel. Do not expect to receive technical support via this forum.


Today is already booked, I will try to squeeze in an investigation by the end of this week.
If the issue is not obvious from the source code, we need to order hardware again.


Sorry for any inconvenience caused.

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

SEGGER - Erik

Super Moderator

Date of registration: Dec 20th 2011

Posts: 400

14

Friday, February 3rd 2017, 11:09am

Hi all,

Quick update:
We found the root cause of the behavior: Under special circumstances, the boot ROM of the LPC43xx brought the SPI flash into a state where it did not accept any commands. We have implemented a fix which is included in any software version >= V6.12i

Sebastian already confirmed that the new version is working as expected.

-- Case closed --

Best regards
Erik