That's correct.
I'm understanding (please correct if wrong) that timer1 is simply setup to interrupt on overflow. Is it correct to assume that the timer overflows every
(F_CPU / 4000000) * TIME_CHUNK; // goes twice as often as time chunk, but every other event turns off pins
?
So, using the Due timer/interrupt library I could simply do:
long freq = (F_CPU / 4000000) * TIME_CHUNK; // goes twice as often as time chunk, but every other event turns off pins
startTimer1(freq, interruptRoutine); // (Frequency, function)
where interruptRoutine is the function that is called upon timer overflow?