[SOLVED] JFlash programs serial number when "Program serial number" checkbox is disabled

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

  • [SOLVED] JFlash programs serial number when "Program serial number" checkbox is disabled

    Hello

    I'm using SEGGER JFLASH V6.62d, Flasher Portable Plus and a microcontroller from Renesas (S3A6).

    When I activate the "Program serial number" checkbox, the serial number 133 (0x84) is written correctly at address 0x40100080. I can verify this by running the command "Read back --> Entire chip".

    After that, I perform a complete erasure of the memory with "Erase chip (F4)". The entire memory is written with 0xff, including address 0x40100080.

    Then, I uncheck the "Program serial number" checkbox to prevent the serial number from being written this time. But, when I program and read back again, the address 0x40100080 has the value 133 (0x84) again.


    Why is this happening?


    Regards.

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

  • Hi,
    Thank you for your inquiry.
    Such an issue is not known to us.

    Could you please send us a J-Link log file? How to enable:
    wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File
    Could you please provide us with your J-Flash project file?

    Best regards,
    Fabian
    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 Fabian,

    I have attached four files:
    1) Log j-flash (Complete process).txt --> It Includes all readings, writings and deletions
    2) Log j-link (SN checked).txt --> It only includes the Production Programming (F7) process when Serial Number checkbox y checked.
    3) Log j-link (SN unchecked).txt --> It only includes the Production Programming (F7) process when Serial Number checkbox y UNchecked.
    4) Serial number data flash.jflash --> j-Flash project file


    Log j-link (SN checked).log
    Serial number data flash.jflash
    Log j-link (SN unchecked).log
    Log j-flash (Complete process).log
  • Hello Fabian

    Hardwariano wrote:

    Then, I uncheck the "Program serial number" checkbox to prevent the serial number from being written this time. But, when I program and read back again, the address 0x40100080 has the value 133 (0x84) again.

    I solved the problem by simply deleting the "..._Serial.txt" file that was previously generated by JFLASH.
    It seems that, if present, JFLASH always reads the "..._Serial.txt", regardless of the "Program serial number" checkbox status.

    Is this the correct behavior of the program? I think that the "..._Serial.txt" file should be ignored if the checkbox status is false.


    Regards
  • Hi,
    Does this issue still persist with the newest beta release:
    segger.com/downloads/jlink/#J-…eAndDocumentationPackBeta

    Best regards,
    Fabian
    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 again

    SEGGER - Fabian wrote:

    Does this issue still persist with the newest beta release:
    The behavior is not exactly the same.
    ## If I mark the SN checkbox, JFLASH programs the SN well, but it sometimes says that it can't find the "...SNList.txt" (see attached image).

    ## If I don't mark the checkbox, there are 2 possible behaviors:
    1) If I never mark the checkbox --> The ".srec" file is not updated with the SN and it is not saved in flash memory, regardless of the "...Serial.txt" file exists or not.

    2) If I mark the checkbox --> do some SN programming --> deselect the checkbox --> do more programming --> The last serial number is burnt in memory from that moment on.
    I noticed that the related loaded ".srec" file memory area was updated whit the SN when when programming the first time. However that area is not cleared when programming the second time (see attached image).

    I hope I've explained it well.

    Regards

    EDIT: The same behavior with J-FLASH V6.70.

    I've also found another issue: I want to change the next SN from 100 to 150, so I go to the textbox in "options-->project settings-->production-->next SN". Now, I program my device and J-FLASH burns SN=101 instead of 150. I think this is happening because the "...Serial.txt" file has the value 101 previously stored. Does J-FLASH prioritize the file over the project settings?
    Images
    • SNLIST.png

      14.9 kB, 729×178, viewed 633 times
    • Area memory.png

      29.9 kB, 675×578, viewed 697 times

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

  • Hi,
    Sorry for the delay in response.
    We were not able to reproduce the error message you receive, also the error message seems to be from V6.65b, not V6.70.
    I suppose something was mixed up here?

    The behavior you describe is intended. The (*) above the file is indicating, that the data in the file was changed.
    We do not "clear" the SN area, because the user might not want to have this area "cleared" and we do not want to assume what the expected "cleared" value is supposed to be.
    If you want to program the data file without the SN, I suggest you open the original data file without saving the changes.

    Hardwariano wrote:

    I've also found another issue: I want to change the next SN from 100 to 150, so I go to the textbox in "options-->project settings-->production-->next SN". Now, I program my device and J-FLASH burns SN=101 instead of 150. I think this is happening because the "...Serial.txt" file has the value 101 previously stored. Does J-FLASH prioritize the file over the project settings?
    This is also expected behavior.
    Since you have a <projectName>_SNList.txt (SN list file) located inside your project folder, J-Flash assumes, that it is supposed to flash the serial number located at line 150 into the device.
    If there is no SN on line 150, J-Flash will flash the first entry of the SN list file to the specified area.
    I will bring this up in the next meeting and discuss if we want to add an error message in such case.

    If you want to flash the SN 150 to the data file, you will have to either write in somewhere into your SN List or rename/delete the SN List inside your J-Flash project folder.

    As a side note:
    I just realized, that the SN you registered with belongs to a Flasher that is still in valid support period.
    Therefore you are eligible to use our support ticket system, which also comes with a faster response time.

    Best regards,
    Fabian
    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 Fabian, no problem, thanks for your response and for your time.

    SEGGER - Fabian wrote:

    I suppose something was mixed up here?

    SEGGER - Fabian wrote:

    Since you have a <projectName>_SNList.txt (SN list file) located inside your project folder
    This issue persists in the last version V6.71b (see attached image). JFlash always says it can't find "_SNList.txt". That file is not inside my project folder because I don't want to use SNList. I would like to use "_Serial.txt" file, that is created automatically by JFlash because I want to burn consecutive Serial Numbers. Or is "_Serial.txt" no longer used by JFlash in recent versions?

    SEGGER - Fabian wrote:

    If you want to program the data file without the SN, I suggest you open the original data file without saving the changes.
    Ok, I'll do this way.

    Regards
    Images
    • SNList txt box.png

      62.19 kB, 1,449×491, viewed 673 times
  • Hi,
    We were able to recreate the issue and are looking into it.

    Best regards,
    Fabian
    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,
    We found the root cause of this problem and fixed it.
    The fix will be part of the next patched release, planned for later today (6.70g).

    It will be uploaded here:
    segger.com/downloads/jlink#J-L…twareAndDocumentationPack

    Could you please try this version and come back to us if everything works as expected?

    Best regards,
    Fabian
    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 Fabian,
    I tried the new version 6.70g and it works fine. I couldn't reproduce the previous issues.
    Now, JFlash creates and reads the "...Serial.txt" file well, and the "...SNList.txt" is not requested all the time.


    Note: the following trick is no longer necessary.

    Hardwariano wrote:

    I solved the problem by simply deleting the "..._Serial.txt" file that was previously generated by JFLASH.
    It seems that, if present, JFLASH always reads the "..._Serial.txt", regardless of the "Program serial number" checkbox status.

    Is this the correct behavior of the program? I think that the "..._Serial.txt" file should be ignored if the checkbox status is false.

    Thanks for your help.
    Regards
  • Hi,
    Good to hear that you are up and running again.

    We will consider this thread as closed now.

    Best regards,
    Fabian
    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.