Hello,
I am trying to connect to my SAMC21E18 with the SAM-ICE debugger (SWD) but I'm having difficulties: target voltage is read correctly but Atmel Studio 7 is then incapable of programming as it fails with "Error: InitTarget(): PCode returned with error code -1"
This is Jlink commander output:
Display All
What do you think is wrong? I think connections are fine, the MCU gets 3.3V and the SWD cable should be ok.
Thanks
I am trying to connect to my SAMC21E18 with the SAM-ICE debugger (SWD) but I'm having difficulties: target voltage is read correctly but Atmel Studio 7 is then incapable of programming as it fails with "Error: InitTarget(): PCode returned with error code -1"
This is Jlink commander output:
Source Code
- SEGGER J-Link Commander V6.20i (Compiled Nov 17 2017 17:47:07)
- DLL version V6.20i, compiled Nov 17 2017 17:46:22
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link ARM V8 compiled Aug 26 2015 15:08:21
- Hardware version: V8.00
- S/N: 28023442
- License(s): RDI, GDB
- OEM: SAM-ICE
- VTref = 3.287V
- Type "connect" to establish a target connection, '?' for help
- J-Link>connect
- Please specify device / core. <Default>: ATSAMC21E18
- Type '?' for selection dialog
- Device>
- Please specify target interface:
- J) JTAG (Default)
- S) SWD
- TIF>s
- Specify target interface speed [kHz]. <Default>: 4000 kHz
- Speed>
- Device "ATSAMC21E18" selected.
- Connecting to target via SWD
- InitTarget()
- Secured Atmel SAMD device detected.
- For debugger connection the device needs to be unsecured.
- Note: Unsecuring will trigger a mass erase of the internal flash.
- Executing default behavior previously saved in the registry.
- Device will be unsecured now.
- InitTarget()
- Secured Atmel SAMD device detected.
- For debugger connection the device needs to be unsecured.
- Note: Unsecuring will trigger a mass erase of the internal flash.
- Executing default behavior previously saved in the registry.
- Device will be unsecured now.
- ****** Error: InitTarget(): PCode returned with error code -1
What do you think is wrong? I think connections are fine, the MCU gets 3.3V and the SWD cable should be ok.
Thanks