Fast internal timer/interrupt

Hi,

I'm at the very beginning and just try to get a feeling for the Arduino Due - with a focus to what I plan to do with it. So to find a starting point I'm asking this possibly stupid question:

I need a timer/cyclic internal interrupt that executes a function repeatedly with a clock of 4 MHz (should be possible on a Due with 84 MHz). My question: how can I do that? Are there any useful code examples out there?

Thanks!

With only 21 clock cycles between interrupts, minus some overhead
getting into the interrupt and out again, is there enough time
to do what you want to do?

What is the overhead going in, and going out?

Read this thread from beginning to end. Things might get cleared to ya.

http://forum.arduino.cc//index.php?PHPSESSID=g2m4u8vhk8novn31rrih5e1kr3&topic=130423.0