I have two daisy-chained ATSAMG55J19 chips that I believe have been properly configured on the board. I'm using J-Link Plus programmer to program the two chips in both JFlash.exe and JLink Commander.exe and I'm getting different results in the two environments:
1. In JFlash.exe, I can detect both devices, and I can get both programmed as long as I don't do 'start application' after I get Dev0 in the chain (Device that's closer to TDO on JTAG, Position=0, IR length=0) programmed. However even though it appears that both chips have been 'erased, programmed and verified successfully', none seems to have the application actually running no matter how many times I try to reset/power cycle the board.
But if I 'start application' right after I get Dev0 programmed before doing Dev1, Dev0 will prevent JTAG from running properly and lock the chain, throwing out error "could not perform target reset, failed to connect could not perform custom init sequence" In such cases I will have to do a hardware erase on Dev0 in order to regain JTAG communication back.
Also sometimes when I try to do a SW erase I get error code such as:
- Start of erasing chip
- End of erasing chip
- Start of restoring
- ERROR: Failed to erase chip @ address 0x00400000 (Algo47: Sector is locked)
- ERROR: Failed to restore target. RAMCode never stops
- End of restoring
- ERROR: Failed to erase chip
Disconnecting ...
I then switched to JLink Commander.exe to do the SW erase and it proceeded without any issue.
2. In JLink Commander.exe, I can get both programmed, and after cycling the power on the unit, both chips will have the application started up and running correctly. Also as mentioned above, sometimes when I run into issues using JFlash.exe, JLink Commander.exe seems to be the way to go and can almost always do the trick. However I remember in production environment, JFlash.exe is recommended over JLink Commander.exe, and also when automating in LabVIEW, I have an easier control manipulating and parsing the response from JFlash.exe than JLink Commander.exe.
I would like to get JFlash.exe working reliably or at least get to the bottom of the few questions:
* What different in JFlash.exe than JLink Commander.exe? Why sometimes would JFlash.exe throw me errors such as "RAMCode never stops" while JLink Commander.exe would work? Is it the init or exit step settings are different in the two programs? I'm right now using default settings (Init Steps: Reset method #0, Exit Steps: None) in JFlash.exe, and I've tried different settings (Reset method #2 etc.) but it didn't change the result.
Thanks ahead for your inputs. Any advice would be appreciated.
1. In JFlash.exe, I can detect both devices, and I can get both programmed as long as I don't do 'start application' after I get Dev0 in the chain (Device that's closer to TDO on JTAG, Position=0, IR length=0) programmed. However even though it appears that both chips have been 'erased, programmed and verified successfully', none seems to have the application actually running no matter how many times I try to reset/power cycle the board.
But if I 'start application' right after I get Dev0 programmed before doing Dev1, Dev0 will prevent JTAG from running properly and lock the chain, throwing out error "could not perform target reset, failed to connect could not perform custom init sequence" In such cases I will have to do a hardware erase on Dev0 in order to regain JTAG communication back.
Also sometimes when I try to do a SW erase I get error code such as:
- Start of erasing chip
- End of erasing chip
- Start of restoring
- ERROR: Failed to erase chip @ address 0x00400000 (Algo47: Sector is locked)
- ERROR: Failed to restore target. RAMCode never stops
- End of restoring
- ERROR: Failed to erase chip
Disconnecting ...
I then switched to JLink Commander.exe to do the SW erase and it proceeded without any issue.
2. In JLink Commander.exe, I can get both programmed, and after cycling the power on the unit, both chips will have the application started up and running correctly. Also as mentioned above, sometimes when I run into issues using JFlash.exe, JLink Commander.exe seems to be the way to go and can almost always do the trick. However I remember in production environment, JFlash.exe is recommended over JLink Commander.exe, and also when automating in LabVIEW, I have an easier control manipulating and parsing the response from JFlash.exe than JLink Commander.exe.
I would like to get JFlash.exe working reliably or at least get to the bottom of the few questions:
* What different in JFlash.exe than JLink Commander.exe? Why sometimes would JFlash.exe throw me errors such as "RAMCode never stops" while JLink Commander.exe would work? Is it the init or exit step settings are different in the two programs? I'm right now using default settings (Init Steps: Reset method #0, Exit Steps: None) in JFlash.exe, and I've tried different settings (Reset method #2 etc.) but it didn't change the result.
Thanks ahead for your inputs. Any advice would be appreciated.