Getting started with Arduino Due on Atmel Studio

Hello all,
This might not be the right place to ask what um gonna ask.So,sorry if this post is irrelevant.
I have recently bought an Arduino Due.I tested it with arduino and things work just fine.But I want to use this board not merely as an Arduino board,but as a nice development board which could be my starting point for learning Atmel ARM series micros.I have managed to setup the Due board with Atmel Studio 6 and I can without any problem upload the ASF examples to it.Now,the thing is,I wanna learn coding bare metal.Where should I start? If you ask about my previous experience,then I have worked with 8 bit AVRs for quite some time both in Arduino and other environments.Thats all.

You could look at how the Arduino runtime uses the bare registers and routines
from libsam. Its open-source after all. There is a lot to take in in the datasheet,
but the register interfaces are very logically arranged and once understood are
straightforward to program - there's just a lot of stuff though, so steep learning
curve. libsam encapsulates lots of this tedious stuff so its handy to use or just
refer to.

Hi,

I agree with the previous post. The datasheet is actually very good and you need a good understanding of the functions in the SAM3X8E. I would say try to "overview-read-it" somehow to get a good idea how it is structured and what the chip contains.

The ASF examples are also pretty "ok" and give you a good intro into the SAM3X. I don't really think that ASF has a good documentation, so examples are vital. The examples though are a a mix of using old-api and new -api:s which also is somehow makes it a bit harder. But the source is there so you could look yourself into it. Also learn the ASF-lib file structure to understand how it is arranged so you know where to look for things.

You would also need the Arduino Due/SAM3X mapping.

If you look at the source code for the arduino libs and the asf libs there might be some confusions on naming and the fact that ASF arduino due #define:s "hides" the "real" pin names which I don't really enjoy. But thats is more my own taste ...

Try to find some simple project to learn around. For instance a simple motor control where you use PWM or a TC or do it yourselves to learn different solutions to the same problem. That would give you something to start with :wink:

I don't use the studio since I'm running on linux.

Cheers and good luck,

Tomas