Go Down

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


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:

#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?


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

    AT91SAM ARM-based Flash MCU
    SAM3X SAM3A Series

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: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp
See who has no social life: https://forum.arduino.cc/index.php?action=stats :)

Go Up