Can't program my ATSAM with Pickit4
Hello all !
I'm trying to program my ATSAMC20G16A with my pickit4 but it won't allow me. It is always giving me this error :
Connecting to MPLAB PICkit 4...
Currently loaded versions:
Script build number............4889ea0c51
Tool pack version .............1.3.875
Target voltage detected
Target device ATSAMC20G16A found.
Device Revision Id = 0x4
Calculating memory ranges for operation...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
Due to the large memory ranges on this device, only the areas of memory that have been loaded with code (via the build process or loading a hex file) will be read by default. If you wish to read custom ranges, please go to the Memories to Program property page and specify the ranges you want to read.
Verify failed. [ Pgm ] at 0x0, expected 0x20001ff0, got 0xffffffff
You have set the program speed to Normal. The circuit on your board may require you to slow the speed down. Please change the setting in the tool properties to low and try the operation again.
Programming did not complete.
I have little experience with PIC32 and MPLAB from work but I never started a project from scratch. In order to only test programming, I created a blank project in Harmony.
When I searched forums for a solution, I found these potential fix :
- Tools package not updated - I updated them all, nothing changed
- XC32 ver. 2.3
- SAMC20_DFP (3.3.56)
- CMSIS (5.4.0)
- AtmellCE_TP 1.2.161
- EDBG_TP 1.2.161
- ICD4_TP 1.3.872
- Pickit4_TP 1.3.875
- PowerDebugger_TP 1.2.165
- Wrong wiring -I can detect the device so I don't think it could be the issue here but here's my wiring anyway
PIN2 : VCC
I found 2 possible setup from online documentation and datasheet for SWD debug interface with pickit 4 (reset pin on 1 and 6)
I tried both and it didn't work.
I'm out of options right now, any help would be appreciated
Thank you !