[SOLVED] J-Flash XMC4700 support

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

  • [SOLVED] J-Flash XMC4700 support

    Hello Everyone,

    I have problem with J-Flash V5.10g and XMC4700.
    When I try to erase the memory (erase sectors or erase chip), after a short time an error dialog is shown with message: "Timeout while erasing sector, core does not stop".

    The Log is the following:


    Connecting ...
    - Connecting via USB to J-Link device 0
    - Target interface speed: 4000 kHz (Fixed)
    - VTarget = 3.343V
    - Initializing CPU core (Init sequence) ...
    - Initialized successfully
    - Target interface speed: 4000 kHz (Fixed)
    - Connected successfully
    Erasing selected sectors ...
    - 10 of 10 sectors selected, 1 range, 0xC000000 - 0xC1FFFFF
    - RAM tested O.K.
    - Erasing bank 0, sectors 0
    - ERROR: Timeout while erasing sector, core does not stop
    - ERROR: Failed to erase sectors
    Disconnecting ...
    - Disconnected


    Settings are:
    Target interface: SWD, speed before init 4000kHz, speed after init 4000kHz
    CPU: Infineon XMC4700-2048
    All other settings are the default.


    In the same board, with XMC4500 I never had problems.
    Any suggestion?

    Thank you.

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

  • Hello,


    could you please start J-Link Commander (jlink.exe). Type in "connect" and follow the instructions given?
    Could you then type in "h" (=halt) "r" (=reset) and finally "erase" and post the complete output of J-Link commander here?

    Could you also attach a J-Link logfile of this 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.
  • Hello,

    with J-Link Commander the erase is done, the log file is in the attachment.

    Also when I erase, program and debug in eclipse all is working, but it seems that some memory is not written.
    I have some information that it has to be written at the end of the flash.

    With XMC4500, 1Mb of flash it works.
    With XMC4700, 2Mb of flash it does not work, but the information are present in the program file.

    This is the reason why I start to try with J-Flash.

    Best regards,

    Francesco.
    Files
  • Hi Francesco,

    With XMC4700, 2Mb of flash it does not work, but the information are present in the program file.

    Can you provide us with the program file for reproduction purposes?
    If this is not possible, could you tell us witch flash addresses are not written to?

    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,


    I have done some tests with a simple program with empty main.
    In each one, I wrote the string "yes" starting from the last 8 bytes of flash memory.


    If I set the memory size to 1024K, the "yes" string at address 0x080FFFF8 is written correctly.
    If I set the memory size to 2048K, the "yes" string at address 0x081FFFF8 is skipped with no errors and the rest of the program is written correctly.


    The results are in the attachment. Tell me if you need more files / specifications.
    Thank you.


    Francesco
    Files
    • TestXMC4700.zip

      (448.91 kB, downloaded 488 times, last: )
  • Hi Francesco,


    we were able to reproduce this issue.
    It will be fixed in the next version of the J-Link software & documentation pack

    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.
  • We have just released V5.10e of the J-Link software in which this has been fixed.


    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.
  • Ok, now works for j-flash, but is still not working with jlink commander, so it is impossible to program and debug from IDE.
    The memory near the end is not written by the commander, but is written by j-flash.
    how can I solve?

    Best Regards
    Francesco
  • Hi Francesco,


    sorry for the delay in response.
    Could you provide us with a J-Link Logfile of a failed programming attempt with J-Link Commander?

    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,

    I attached the logfile, when I try to program and debug the XMC4700 with GNU ARM Eclipse.
    Probably the problem is shown on line 239 and line 243:

    Source Code

    1. T3994 001:118 JLINK_WriteMem(0x081FFFF8, 0x0004 Bytes, ...) - Data: 79 65 73 00
    2. T3994 001:272 JLINK_ReadMem (0x081FFFF8, 0x0004 Bytes, ...) -- CPU_ReadMem(4 bytes @ 0x081FFFF8) - Data: 00 00 00 00 returns 0x00 (0001ms, 0585ms total)


    When I read back the flash content with J-Flash, the 4 bytes at 0x081FFFF8 (0x0C1FFFF8 for the uncached memory) are all 0.
    If I try to program the same code with J-Flash, all the memory is written done.

    Best regards,

    Francesco
    Files
    • XMC4700_log.txt

      (107.59 kB, downloaded 549 times, last: )
  • Hi Francesco,

    You are correct, there is a bug in the current version for XMC4xxx devices with more than 1 MB flash,
    when performing downloads to the cached flash area at 0x08000000. The issue does not come up when downloading to the non-cached area at 0x0C000000.
    Will be corrected in V5.10k planned to be released later today.
    Sorry for any inconveniences caused.

    Would you like to be added to the J-Link software update notification list,
    so you get informed automatically when the new version becomes available?
    Subscribe: segger.com/notification/subscribe.php?prodid=7,94


    Best regards
    Alex
    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.