Timers in arduino due

I want a function in my arduino code to run for every 6ns of time

The Due has a 84 MHz clock. if my math is correct you get one tick every ~12ns...

also how long would that function run for (including calling time and context switching)?

can you give me a sample example

an example of what?

did you understand the clock issue for your needs?

give an example of arduino code which execute a function for every 6ns of time.
Any example is fine(for arduino due)

Do you understand what this means?

The Due has a 84 MHz clock. if my math is correct you get one tick every ~12ns

here is my best example:
that will run as fast as possible and yet x won't even be incremented every 6ns

volatile byte x = 0;
void setup() {}
void loop() {while(true) x++;}

If the clock ticks every 12 ns, you cannot do anything in between...
And most functions would take more than one tick.
So: forget about it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.