[ABANDONED] Error "Programming canceled by user" in J-Flash

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

  • [ABANDONED] Error "Programming canceled by user" in J-Flash

    Hi all,

    I am debugging production programming station, which includes 4 J-Link plus programmers. Each one of them programs different chip on a PCBA. There are 4 identical stations and I have the same issue on all of them.
    Every 20 or 30 tries of programming the same PCBA, I get an error "Programming canceled by user" when programming STM32F469NG MCU over JTAG. The error occurs right after restoring, where "Secure chip" should take place (please find attached log file and JFlash project file).
    BAT file contents:
    start /min "JFlash.exe" "C:\Program Files (x86)\Segger\JLink_V682d\JFlash.exe" -USB%1 -openprj%2 -open%3 -jflashlog%4 -connect -auto -disconnect -exit
    The bat file is called by a LabView application. Bat file starts the JFlash project and does following actions: unsecures chip, erases internal flash, programs hex file to internal flash, secures chip and disconnects.
    The error always occurs at the same place.
    I tried with V6.80b and V6.82d J-Flash versions.
    I tried putting -securechip command to the BAT file instead of JFlash project
    I tried without securing and unsecuring chip.
    I tried starting application enabled and disabled.
    None of these things fixed the issue

    By running only BAT file 100 times, I didn't get this error. It seems that it only occurs when I am running it from LabView.

    I can assure that "Cancel" button is not pressed during programming ^^

    What can cause this error?
    Files
  • Hi,
    Thank you for your inquiry.

    This error occurs when the Progress dialog is in any way rejected while programming.
    Rejected means closed by pressing Cancel, "x" or terminating it by any other means but letting it close by itself, after programming is finished.

    It seems like in your setup the progress Dialog is somehow terminated after the device was programmed.

    As this only occurs in combination with LabView, the problem most likely lies on the LabView side.
    Does it work if your batch file waits for the execution to finish (start /wait /min ....)?
    If it does not, I would suggest contacting national instruments about this.

    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,

    Thank you for the feedback.
    I added the /wait parameter in batch file, but still issue persists. Now there is "Wait until completion?" parameter in LabView set to True when calling batch file and also batch file waits itself.
    I think, that if LabView wouldn't be waiting for execution to end, I would get programming failures even when the logfile contained the sentence "Target erased, programmed and verified successfully".

    Addition to my issue:
    • The programming is being done in series for following chips:
    1. Main - STM32F469NG
    2. Slave - STM32F103VG
    3. BT - CC2640R2F
    4. QSPI flash

    • All chips contain some kind of FW before programming them. Basically now I am re-writing the same FW over and over again.
    I tried running only Main programming in loop using the same Labview code. After looping several hundred times, the error didn't come up.
    But when I was looping Main + Slave programming, the error showed up after a few or a few tens of loop iterations. Most of the time the error shows up for Main programming but I saw it with Slave a few times as well.
    For me it looks like interaction between these two programming seps causes the error.

    Any ideas would be very appreciated.
    Thank you.

    Best regards,
    Marius
  • Hello,

    Thanks for your reply.

    I am not sure if I understood your procedure correctly, but it sounded like you are checking the J-Flash log file to check if the programming has succeeded or not.
    We recommend to check the return value of J-Flash for that.
    More information as well as a sample batch script can be found on the SEGGER Wiki:
    wiki.segger.com/UM08003_JFlash#Command_line_options
    wiki.segger.com/UM08003_JFlash#Batch_processing

    Could you maybe provide some more information on your setup?
    Could you try and execute the "Slave" programming step only, without doing the "Main" programming step, in order to isolate the issue further?
    Does the issue with your "Main + Slave" steps occur when executing J-Flash from a batch file, without using LabView, too?

    Please note that this is the only issue of its kind that has been reported so far, which is why we assume this issue to be setup related.
    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.