[Solved] Help with ATSAM3X8E (Due barebones)

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

lynxz3:
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

I thought i'd add this here for everyone else SV2 in baselsw's schematic the pin numbers is are incorrectly labled SV2 e.g. Pin1 goes to ATSAM3X8E - Pin38 (DHSDM) not Pin37. So if anyone uses it as a reference they should be weary of this.

Just looking at the pins can be confusing.. It's good that you double checked that.. Still the electrical connections in the schematic are correct.. Let's make it easier for everyone.. I found a excel file with the pinout for my board..

SAM3X8E pinout.xlsx (15.6 KB)

So, you got this working and you're currently programming the chip over USB?

You mentioned using Atmel Studio, is that with a USB cable, or using a SAM-ICE?

jtw11:
So, you got this working and you're currently programming the chip over USB?

You mentioned using Atmel Studio, is that with a USB cable, or using a SAM-ICE?

Yes... USB only.. I don't have SAM-ICE or any other JTAG module.. Fortunately the chip comes preloaded with a bootloader... I've programmed the chip with Atmel Studio over USB.. It's simple.. Just create a external tool (http://www.atmel.no/webdoc/atmelstudio/atmelstudio.section.csl_qbq_kc.html) in Atmel Studio.. The tool will consist of a call to bossac (just like the Arduino IDE).. If you need further details let me know..

//Basel

I'll look into that in the morning, thanks.

When you say you've been programming it from Atmel Studio, what have you been doing code wise? Coding using pure C and not the Arduino libraries etc?

jtw11:
I'll look into that in the morning, thanks.

When you say you've been programming it from Atmel Studio, what have you been doing code wise? Coding using pure C and not the Arduino libraries etc?

Well, I wouldn't call it pure C.. But sure.. C/C++.. No arduino libraries.. In the case of the SAM chip, I'm only using ASF (Atmel Software Framework) in Atmel Studio..

P.S: Arduino IDE uses ASF .. D.S

You're welcome bro =)..
//Basel