Pages: [1]   Go Down
Author Topic: Bit Bashing the Sam3x  (Read 335 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I've just been browsing the manual for the Sam3x processor, 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:
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.


Offline Offline
Shannon Member
Karma: 215
Posts: 12467
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: