I'm running my J-Link base from J-Link Commander V6.62d. When I try to erase my SAME54P20 via SWD, I get an error message "Error while determining flash info". I suspect this is a benign error, since the flash appears to be erased after this command. Is this a known problem, or a user error? Full printout below:
SEGGER J-Link Commander V6.62d (Compiled Mar 2 2020 09:23:14)
DLL version V6.62d, compiled Mar 2 2020 09:22:41
Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Jan 7 2020 16:51:47
Hardware version: V10.10
S/N: 50123455
License(s): GDB
VTref=3.305V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: ATSAME54P20
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "ATSAME54P20" selected.
Connecting to target via SWD
InitTarget() start
InitTarget()
InitTarget() end
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map seems to be reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: AHB-AP (IDR: 0x74770001)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0x41003000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ 41003000
ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C4 ROM Table
ROMTbl[1] @ E00FF000
ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[1][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[1][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[1][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
ROMTbl[1][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
Cortex-M4 identified.
J-Link>erase
Erasing device...
J-Link: Flash download: Total time needed: 4.958s (Prepare: 0.080s, Compare: 0.000s, Erase: 4.873s, Program: 0.000s, Verify: 0.000s, Restore: 0.004s)
J-Link: Flash download: Total time needed: 0.040s (Prepare: 0.019s, Compare: 0.000s, Erase: 0.017s, Program: 0.000s, Verify: 0.000s, Restore: 0.004s)
****** Error: Failed to prepare for programming.
Error while determining flash info (Bank @ 0x04000000)
ERROR: Erase returned with error code -1.
J-Link>
SEGGER J-Link Commander V6.62d (Compiled Mar 2 2020 09:23:14)
DLL version V6.62d, compiled Mar 2 2020 09:22:41
Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Jan 7 2020 16:51:47
Hardware version: V10.10
S/N: 50123455
License(s): GDB
VTref=3.305V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: ATSAME54P20
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "ATSAME54P20" selected.
Connecting to target via SWD
InitTarget() start
InitTarget()
InitTarget() end
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map seems to be reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: AHB-AP (IDR: 0x74770001)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0x41003000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ 41003000
ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C4 ROM Table
ROMTbl[1] @ E00FF000
ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[1][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[1][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[1][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
ROMTbl[1][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
Cortex-M4 identified.
J-Link>erase
Erasing device...
J-Link: Flash download: Total time needed: 4.958s (Prepare: 0.080s, Compare: 0.000s, Erase: 4.873s, Program: 0.000s, Verify: 0.000s, Restore: 0.004s)
J-Link: Flash download: Total time needed: 0.040s (Prepare: 0.019s, Compare: 0.000s, Erase: 0.017s, Program: 0.000s, Verify: 0.000s, Restore: 0.004s)
****** Error: Failed to prepare for programming.
Error while determining flash info (Bank @ 0x04000000)
ERROR: Erase returned with error code -1.
J-Link>