Go Down

Topic: Due AT91SAM3X8E timers and corresponding registers: Names and how to access? (Read 2560 times) previous topic - next topic

elevine

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?

johnwasser

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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Go Up