Pages: [1]   Go Down
Author Topic: Due AT91SAM3X8E timers and corresponding registers: Names and how to access?  (Read 2160 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to modify the timers on my Due AT91SAM3X8E processor like in this article: http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM

Basically, I need to know the equivalent for the ARM processor of:

Quote
#include <avr/interrupt.h>
TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
  TCCR2B = _BV(CS22);
  OCR2A = 180;
  OCR2B = 50;

What the corresponding timers and registers are for the Due ARM processor?

And what would be the correct library to include to access these registers so I can modify their bits?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8853
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should be able to find all that in the datasheet:

    AT91SAM ARM-based Flash MCU
    SAM3X SAM3A Series
    http://www.atmel.com/Images/doc11057.pdf

You'll probably have to look in the Arduino DUE core sources to see how "analogWrite()" is implemented if you want to change how it is implemented.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: