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

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

  • [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
  • Hi,

    I cannot reproduce this error using the current 5.12 software:


    Source Code

    1. Connecting to J-Link via USB...O.K.
    2. Firmware: J-Link Pro V4 compiled Mar 29 2016 18:47:17
    3. Hardware version: V4.00
    4. S/N: 174301714
    5. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    6. IP-Addr: DHCP (no addr. received yet)
    7. VTref = 3.293V
    8. J-Link>si 1
    9. Selecting SWD as current target interface.
    10. J-Link>device lpc4350_m4
    11. J-Link>connect
    12. Device "LPC4350_M4" selected.
    13. Found SWD-DP with ID 0x2BA01477
    14. Found Cortex-M4 r0p1, Little endian.
    15. FPUnit: 6 code (BP) slots and 2 literal slots
    16. CoreSight components:
    17. ROMTbl 0 @ E00FF000
    18. ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
    19. ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
    20. ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
    21. ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
    22. ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
    23. ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
    24. Cortex-M4 identified.
    25. J-Link>savebin C:\work\support\2016_q2\F3055\orginal.bin 0x14000000 0x20000
    26. Opening binary file for writing... [C:\work\support\2016_q2\F3055\orginal.bin]
    27. Reading 131072 bytes from addr 0x14000000 into file...O.K.
    28. J-Link>erase
    29. Erasing device (LPC4350_M4)...
    30. J-Link: Flash download: Only internal flash banks will be erased.
    31. To enable erasing of other flash banks like QSPI or CFI, it needs to be enabled via "exec EnableEraseAllFlashBanks"
    32. Erasing done.
    33. J-Link>exec EnableEraseAllFlashBanks
    34. J-Link>erase
    35. Erasing device (LPC4350_M4)...
    36. 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)
    37. Erasing done.
    38. J-Link>loadfile C:\work\support\2016_q2\F3055\orginal.bin 0x14000000
    39. Downloading file [C:\work\support\2016_q2\F3055\orginal.bin]...
    40. J-Link: Flash download: Flash programming performed for 1 range (131072 bytes)
    41. 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)
    42. O.K.
    43. J-Link>
    Display All
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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. SEGGER J-Link GDB Server V5.12 GUI Version
    2. JLinkARM.dll V5.12 (DLL compiled Mar 30 2016 17:28:31)
    3. -----GDB Server start settings-----
    4. GDBInit file: none
    5. GDB Server Listening port: 2331
    6. SWO raw output listening port: 2332
    7. Terminal I/O port: 2333
    8. Accept remote connection: localhost only
    9. Generate logfile: off
    10. Verify download: off
    11. Init regs on start: off
    12. Silent mode: off
    13. Single run mode: off
    14. Target connection timeout: 5000 ms
    15. ------J-Link related settings------
    16. J-Link Host interface: USB
    17. J-Link script: \LPC4350_M4.JLinkScript
    18. J-Link settings file: none
    19. ------Target related settings------
    20. Target device: LPC4350_M4 (SPIFI)
    21. Target interface: JTAG
    22. Target interface speed: auto
    23. Target endian: little
    24. Connecting to J-Link...
    25. J-Link is connected.
    26. Firmware: J-Link Ultra V4 compiled Mar 29 2016 18:48:10
    27. Hardware: V4.00
    28. S/N: 504300588
    29. Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    30. Checking target voltage...
    31. Target voltage: 3.29 V
    32. Listening on TCP/IP port 2331
    33. Connecting to target...
    34. J-Link found 2 JTAG devices, Total IRLen = 8
    35. JTAG ID: 0x4BA00477 (Cortex-M4)
    36. Connected to target
    37. Waiting for GDB connection...Connected to 127.0.0.1
    38. Reading all registers
    39. Read 4 bytes @ address 0x140211CA (Data = 0xFEB7F7FF)
    40. Select auto target interface speed (4000 kHz)
    41. Resetting target
    42. Halting target CPU...
    43. ...Target halted (PC = 0x1400447C)
    44. Downloading 4096 bytes @ address 0x14020000
    45. Downloading 4096 bytes @ address 0x14021000
    46. ...
    47. Shortened output from 0x14022000 -> 0x14449000
    48. ...
    49. Downloading 4096 bytes @ address 0x1444A000
    50. Downloading 432 bytes @ address 0x1444B000
    51. ERROR: Error while determining flash info (Bank @ 0x14000000) <---- here is the first error
    52. Read 4 bytes @ address 0x28E4EA4C (Data = 0x00000000)
    53. Read 4 bytes @ address 0x28E4EA4C (Data = 0x00000000)
    54. Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)
    55. Read 4 bytes @ address 0x28E4EA4C (Data = 0x00000000)
    56. WARNING: Failed to read memory @ address 0xA5A5A5A5
    57. Read 2 bytes @ address 0x1404865C (Data = 0xFFFF)
    58. Read 2 bytes @ address 0x1404865A (Data = 0xFFFF)
    59. Read 2 bytes @ address 0x1404865C (Data = 0xFFFF)
    60. Read 2 bytes @ address 0x1404865C (Data = 0xFFFF)
    61. Read 2 bytes @ address 0x14048642 (Data = 0xFFFF)
    62. Read 2 bytes @ address 0x14048640 (Data = 0xFFFF)
    63. Read 2 bytes @ address 0x14048642 (Data = 0xFFFF)
    64. Read 2 bytes @ address 0x14048642 (Data = 0xFFFF)
    65. Reading from address 0x10091FFC (Data = 0x00000000)
    66. Writing 0x13371337 @ address 0x10091FFC
    67. Writing register (SP = 0xFFFFFFFF)
    68. Writing register (PC = 0xFFFFFFFF)
    69. Setting breakpoint @ address 0x14048642, Size = 2, BPHandle = 0x0001
    70. Starting target CPU...
    71. ...Target halted (DBGRQ, PC = 0xFFFFFFFE)
    72. Reading all registers
    73. WARNING: Failed to read memory @ address 0xFFFFFFFE
    74. Removing breakpoint @ address 0x14048642, Size = 2
    75. WARNING: Failed to read memory @ address 0xFFFFFFF4
    76. WARNING: Failed to read memory @ address 0xFFFFFFF0
    77. Read 4 bytes @ address 0x10090640 (Data = 0x00000000)
    Display All



    Thank you an best regards
    Sebastian</path>

    The post was edited 1 time, last by visectro ().

  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Niklas,

    here the output for the J-Link Commander:

    Source Code

    1. SEGGER J-Link Commander V5.12 (Compiled Mar 30 2016 17:29:09)
    2. DLL version V5.12, compiled Mar 30 2016 17:28:31
    3. Connecting to J-Link via USB...O.K.
    4. Firmware: J-Link Ultra V4 compiled Mar 29 2016 18:48:10
    5. Hardware version: V4.00
    6. S/N: 504300588
    7. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    8. VTref = 3.291V
    9. Type "connect" to establish a target connection, '?' for help
    10. J-Link>si 1
    11. Selecting SWD as current target interface.
    12. J-Link>device lpc4350_m4
    13. J-Link>connect
    14. Specify target interface speed [kHz]. : 4000 kHz
    15. Speed>
    16. Device "LPC4350_M4" selected.
    17. Found SWD-DP with ID 0x2BA01477
    18. Found Cortex-M4 r0p1, Little endian.
    19. FPUnit: 6 code (BP) slots and 2 literal slots
    20. CoreSight components:
    21. ROMTbl 0 @ E00FF000
    22. ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
    23. ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
    24. ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
    25. ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
    26. ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
    27. ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
    28. Cortex-M4 identified.
    29. J-Link>savebin c:\home\flash.bin 0x14000000 0x20000
    30. Opening binary file for writing... [c:\home\flash.bin]
    31. Reading 131072 bytes from addr 0x14000000 into file...O.K.
    32. J-Link>erase
    33. Erasing device (LPC4350_M4)...
    34. J-Link: Flash download: Only internal flash banks will be erased.
    35. To enable erasing of other flash banks like QSPI or CFI, it needs to be enabled via "exec EnableEraseAllFlashBanks"
    36. Erasing done.
    37. J-Link>exec EnableEraseAllFlashBanks
    38. J-Link>erase
    39. Erasing device (LPC4350_M4)...
    40. ****** Error: Error while determining flash info (Bank @ 0x14000000)
    41. ERROR: Erase returned with error code -1.
    42. J-Link>
    Display All



    Log file is attached


    Tank you

    Best regards Sebastian
    Files
    • J-Link.log.txt

      (5.68 kB, downloaded 713 times, last: )
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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. SEGGER J-Link Commander V6.10a (Compiled Sep 19 2016 20:08:24)
    2. DLL version V6.10a, compiled Sep 19 2016 20:07:49
    3. Connecting to J-Link via USB...O.K.
    4. Firmware: J-Link Ultra V4 compiled Sep 1 2016 18:31:22
    5. Hardware version: V4.00
    6. S/N: 504300588
    7. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    8. VTref = 3.291V
    9. Type "connect" to establish a target connection, '?' for help
    10. J-Link>si 1
    11. Selecting SWD as current target interface.
    12. J-Link>device lpc4350_m4
    13. J-Link>connect
    14. Specify target interface speed [kHz]. : 4000 kHz
    15. Speed>
    16. Device "LPC4350_M4" selected.
    17. Found SWD-DP with ID 0x2BA01477
    18. AP-IDR: 0x24770011, Type: AHB-AP
    19. Found Cortex-M4 r0p1, Little endian.
    20. FPUnit: 6 code (BP) slots and 2 literal slots
    21. CoreSight components:
    22. ROMTbl 0 @ E00FF000
    23. ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
    24. ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
    25. ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
    26. ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
    27. ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
    28. ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
    29. Cortex-M4 identified.
    30. J-Link>savebin c:\home\flash2.bin
    31. Syntax: savebin , , (hex)
    32. J-Link>savebin c:\home\flash2.bin 0x14000000 0x20000
    33. Opening binary file for writing... [c:\home\flash2.bin]
    34. Reading 131072 bytes from addr 0x14000000 into file...O.K.
    35. J-Link>erase
    36. Erasing device (LPC4350_M4)...
    37. J-Link: Flash download: Only internal flash banks will be erased.
    38. To enable erasing of other flash banks like QSPI or CFI, it needs to be enabled via "exec EnableEraseAllFlashBanks"
    39. Erasing done.
    40. J-Link>exec EnableEraseAllFlashBanks
    41. J-Link>erase
    42. Erasing device (LPC4350_M4)...
    43. ****** Error: Error while determining flash info (Bank @ 0x14000000)
    44. ERROR: Erase returned with error code -1.
    45. J-Link>
    Display All



    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

    The post was edited 1 time, last by visectro ().

  • 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
  • Hi Sebastian,


    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.

    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.

    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.
    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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.