Something in your code, or in a library, is doing it. Possibly due to a buffer overrun somewhere
Check post #22, where I check for all references of TCCR3A in the complete project, only found in the Timer3 library.
All my dealings with Timer3 are via those very functions as in the test program, nothing else.
Does this code have interrupts?
No interrupts anymore, as I mentioned in reply post #20
Firstly, I have removed the TimerThree generated 100mSec interrupt used to call a routine.
That interrupt has been replaced with a standard 100mSec millis() time check, which works fine.
Which is what we have in the test, it is from my actual program.
For something that goes wrong very occasionally it sounds like a timing issue
Well, yes, timing of sorts I guess, being that it takes a while for the problem to manifest itself.
I am feeling somewhat stuck and a little embarrassed as I think I should be able to sort this out.
But it is proving to be a curly one.