Not able to program my SAM3X8E

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

tsaG
Posts: 3
Joined: Tue Mar 03, 2015 12:13 am

Not able to program my SAM3X8E

Tue Mar 03, 2015 1:44 am

Hello,

I'm not able to flash my SAM3X8E on my custom Board.

I'm trying to program this chip using a Segger J-Link edu. I already tried the J-Link Lite but this wont work as well.

Using the Atmel Studio 6.2 SP2 as programming program. I can read all the fuses and the device information, no problem. As soon as I try to write to the Chip it always fails, programming or even lock bits. Erasing is fine

Downloading my program to the chip, I get the following error in the Atmel Studio:
Verifying Flash...Failed! address=0x80000 expected=0x00 actual=0xff

You can find the little bit more detailed Output in JFlashlite. I also tried erasing (successfully) and programming the chip (error) using this program.

Code: Select all

Erasing ATSAM3X8E via SWD-Interface@2000kHz 
Erase Thread started.
Device "ATSAM3X8E" selected.
Found SWD-DP with ID 0x2BA01477
Found Cortex-M3 r2p0, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
TPIU fitted.
Debugger initialized successfully.
J-Link: Flash download: Total time needed: 0.693s (Prepare: 0.160s, Compare: 0.000s, Erase: 0.525s, Program: 0.000s, Verify: 0.000s, Restore: 0.007s)
Erase Thread exited 
Erase done

Downloading D:\Temp\Document.hex to ATSAM3X8E via SWD-Interface@2000kHz 
Programming Thread started.
Device "ATSAM3X8E" selected.
Found SWD-DP with ID 0x2BA01477
Found Cortex-M3 r2p0, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
TPIU fitted.
Debugger initialized successfully.
Programming failed @ address 0x00080000 (block verification error)
J-Link: Flash download: Total time needed: 2.039s (Prepare: 0.172s, Compare: 1.797s, Erase: 0.000s, Program: 0.053s, Verify: 0.000s, Restore: 0.016s)
Programming Thread exited 
Programming failed.


Trying to program this thing using the USB Port gives me this error message:

Code: Select all

Erase flash
Write 11628 bytes to flash

[                              ] 0% (0/46 pages)
[======                        ] 21% (10/46 pages)
[=============                 ] 43% (20/46 pages)
[===================           ] 65% (30/46 pages)
[==========================    ] 86% (40/46 pages)
[==============================] 100% (46/46 pages)
Verify 11628 bytes of flash

[                              ] 0% (0/46 pages)
[======                        ] 21% (10/46 pages)
[=============                 ] 43% (20/46 pages)
[===================           ] 65% (30/46 pages)
[==========================    ] 86% (40/46 pages)
[==============================] 100% (46/46 pages)
Verify failed
Page errors: 46
Byte errors: 11202
It looks like the chip is broken, doesnt it?
However, can you have a quick look at my schematics and tell me if I did something wrong?
Here is the Link -> Link to schematic

Thanks

Patrick
Thanks!
tsaG
Posts: 3
Joined: Tue Mar 03, 2015 12:13 am

Re: Not able to program my SAM3X8E

Tue Mar 03, 2015 5:41 pm

Thanks for the fast reply, Ill test it using the debug method. 

Ill try to write a program a sketch with some outputs (LEDS or communications) to see if it programmed properly. Although I can't program it using Flash or using the USB method...
tsaG
Posts: 3
Joined: Tue Mar 03, 2015 12:13 am

Re: Not able to program my SAM3X8E

Wed Mar 04, 2015 2:38 pm

Okay, a little update.

I build a second PCB which doesn't work as well....



This time I used a Atmel ICE Programmer. Its programming the chip, but can't verify it.

 I always get the error

Code: Select all

Baddress=0x80000 expected=0xf9 actual=0xff
 Is there something wrong with my circuit? The Crystal is up and running at 12mhz (checked it with the oscilloscope).

I added some screenshots.
I used the Segger J-Mem to verify my memory and it looks weird. I can erase all the memory and everything is FFFFF and I also can program something and there is something in the chip. (see Screenshots).

I programmed a Pin toggle program, but this doesn't work as well, all Pins are at 3.3V (is this correct?) 

You can find the circuit and the Screenshots here:
https://www.dropbox.com/sh/rdsbbons7rwp ... Q8tUa?dl=0

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest