Pages: [1]   Go Down
Author Topic: Question: How does the Arduino IDE erase and reset the SAM on DUE automatically?  (Read 860 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi @ all!

I'm working on an integration of the Arduino DUE to the Atmel Studio 6.
It's for an university lab and programming for the other students have to be as easy as possible. We don't want to use the Arduino IDE, sorry ;-)

Out of the Box the Atmel Studio support the SAM Chips with the Atmel ASF, but there is no way to program the DUE.

So I integrated the BOSSA.exe as "external tool" in the Atmel Studio. Now programming is one click and works on both USB ports (programming and native), with one exception. The SAM have to be erased and reseted with the two buttons on board before the next programming can be made.
For one single programming action this is ok, but i would be much better when it works completely automatic, like in the Arduino IDE.

Can you please tell me, how the Arduino IDE resets and maybe erases the SAM before reprogramming?
So I can add this procedure to the Atmel Studio, too.

I googled for hours but nothing found :-(


Greetings from Germany!
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8600
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The 16u2 processor effectively presses the Erase button for you by activating a FET across the button.

I've never used a Due but if you are using the programming port that should still work I would think, but not on the native port.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That the 16u2 do this is clear... But how the Arduino IDE triggers the 16u2 to do this? There is a way on the native port too, because on the arduino IDE it is possible to reprogram without erasing manual over the native port.

I read that i have to open close the port with 1200 baud, but it is not exactly discribed how often and wether i schould sending somewhat or not.

Any information?
Bimbo385
« Last Edit: March 27, 2014, 04:12:59 am by bimbo385 » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8600
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But how the Arduino IDE triggers the 16u2 to do this?
I'm not sure, there must be some code in the 16u2 that handles commands from the IDE or maybe AVRDUDE.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: