Go Down

Topic: Bit Bashing the Sam3x (Read 700 times) previous topic - next topic



I've just been browsing the manual for the Sam3x processor http://www.atmel.com/Images/doc11057.pdf, and there's some interesting stuff in there, so I was wondering whether anyone has tried using direct memory manipulation, and (ideally) succeeded.

Of particular interest to me is that it looks like it's possible to set the ADC free of the processor - I'm looking at a real-time control application, so I don't want to be burning clock cycles while I wait for the ADC to power up, decide which channel to convert, etc.

Perhaps it is as simple as:
Code: [Select]
uint32_t * address;
address=0x....... // byte address to access
*address=0x.....// bytes to write there

in a c++ library? I'm reluctant to try it, because I'm used to PC programming.


Yup - all doable, re-read the relevant parts of the datasheet a few times and start
experimenting.  There's lots of helpful code in the libsam library that comes with
the system, start looking at that.

For ADC you can set it up to be auto-triggered from a timer or PWM channel, and
even configure DMA to save its results automatically, I did some stuff recently
its in this thread: http://forum.arduino.cc/index.php?topic=205096.0
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up