Wednesday, December 13th 2017, 8:13am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

shurui

Beginner

Date of registration: Jul 13th 2017

Posts: 8

1

Sunday, December 3rd 2017, 6:59am

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,

This post has been edited 1 times, last edit by "shurui" (Dec 3rd 2017, 7:51am)


SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 448

2

Monday, December 4th 2017, 9:07am

Hello,

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

Quoted

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?

Quoted

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

shurui

Beginner

Date of registration: Jul 13th 2017

Posts: 8

3

Monday, December 4th 2017, 3:54pm

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.

shurui

Beginner

Date of registration: Jul 13th 2017

Posts: 8

4

Monday, December 4th 2017, 5:36pm

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.

This post has been edited 1 times, last edit by "shurui" (Dec 4th 2017, 5:38pm)


shurui

Beginner

Date of registration: Jul 13th 2017

Posts: 8

5

Wednesday, December 6th 2017, 5:22pm

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...

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 448

6

Thursday, December 7th 2017, 11:45am

Hi,

You wrote:

Quoted

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.

Quoted

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