[Solved] Help with ATSAM3X8E (Due barebones)

Graynomad:
Sorry, I meant to look at those files but forgot.

The schematic is too hard to check properly without spending ages matching pin numbers so I'll give that a miss.

Your general board layout looks good, tracks are at strange angles though but that's mostly an aesthetic thing.

I'm not that experienced with laying out high-speed traces but the USB lines are supposed to be of equal length and IIRC impedance matched to 50R. I may be wrong and I have in fact had boards work without much care taken with the D+ and D- signals using an FTDI chip. But I think that chip is just low speed USB, the SAM does high-speed as well doesn't it?

Your lengths look reasonable, but you have sharp corners and vias, all of which are bad for high speed signals.

If you look at the Due traces they are matched,all on the top layer and no vias. Like I said though I don't now how important it is.

So I'll be interested to see if the USB works, especially through all the connectors.

Also I can't find R7 and R8 on the PCB. Can you post the Eagle design file?


Rob

Your feedback is great! Didn't think about the "equal length" thingy for the USB part. I myself don't have nor use high speed USB yet. I know that it's supported by the SAM, but I believe that it will work if nothing is wrong with the full USB lines. My home brewed leonardo dosen't have equal USB length signals and it works pretty good (it's not high speed, and nothing is wrong with the USB lines). I only have three vias. Two for the high speed USB part and one for a ground connection. R7 and R8 are near the breakout-board connectors.

I made this pretty quick and it's not a final design. Just a way to move this from a breadboard to a PCB for testing. So the routing is pretty "sh*tty" i know, but look at it from the bright side, there is only a few 90 degree angled connections =P!

Here's the schematic and board file:

Schematic: https://dl.dropbox.com/u/74389175/BaselM3Proto/BaselsM3ProtoV1.0.sch
Board: https://dl.dropbox.com/u/74389175/BaselM3Proto/BaselsM3ProtoV1.0.brd

Edit: Yes, your pretty much right about the high speed USB. I found a document from Atmel stating pretty much what you told me. Here is a link to the pdf, http://www.atmel.com/Images/doc32122.pdf. Well all I have now is hope that it works.

So, does it work? :slight_smile:

I am wondering if your chip has not gone through the erase sequence, which is required to get into the bootloader. The ERASE pin needs to be high during reset and held high for 220ms.

I found with SAM7S my chip could get into a "bricked" state, and doing the erase procedure would recover it, sometimes took more than one go to do it.

To all of you, yes it works now :D:D:D:D.. It was probably noise from the breadboard. After two hours of trying to fit the break out (made wrong measurements) board to my newly soldered board it's finally working.

Here is some pictures as proof =P:

Board soldered (Front): https://dl.dropbox.com/u/74389175/BaselM3Proto/IMAG0457.jpg
Board soldered (Back): https://dl.dropbox.com/u/74389175/BaselM3Proto/IMAG0458.jpg

Breakout board attached to the board (Front): https://dl.dropbox.com/u/74389175/BaselM3Proto/IMAG0461.jpg

When you attach the USB the first time, you need the drivers delivered with SAM-BA. After installing the drivers you should get the following: https://dl.dropbox.com/u/74389175/BaselM3Proto/sam_ba_com.png

Then open Arduino IDE and upload the blink sketch. The board will restart as Arduino Due (you'll need to install the arduino due drivers that comes with the arduino IDE). After install you should get the following: https://dl.dropbox.com/u/74389175/BaselM3Proto/arduino_blink.png.

If you've got any questions hit me! =P

And by the way I've changed a small thing in the schematic so here is the updated version:

Schematic: https://dl.dropbox.com/u/74389175/BaselM3Proto/BaselsM3ProtoV1.0.sch
Board: https://dl.dropbox.com/u/74389175/BaselM3Proto/BaselsM3ProtoV1.0.brd

1 Like

Good job sticking with the project until you got it working!

cyclegadget:
Good job sticking with the project until you got it working!

Thanks =D.. Well I've learned a lot from this. Mainly that the SAM chip needs a lot of passive components in order to work.. It's not as simple as the 328p where you only need a crystal, power, a couple of caps/resistors and your up and running...

Still it would be interesting to strip components (one by one) from the board until it stops working, and by this coming down to a "true" bare minimum =P.

Yes well done and thanks for persevering with this.

It will be interesting to see what the absolute bare minimum is so let us know if you do that.


Rob

Graynomad:
Yes well done and thanks for persevering with this.

It will be interesting to see what the absolute bare minimum is so let us know if you do that.


Rob

Thanks =).. Ya it would be interesting, but after looking at the schematic I've come to realize that it won't be possible.. As you see a few components are also used as "vias" to the other side of the board. So by disconnecting one component, it will lead to other components not functioning properly.. There is a solution to this "of course", but it's very time consuming.. So I'm going to skip this step..

Again, thank you for your tips..!

So, thats how my "minimum" looks like. Well, thats all I need. I wont be frugal with the capacitors and hope this works :smiley:
Sorry for the wrong symbol of the switch (Schalter), but Multisim/Ultiboard doesnt allow different footprints for buttons :-/

tsaG:
So, thats how my "minimum" looks like. Well, thats all I need. I wont be frugal with the capacitors and hope this works :smiley:
Sorry for the wrong symbol of the switch (Schalter), but Multisim/Ultiboard doesnt allow different footprints for buttons :-/

Looks good. Ya not as many caps as mine =P.. Just a note, I left the TST pin hanging, I don't know what happens if you connect it to ground (refer to the datasheet just to be sure). Other note, I didn't use any inductors (your schematic L1). It is optimal to include it but not a minimum.. Everything else looks good..

But just to be sure always double check just in case you forgot something =P..

Good luck! Please report back your results on this!

Looks good. A lot more capacitors than I anticipated, and I wasn't sure if both crystals were necessary myself.

So what's the programming process w/ the USB attached directly to the MCU? Erase program w/ the button, then hit reset and upload via arduino user interface or what? Can you just upload a hex file with another program instead?

zachtos:
Looks good. A lot more capacitors than I anticipated, and I wasn't sure if both crystals were necessary myself.

So what's the programming process w/ the USB attached directly to the MCU? Erase program w/ the button, then hit reset and upload via arduino user interface or what? Can you just upload a hex file with another program instead?

The caps are important specially for the USB communication. Getting fluctuations from the power supply/circuitry can lead to the USB connecting and disconnecting randomly.

Well, you program it through the USB native port. The first time you plug in the board it will present itself as AT91 USB to Serial Converter (use the drivers that comes with the SAM-BA program). To program it just go through the normal process through the arduino IDE(Select Arduino Due Native Port in the boards menu). After programming the USB will remount as the Arduino Due in which case you'll have to point the driver wizard to the arduino drivers located somewhere in the arduino ide folder.

After that it's simple really. Just program it with the option Arduino Due Native port (The bootloader will do a soft erase each time it flashes the chip).

NOTE: Regarding the hardware erase switch. If you press it, the chip will be whipped and you'll have to do the process all over again (choosing the SAM-BA drivers etc etc).

NOTE-2: Yes, you can program the chip with Atmels SAM-BA program. I use Atmel Studio sometimes with this chip. What I did is add a external script that programs the chip after compilation.

Hmm, I'm looking to build a barebones board like yours, but from goldphoenix PCB using EAGLEcad and will want to find a way to upload hex files via the native USB port. So it sounds like I can do that but not sure about the user interface yet.

I need a very simple way for a third party to update via a hex file though, possible w/ the DUE?

zachtos:
Hmm, I'm looking to build a barebones board like yours, but from goldphoenix PCB using EAGLEcad and will want to find a way to upload hex files via the native USB port. So it sounds like I can do that but not sure about the user interface yet.

I need a very simple way for a third party to update via a hex file though, possible w/ the DUE?

Hmmm, wasn't I clear in the previous post? To begin with it's a "bin" file that you upload in this case (not hex).. You can use arduinos "uploader tool" bossac manually, see post #3 in this topic: http://arduino.cc/forum/index.php/topic,153630.0.html.

Another option AGAIN! is to use the SAM-BA program (I said it like a 1000 times already). To download and use SAM-BA go to the following site: http://www.atmel.com/tools/ATMELSAM-BAIN-SYSTEMPROGRAMMER.aspx

thanks, I'll install those tools to see how user friendly they are to non engineers that may be using my devices.

Hi baselsw!

I have a question: can you please point to the .bin file that needs to be uploaded to the SAM chip?

Also, I think in your post above you posted an incorrect link by mistake, referring to using Arduino's bossac tool.

I am also making my own Due and am a little stuck on this step. Thank you!

michaeluna:
Hi baselsw!

I have a question: can you please point to the .bin file that needs to be uploaded to the SAM chip?

Also, I think in your post above you posted an incorrect link by mistake, referring to using Arduino's bossac tool.

I am also making my own Due and am a little stuck on this step. Thank you!

There is no bin file that needs to be uploaded.. The Sam-chip will come preloaded with a bootloader.. So it will work out of the box! The link isn't a mistake.. Let me try to explain it in simpler terms:

  • In case of uploading (a sketch) to an ordinary AVR (for example the atmega328/UNO) then you'll upload a HEX file with avrdude..
  • In case of uploading (a sketch) to a SAM-chip (for example the SAM3X8E/DUE) then you'll upload a BIN file with either BOSSAC or SAM-BA...
  • For a newbie I recommend sticking with BOSSAC for uploading because it's simpler.. SAM-BA has a GUI but there is a lot of boxes and settings (a newbie will simply get confused and run back to the arduino forum for help =P)..

If my explanation isn't clear enough then let me know exactly what you're stuck on and I'll do my best to help you!

//Basel

1 Like

As per baselsw recommendation i'll post this here.

Hi baselsw,
I was looking at your schematic for the barebones DUE clone, I wanted to confirm something from you,
SV1 headder's pin 1 is pin 1 on atsam3x8e and pin 1on SV2 is pin 37 on the atsam3x8e and so on so forth?

Also i see that in your schematic for VDDCORE and VDDPLL pins on the atsam3x8e you are powering them with 1.8V but i don't see where you are creating the 1.8V. I don't see any resistive divider or any regulated source with that output. Can you tell me how you are creating that source.

Thanks

Taha

Hey Taha,

Yes, pin 1 on SV1 is pin 1 on atsam3x8e, the same goes for SV2, so you're correct there.

The 1.8V is supplied from the internal voltage regulator (pin 56 [VDDOUT]).. You can see how it's connected on page 22 in the atsam3x8e datasheet, here is the link: http://www.atmel.com/Images/doc11057.pdf

If you have any more questions feel free to ask. But please use the thread instead, so others can learn also =)..

Best regards
//Basel

baselsw i had another question whats the power consumption like with the barebone circuit?

that's a darn good question.. Normally I don't think about power consumption if it's not something that is going to be a 'final product'... I really have no idea.. The circuit is not "current measurement friendly"... If I get some spare time this week, I'll make a workaround and measure the power consumption.. No promises though..

//Basel