[SOLVED] Start application for empty SAMG55 devices in production environment

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

  • [SOLVED] Start application for empty SAMG55 devices in production environment

    Hi,

    I'm trying to flash 2 daisy chained SAMG55 chips using J-Flash.

    For an empty chip, I will have to manually start application in J-Flash after programming the chip. I need to program the chips in production environment and I'm using a batch file to automate the process. I have tried the following:
    1. In J-Flash project settings, check 'start application' (tried both SFR and reset pin)
    2. Add -startapp command in the batch file so my script looks like this:
    start /min "J-Flash" "C:\Program Files (x86)\SEGGER\JLink_V620c\jFlash.exe" -openprjProjectFile.jflash -openData.hex -auto -startapp -exit

    But none seems to work reliably. The only way to ensure an empty chip gets fired and booted up is to do it manually through JFlash.exe

    Another error I recently encountered is that the '-exit' command causes JFlash.exe to stop working.. I have tried to re-install but the issue persists.

    Please advise.


    Thanks,

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

  • Hello,

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

    1. In J-Flash project settings, check 'start application' (tried both SFR and reset pin)

    Is the reset pin connected to the debug interface and target device?

    The only way to ensure an empty chip gets fired and booted up is to do it manually through JFlash.exe

    What are the exact steps you do when it is "working"?

    Could you try to install the latest J-Link software version and see if the issue persists?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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 contact us per e-mail.
    The following contact form can be used for this: segger.com/about-us/contact-us/

  • Hi Nino,


    Yes, the reset pin is connected correctly. Even a power-cycle wouldn't bring the unit up.

    What I do to make it work is that:
    step 1. Program the unit -- either through the command line or the JFlash GUI interface. The command I use is:
    start /min "J-Flash" "C:\Program Files (x86)\SEGGER\JLink_V620c\jFlash.exe" -openprjProjectFile.jflash -openData.hex -auto -startapp -exit


    step 2. Start application in JFlash -- Go to JFlash GUI interface -> manual programming -> start application (F9). This will ensure to fire up the chip properly.


    I have upgraded to latest version 6.22a still with no luck.


    I added a delay of 500ms in the exit steps but I don't have any brand new boards to try on right now.
  • This morning I tried the following on one board:

    Added a delay of 500ms in the exit steps, ran it using the command:
    start /min "J-Flash" "C:\Program Files (x86)\SEGGER\JLink_V622a\jFlash.exe" -openprjProjectFile.jflash -openData.hex -auto -startapp -exit



    It did not start the chip up.


    I then increased the delay to 1000ms, and also checked start application via reset pin, and ran the command again. This time the chip was fired up correctly. Since I did two changes at the same time, I'm not sure which one is the fix or am I just getting it out of pure luck. I don't have enough brand new boards for me to test out now, but should have some in tomorrow and will be able to try it on a couple more empty chips.

    Also the last issue I described (JFlash freezes on command -exit) still persists after I updated to 622a. But it only appears if I try to bring up the JFlash GUI window while I specify in the command to do it minimized.

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

  • I still could not get an empty chip to start up reliably. Sometimes one method works, sometimes it doesn't. Sometimes it works on this one, and doesn't work on the other one.

    The only reliable way is to go to J-flash, do manual production-erase chip, manual production-programverify, manual production-start app.

    I've also tried to break the command statement into 3 pieces, first one -erasechip, 2nd -programverify, 3rd -startapp. And it *sometimes* would work on *some* chips.

    I don't know what to try next...
  • Hi,

    You wrote:
    Even a power-cycle wouldn't bring the unit up.

    Are you talking about the programed target device?
    If so then this whole issue seems to be related to the application you are trying to program into the target.
    When doing a power on reset the application should always start running...
    If it does not the programmed application is broken in some way.

    Try to debug the application and find out why it is not starting in the first place.
    If the application does not run on its own the J-Link can't do much here.

    I then increased the delay to 1000ms, and also checked start application via reset pin, and ran the command again.

    My guess would be that the increased delay helps here.
    Does the Reset line have some capacitor or similar attached so the Reset pin can't toggle immediately?
    Make sure that there are no additional parts attached on the reset signal that might alter the timing behaviour of the reset signal.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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 contact us per e-mail.
    The following contact form can be used for this: segger.com/about-us/contact-us/